Using the Inter-Integrated Circuit (IIC) for the QE Microcontrollers
QE128 Quick Reference User Guide, Rev. 1.0
Freescale Semiconductor
6-7
This function reads data from the IIC buffer and stores it in IIC_Rec_Data array. In this example only the
first byte of the array is used.
void Slave_Read_and_Store(void) {
if (rec_count == num_to_rec) {
last_byte_to_rec = 2;
}
IIC_Rec_Data[rec_count] = IIC2D;
re+;
if (rec_count == num_to_rec) {
rec_count = 0;
}
}
6.3
Hardware Implementation
This project is developed using the EVBQE128 STARTER KIT. No extra hardware is needed. Two resitors
are needed for the protocol to work properly. For this example 2 MCUs are connected.
Figure 6-1
shows
the hardware configuration.