Getting Started with I2C
Agenda
What we are going to talk about:
- I2C
- DS3231 Real Time Clock (RTC)
- AT24C32 32Kbit EEPROM (4096 bytes)
- TM1637 7-segment LED driver (decimal points or colon)
- Logic8 / Logic16 logic analyzer
1) What is I2C - The bus hardware 2) START and STOP conditions (These are NOT bits) 3) I2C Address and the R /W bit - (7 or 8 bit I2C address ?) 4) Acknowledge bit (receiver of data provides acknowledge) 5) What isn't I2C? Examine the TM1637 5) Examine the DS3231, write and read it's registers 6) Examine the AT24C32, write and read data
DS3231 Module
DS3231
The time (and temperature), are accessed via 19 byte-wide registers, see Address Map on page 11. https://www.analog.com/media/en/technical-documentation/data-sheets/ds3231.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/ds3231m.pdf (The 'M' variant)
AT24C32
This 32Kbit EEPROM (4096 x 8), will hold 4096 bytes of data. https://ww1.microchip.com/downloads/en/DeviceDoc/doc0336.pdf
TM1637
Multiple 7-segment LED display driver / keypad scanner https://www.aliexpress.us/item/3256801873805909.html (decimal points) https://www.aliexpress.us/item/3256801704898010.html (decimal points) https://www.aliexpress.us/item/3256801873036951.html (colon)
References
https://www.ti.com/lit/an/sbaa565/sbaa565.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/ds3231.pdf https://www.arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf