HT1632 driver for Sure 3208 (32x8) LED Dot Matrix Display
I've bought this fantastic LED display from ebay: http://r.ebay.com/1v1mTw they have different versions with red or green, and 3mm or 5mm LEDs but they can be chained up to 4 displays wide driven from the same serial bus.
Each display has a HT1632 driver chip, which has an internal RAM that you write to with serial commands, and the display will then scan and display the RAM contents continously.
I don't see any other projects on mbed using this chip so I'm going to create a driver based on arduino code available on the web. The end result could be used for a scrolling text display, a fancy clock, or a large thermometer ;)
Here's a page with some example code for Arduino - http://ladyada.net/products/16x24LEDmatrix/ though the board layout is different it should be possible to re-use a lot of the code.
Neil.
HT1632.cpp
Contains driver for the HT1632 chip and defines holding constants for commands and setup. A private array: ledmatrix[48] of bytes stores the image to be written to the display when writeScreen() is called. Each byte is 8 dots on the screen.
Write data to the display expects LSB first, 4 bits at a time: D0..D3; addresses increment, e.g. 00, 01, 02..
T1632::writedata(uint16_t d, uint8_t bits) scans outs data 'd' from bits-1 down to 0
HT1632::writeScreen() calls writedata with 16 bits, MSB first but lowest byte first [7 6 5 4][3 2 1 0][15 14 13 12][11 10 9 8]
Timings - Arduino bit bashed the pins at max speed, mbed is probably faster and may need delays. HT1632 1/2 clock period is 1.67us in write mode = 300kHz clock rate
Sure 3208 display
32 columns 8 rows Address zero, bit zero is bottom left corner.
7 15 .. 6 14 5 13 4 12 3 11 2 10 1 9 0 8
1 comment on HT1632 driver for Sure 3208 (32x8) LED Dot Matrix Display:
Please log in to post comments.
This is a comment.