Using I2C Protocol
- littlenv
- Feb 23, 2017
- 1 min read
This project required us to output a data sequence to a Sparkfun 7-Segment display using I2C, SPI, and TTL protocol on both the DE2 and Nexys-4 boards. We were provided the I2C master file from the IEEE wiki and had to develop the user logic. We recycled code from the "Using ... TTL Protocol, and SPI Protocol" section for both of those communication methods since the code was already written.

Above is the basic block diagram of the system using names that fit the DE2 board given we designed the system first using it. In order to communicate with the external display, we ran the I2C output at a 100 kHz clock, and output the data whenever there was a 0->1->0 transition of the clock.

Whenever SCL(the output clock) or SDA(the data) were pulled high, we tied them to a weak pull-up resistor to give the signal a high impedance for the external display to work properly. When new data could be sent to the display, the busy signal went low, incremented our data count to receive new data, and then output again.
Comments