05 March 2018

Count-up timer with TIL305 - optimizations

Looking at the 2x TIL305 timer I tried to imagine an even simpler version with lower parts count: could a single ATtiny2313 drive both displays? This AVR comes in a 20 pin package: take out two for power and one for reset (needed for low voltage programming and anyway it has limited current drive capability). That leaves 17 I/O pins.

My current implementation uses 5 pins for columns, 7 for rows and 1 for the decimal point: 13 I/O in total. Another display needs 5 control lines, we're 1 short (17 - 13 = 4).

If the decimal point is left out math tells us that 17 (total) - 13 (one full TIL305) + 1 (decimal point) = 5. That's enough to drive two TIL305 with one ATtiny2313.

But there is no room for the microcontroller to interact with the outside world, especially to receive an input signal like the 1 Hz clock. There is a way out!

When looking at the TIL305 running in landscape mode, you realize that your 5x3 symbols take up a total display area of 5x(3+3) pixels: the middle column (row #4) is never used because it acts as symbol spacer!

So, as long as you want to use 2x TIL305 in landscape mode displaying 4 symbols drawn on a 5x3 dot matrix, an ATtiny2313 will suffice as driver. You can now drop the code that sets row #4, thus running the scan 1/7th faster!

Want to get rid of the external 1 Hz timebase? Upgrade to an ATmega48 (o 88, 168, 328) and generate the clock with a XTAL so that the timing obtained in software will be more accurate than the internal 4/8 MHz RC.

No comments: