8XC196MC, MD, MH USER’S MANUAL

time into the event-time register. If this toggle occurs, the clock polarity will change because of the odd number of toggles and erroneous data may be output. The interrupt service routine should also load the next data byte, reload the PTSCOUNT and PTSCON1 registers, select PTS service for EPA0, reload both the EPA0_CONTROL and EPA0_TIME registers.

14.To determine when all bytes have been transmitted, create a loop routine to check the status of the TXDDONE flag.

End-Of-PTS Interrupt

Save Critical Data

Disable EPA Channel

Clear Interrupt Request Bit

T_COUNT = T_COUNT - 1

T_COUNT = 0?

N

Set-up next data transfer

Y

-Load next data byte into DATA register

-Reload PTSCOUNT and PTSCON1 registers

-Select PTS service for EPA channel

-Re-initialize the EPA channel

-Re-initialize the EPA timer to initiate first bit transfer

TXDDONE = 1

Load Critical Data

Return

A3274-01

Figure 5-22. Synchronous SIO Transmit Mode — End-of-PTS Interrupt Routine Flowchart

5-46

Page 133
Image 133
Intel 8XC196MH, 8XC196MD, 8XC196MC manual Txddone =