??? 04/29/04 08:58 Read: times |
#69458 - RE: Lock up of serial port 2 receive side Responding to: ???'s previous message |
As Erik suggested, how do you know if you're missing interrupts? When things don't work as expected, try to minimise the number of places an error can creep in. In this instance I would write some simple code that echos the rx data out the tx using interrrupts. serial2_isr: jnb RI_2,si2_1 ;if (RI_2) mov a,SBUF_2 ;{ mov SBUF_2,a ;SBUF_2 = SBUF_2 ;} si2_1: clr TI_2 ;TI_2 = 0 reti Not too many places for things to wrong here. If this works then there's a fair chance the serial port is working and that you should look elsewhere for the defect. Slowly add in the extra functionality until you identify the defect. Serial buffering in theory is quite simple - but there's lots of little things to catch you out. I'd be searching for some 'golden' code to try also. |