Truncated match.
PICList
Thread
'Serial port lock-up problem'
1998\01\21@092733
by
Gennady Palitsky
|
Hello,
I have a strange (to me) problem on 16C63. It's implemented in remote
control unit to send requests and receive status. All incoming status
messages are only one byte long, separated by at least 1 mS. Serial
interrupt is the only one used. ISR is pretty short (shorter than one byte
anyway). And to prevent overrun I even read RCREG one more time at the end
of ISR. Nevertheless after certain time (certain amount of messages?)
controller stops receiving messages and only reboot helps. I am sure it's
something simple (probably overrun), but I can't figure out where is the
problem. Is there any way to prevent it?
Will appreciate any help. Receiving routine follows.
;================
INTERRUPT_ROUTINE
clrwdt
(...........) content save
;
bank1 ;switch to bank1
bcf PIE1,RCIE ;disable serial interrupt
;
bank0 ;switch to bank 0
movf RCREG,0 ;read serial buffer
movwf tempser ;store in temp location
bcf PIR1,RCIF ;clear receive flag
;-------------------
(..........) message development
;------------------
OUT_SER
bank1
bsf PIE1,RCIE ;enable serial interrupt
bank0
movf RCREG,0 ;just to clean
;------------
(...........) content restore
retfie
;==================================
Gennady Palitsky
spam_OUTgennadypTakeThisOuT
mainlink.net
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- Today
- New search...