STATEMENT: I have a problem refreshing, the 20 odd displays in less than 1/4 second each, which would let them seem that there all bright, but they will be dim, to begin with. So multiplexing is now out for the 7 segment displays, but I still will multiplex the four 16 segment displays.
SOLUTION: I found an IC that handles eight 7-segment displays and it has a built-in SPI interface. The device is a MAX-7221 which will give me a solution for my problem.
As you can see in the block diagram this device has separate segment and digit drivers.
| Arduino Mega | ||||
| SCLK | MOSI | MISO | CS | |
|---|---|---|---|---|
| 52 | 51 | 50 | ||
| MAX-7211 | ||||
|
CLK (13) |
DIN |
N.A |
LOAD 12 |
SC-0 (49 |
|
SC-1 (48) |
||||
| CS-2 (47) | ||||
| Table I | ||||
| Arduino 3-bit Decoder Pins | ||||
|---|---|---|---|---|
| 48 | 47 | 46 | ||
| Arduino Alpha Drive Pins | ||||
| 45 | 44 | 43 | 42 | 41 |
| 40 | 39 | 38 | 37 | 36 |
| 35 | 34 | 33 | 32 | 31 |
| 30 | - | - | - | - |
| Table II | ||||
As shown in Table I the pins between the Arduino Mega and the MAX-7221. You will please notice that the MAX-7221 does not require MISO, and as it is ONLY a SLAVE. You will also notice the change in the Pin Definitions promulgated by the Open Source Hardware Association.
As shown in Table II the pins between the Arduino Mega and the four 16-segment displays. Pins 46, 47, 48 are the output to the row select which is accomplished by a BCD to Decimal
![]() |
![]() |
To drive this device is really quite simple, gee I wish I had some bi-polar PROMs
So I will have to do this the hard way. First I have to map the display to a letter. But the web to the rescue. there is a 16-segment font for your CRT etc. So I still have a lot of work to do.
| Letter | ASCII | Index | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Letter | ASCII | Index | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| A | 41 | 11 | x | x | x | x | x | x | x | x | S | 53 | 29 | x | x | x | x | x | x | |||||||||||||||||||
| B | 42 | 12 | x | x | x | x | x | x | x | x | x | T | 54 | 30 | x | x | x | x | ||||||||||||||||||||
| C | 43 | 13 | x | x | x | x | x | x | U | 55 | 31 | x | x | x | x | x | x | |||||||||||||||||||||
| D | 44 | 14 | x | x | x | x | x | x | V | 56 | 32 | x | x | x | x | |||||||||||||||||||||||
| E | 45 | 15 | x | x | x | x | x | x | x | x | W | 57 | 33 | x | x | x | x | x | x | |||||||||||||||||||
| F | 46 | 16 | x | x | x | x | x | x | X | 58 | 34 | x | x | x | x | |||||||||||||||||||||||
| G | 47 | 17 | x | x | x | x | x | x | x | x | Y | 59 | 35 | x | x | x | x | x | ||||||||||||||||||||
| H | 48 | 18 | x | x | x | x | x | x | Z | 5A | 36 | x | x | x | x | x | x | |||||||||||||||||||||
| I | 49 | 19 | x | x | x | x | x | x | 0 | 30 | 0 | x | x | x | x | x | x | x | x | x | x | |||||||||||||||||
| J | 4A | 20 | x | x | x | x | x | 1 | 31 | 1 | x | x | ||||||||||||||||||||||||||
| K | 4B | 21 | x | x | x | x | x | x | x | 2 | 32 | 2 | x | x | x | x | x | x | x | x | ||||||||||||||||||
| L | 4C | 22 | x | x | x | x | 3 | 33 | 3 | x | x | x | x | x | x | x | x | |||||||||||||||||||||
| M | 4D | 23 | x | x | x | x | x | x | 4 | 34 | 4 | x | x | x | x | x | ||||||||||||||||||||||
| N | 4E | 24 | x | x | x | x | x | x | 5 | 35 | 5 | x | x | x | x | x | x | x | x | |||||||||||||||||||
| O | 4F | 25 | x | x | x | x | x | x | x | x | 6 | 36 | 6 | x | x | x | x | x | x | x | x | |||||||||||||||||
| P | 50 | 26 | x | x | x | x | x | x | x | 7 | 37 | 7 | x | x | x | x | ||||||||||||||||||||||
| Q | 51 | 27 | x | x | x | x | x | x | x | x | x | 8 | 38 | 8 | x | x | x | x | x | x | x | x | x | x | ||||||||||||||
| R | 52 | 28 | x | x | x | x | x | x | x | x | 9 | 39 | 9 | x | x | x | x | x | x | x | x | x | ||||||||||||||||
| Table III |
|
typedef struct { int offSet; int hexChar; char letter; int segments[16]; } record_type ARRAY;
ARRAY[] ={{11, 31, 'A',{1,1,1,1,1,1,1,1,0,0,1,0,0,0,1,0}}, etc. };
void displayLetter ( char displayChar ) {
for nt count = 0; count < 29; count++ ) { If displayChar == ARRAY.letter; ) { digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // A digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // B digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // C digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // D digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // E digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // F digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // G digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // H digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // I digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // J digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // K digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count];); // L digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // M digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // N digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // O digitalWrite (ARRAY.segmentName[count], ARRAY.segments[count] ); // P break; }} |
| Table IV |
You will notice in table III that I use an 'x' for TRUE or 1 and 'blank' for FALSE or 0. Also, note my numbers start a 1 and then skips number 10. If you will notice I have 3 columns Letter, ASCII, and Index. I will use the Index column for my array but an array will not really work so you need a structure, see table IV the blue box on the right.



Top Comments
-
DAB
-
Cancel
-
Vote Up
+1
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
-
phoenixcomm
in reply to DAB
-
Cancel
-
Vote Up
+1
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
Comment-
phoenixcomm
in reply to DAB
-
Cancel
-
Vote Up
+1
Vote Down
-
-
Sign in to reply
-
More
-
Cancel
Children