These 4-digit displays can be assigned one of eight fixed I2C addresses via solder jumpers on the back. But the time circuit needs nine displays. A few possibilities were considered, including driving the one extra display “manually” with shift registers, or use a software I2C library and split the displays among multiple I2C buses. Either would require lots of library code changes and some intense concentration, but I was hit with a massive sinus headache at the time and really didn’t want to think about it.

Instead, exploiting the fact that we need just one way, write-only access to use the displays, I used a simple hardware hack to split the I2C bus to communicate with one row of three displays at a time (and saving some code by repeating the same addresses in each row). The I2C data line fans out to all the displays as normal, but the clock feeds the enable lines of a 74HC138 3-to-8 line decoder, and the microcontroller can then select which output line forwards the clock signal. The data on the other I2C buses is ignored without the corresponding clock.

This guide was first published on Jul 29, 2012. It was last updated on Jul 29, 2012.

This page (Circuit Trickery) was last updated on Jul 24, 2012.

Text editor powered by tinymce.