View previous topic :: View next topic |
Author |
Message |
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
18F252 Serial Interrupt Assembly Listing |
Posted: Wed Mar 31, 2004 10:10 am |
|
|
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
|
|
Posted: Wed Mar 31, 2004 11:32 am |
|
|
What versions of PCH did you use to make these two routines ? |
|
|
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
|
Posted: Wed Mar 31, 2004 11:33 am |
|
|
PCH 3.185 |
|
|
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
|
Posted: Wed Mar 31, 2004 11:45 am |
|
|
I just updated to 3.188 and it still does it. |
|
|
Ttelmah Guest
|
|
Posted: Wed Mar 31, 2004 3:07 pm |
|
|
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
|
|
Posted: Wed Mar 31, 2004 3:27 pm |
|
|
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
|
|
Posted: Wed Mar 31, 2004 3:50 pm |
|
|
So the only difference is this line?
void RDA_isr(){ |
|
|
|