Matrix driver for HDSP-200x four character 5x7 alphanumeric displays. These are 12 pin DIL package ICs full of LEDs arranged in 4 characters of 5 columns & 7 rows each. The ones I have are the yellow HDSP-2001, but they are also available in red (HDSP-2000), high efficiency red (HDSP-2002) or green (HDSP 2003). I don't know if they are easily available anymore, but I thought, since I've got 30 or so, I'd have a go at programming them. See my notepad (http://mbed.org/users/tonymudd/notebook/led-matrix-display/) for videos of this working.
Dependents: alpha_message TP1_matriz
Diff: matrixDisplay.h
- Revision:
- 0:69eeea586a16
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matrixDisplay.h Wed Jun 15 22:27:52 2011 +0000 @@ -0,0 +1,48 @@ +/* + class to write to a matrix led display. + + Written by tonymudd (mbed@tonymudd.co.uk) + +*/ +#include "mbed.h" + +#ifndef MBED_MATRIXDISPLAY_H +#define MBED_MATRIXDISPLAY_H + +class matrixDisplay +{ + public: + matrixDisplay( float scrollRate, PinName clockPinIn, PinName dataPinIn, + PinName col1, PinName col2, PinName col3, + PinName col4, PinName col5); + virtual ~matrixDisplay(); + void setMessage(char * newMessage); + void stop(); + + private: + void colChange(); + void outputCol(int); + void loadDisplay(); + void scrollMessage(); + static const int numOfColumns = 5; + static const int numOfRows = 7; + static const int numOfChars = 4; + static const int numOfLeds = numOfRows * numOfChars; + int column; + // fires when the column changes - fast + Ticker colTick; + // fires to scroll the chars along one - slow. + Ticker scroll; + bool display[numOfColumns][numOfLeds]; // on the display now + char text[numOfChars]; // text on the display + char *message; // the whole message + int whereInMessage; // which character in message to display next + + // And the hardware it uses: + DigitalOut * clockPin; + DigitalOut * dataPin; // DigitalOut data(p20); + BusOut * columnsBus; // BusOut columns(p10,p11,p12,p13,p14); + +}; + +#endif \ No newline at end of file