5-53
STANDARD AND PTS INTERRUPTS
14. The transmission will begin. Data is shifted out with the least-significant (rightmost) bit
first. Each time a timer match occurs between EPA0_TIME and TIMER1, the EPA0
channel generates an interrupt and the PTS outputs the next bit of data on the pin
configured as TXD. When PTSCOUNT decrements to zero, the PTS calls the end-of-PTS
interrupt (Figure 5-26). The interrupt service routine should load the next data byte, reload
the PTSCOUNT and PTSCON1 registers, clear the TXD bit to create the start bit for the
next word to be transmitted, select PTS service for EPA0, and reload both the
EPA0_CONTROL and EPA0_TIME registers.
15. To determine when all bytes have been transmitted, create a loop routine to check the
status of the TXDDONE flag.