Skip to main content

Posts

Showing posts with the label pic serial communication code

Serial Communication Interrupts using pic18f

PIC Serial Communication using Interrupt In my Last Post we studied the serial communication of the PIC18. All sample programs in that Post used the polling method.  In this Post we explore interrupt based  serial communication, which allows the PIC18 to do many things, in addition  to sending and receiving data from the serial communication port. RCIF and TXIF flags and interrupts TXIF (transfer interrupt) is raised  when the last bit of the framed data, the stop bit, is transferred, indicating that the  TXREG register is ready to transfer the next byte. RCIF (received interrupt) is  raised when the entire frame of data, including the stop bit, is received.  In other  words, when the RCREG register has a byte, RCIF is raised to indicate that the  received byte needs to be picked up before it is lost (overrun) by new incoming  serial data.  As far as serial communication is concerne...