On Fri, 30 May 2003, Joe Smith wrote: > I am using the C2C C Complier and I am trying to learn how to use > interrupts, specifically the usart receive interrupt. I am using some > example code found on the C2C site to do this. I believe the Timer0 overflow > interrupt is working correctly. My code for the usart receive interrupt does > not seem to be working correctly, all I am trying to do is write the > character that was received when the interrupt was triggered. Any ideas? > #pragma RS232_RXPORT PORTB > #pragma RS232_TXPORT PORTB > #pragma RS232_RXPIN 1 > #pragma RS232_TXPIN 2 > #pragma RS232_BAUD 9600 > #pragma TRUE_RS232 1 I don't know what any of this does, but you shouldn't need it to use the hardware UART. > set_bit(intcon, T0IE); > set_bit(rcsta, CREN); > set_bit(pie1, RCIE); > set_bit(intcon, PEIE); > enable_interrupt(GIE); I don't see the serial port being enabled (SPEN = 1). -- John W. Temples, III -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body