CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

18F252 Serial Interrupt Assembly Listing

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

18F252 Serial Interrupt Assembly Listing
PostPosted: Wed Mar 31, 2004 10:10 am     Reply with quote

Here is the listing for a program that works for the serial interrupt:


.................... #int_RDA
.................... void RDA_isr(){
....................
*
0098: NOP(FFFF)
.................... status = getc();
009A: BTFSS F9E.5
009C: GOTO 009A
00A0: MOVF FAE,W
00A2: MOVWF 17
....................
.................... }
....................
....................
00A4: BCF F9E.5
00A6: GOTO 0056
.................... void main() { etc.....


Here is a listing from my program that does not work:

.................... #int_RDA
.................... RDA_isr(){
....................
*
022C: NOP(FFFF)
.................... status = getc();
022E: GOTO 020A
0232: MOVFF 01,34
....................
.................... }
....................
....................
0236: BCF F9E.5
0238: GOTO 0056


Notice status=getc() is compiled into a goto 020A and is missing the BTFSS F9E.5 line. 020A is another routine that checks the DS1302 clock. What is happening here?[/code]
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 31, 2004 11:32 am     Reply with quote

What versions of PCH did you use to make these two routines ?
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

PostPosted: Wed Mar 31, 2004 11:33 am     Reply with quote

PCH 3.185
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

PostPosted: Wed Mar 31, 2004 11:45 am     Reply with quote

I just updated to 3.188 and it still does it.
Ttelmah
Guest







PostPosted: Wed Mar 31, 2004 3:07 pm     Reply with quote

ljbeng wrote:
I just updated to 3.188 and it still does it.

What you haven't posted, is the rest of the code (or at least enough of it to make a guess as to what is happening...). You could get exactly this effect, by not having a #use RS232 statement, and declaring a 'getc' routine yourself...

Best Wishes
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

PostPosted: Wed Mar 31, 2004 3:27 pm     Reply with quote

Well, I made the problem go away by starting a new project and slowly adding my subroutines and main routine. I compiled each time I added something and I never saw the odd listing again. This was one way to fix the problem....
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Wed Mar 31, 2004 3:50 pm     Reply with quote

So the only difference is this line?

void RDA_isr(){
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group