I recently brought some of these rather nice Texas Instruments TIL311 hexadecimal displays from eBay, they are really small but beautiful. This got me thinking, could I connect one of these displays to a micro:bit.
Looking at the TIL311 datasheet, I came across the first hurdle. The TIL311 is a TTL device and needs 5v to work but the micro:bit runs at 3.3v so I needed a level shifter / buffer IC to interface between them, you could probably get away without a level shifter but I aired on the safe side. I chose the 74HCT244N but I used a 74HC244N as this is what I had in stock.
The TIL311 has a 4-bit data input A,B,C,D which I connected to pins 0,1,2 & 8 on the micro:bit via a 74HCT244N and used separate 5v supply for the display. To figure out how to display 0 to 9 I looked at the truth table for a 7490 decade counter and then replicated this in Python by turning the outputs on and off.
|The finished project|
My rather noddy Python code, I'm sure there must be a neater way of doing this.