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 CCS Technical Support

Broken #INT_RDA in PCH 3.170

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







Broken #INT_RDA in PCH 3.170
PostPosted: Tue Jun 01, 2004 5:50 pm     Reply with quote

PCH 3.170, PIC18F452

Do I need glasses?

What exactly is the point of sending out zeros ad infinitum in this interrupt routine when the actual C code is supposed to read from the RCREG regsiter? Hmmmmmm.

.................... #INT_RDA
.................... rda()
.................... {
021E: NOP(FFFF)
.................... chr=getc();
0220: MOVF 00,W
0222: BTFSS F9E.4
0224: GOTO 0222
0228: MOVWF FAD
022A: MOVLB 3
022C: MOVWF x5D
.................... putc('1');
022E: MOVLW 31
0230: BTFSS F9E.4
0232: GOTO 0230
0236: MOVWF FAD
.................... }
....................
0238: BCF F9E.5
023A: MOVLB 0
023C: GOTO 006E

Compiled again but within different C code. Looks a bit better. I'll have to backtrack to a better compiler version.


.................... #INT_RDA
.................... rda()
.................... {
*
0140: NOP(FFFF)
.................... chr=getc();
0142: BTFSS F9E.5
0144: GOTO 0142
0148: MOVF FAE,W
014A: MOVWF 48
.................... putc('1');
014C: MOVLW 31
014E: MOVLB 2
0150: MOVWF xE2
0152: MOVLB 0
0154: CALL 0118
.................... }
....................
....................
0158: BCF F9E.5
015A: GOTO 0056
NikkiC
Guest







PostPosted: Tue Jun 01, 2004 6:24 pm     Reply with quote

Yes, I think this does the trick:

#byte RCREG = 0xFAE

#INT_RDA
rda()
{
chr=RCREG;
}

Nikki
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