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
matrixDisplay.h
00001 /* 00002 class to write to a matrix led display. 00003 00004 Written by tonymudd (mbed@tonymudd.co.uk) 00005 00006 */ 00007 #include "mbed.h" 00008 00009 #ifndef MBED_MATRIXDISPLAY_H 00010 #define MBED_MATRIXDISPLAY_H 00011 00012 class matrixDisplay 00013 { 00014 public: 00015 matrixDisplay( float scrollRate, PinName clockPinIn, PinName dataPinIn, 00016 PinName col1, PinName col2, PinName col3, 00017 PinName col4, PinName col5); 00018 virtual ~matrixDisplay(); 00019 void setMessage(char * newMessage); 00020 void stop(); 00021 00022 private: 00023 void colChange(); 00024 void outputCol(int); 00025 void loadDisplay(); 00026 void scrollMessage(); 00027 static const int numOfColumns = 5; 00028 static const int numOfRows = 7; 00029 static const int numOfChars = 4; 00030 static const int numOfLeds = numOfRows * numOfChars; 00031 int column; 00032 // fires when the column changes - fast 00033 Ticker colTick; 00034 // fires to scroll the chars along one - slow. 00035 Ticker scroll; 00036 bool display[numOfColumns][numOfLeds]; // on the display now 00037 char text[numOfChars]; // text on the display 00038 char *message; // the whole message 00039 int whereInMessage; // which character in message to display next 00040 00041 // And the hardware it uses: 00042 DigitalOut * clockPin; 00043 DigitalOut * dataPin; // DigitalOut data(p20); 00044 BusOut * columnsBus; // BusOut columns(p10,p11,p12,p13,p14); 00045 00046 }; 00047 00048 #endif
Generated on Wed Jul 13 2022 16:35:11 by 1.7.2