2.1.5.2 Helper Functions

The helper functions set up some parameters that are necessary for the automated interrupt-driven transmission to succeed. After setting up all the necessary parameters, the transmission is initiated by enabling the UDRE interrupt.

Flowcharts for the helper functions are shown in the figure below.

Note that the ReceiveData function fills the data buffer with ‘1’s and calls the TransmitData function. The RXC ISR will sample the signal and place the value read from the slave device into the data buffer.

Figure 2-7. Helper Functions