'Serial port lock-up problem'
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.
(...........) 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
bsf PIE1,RCIE ;enable serial interrupt
movf RCREG,0 ;just to clean
(...........) content restore
More... (looser matching)
- Last day of these posts
- In 1998
, 1999 only
- New search...