Howdy, I'm stumped and have a question like the original post in this thread. I've succeeded in working with a 2-digit 7-segment display (10 pin. stats here: http://www.xlitx.com/datasheet/CL3621AH.pdf ) The circuit and code are shown below to hopefully help someone in their journey.
Now, here's my thing. I intend to make a clock which shows Hours: Minutes: Seconds. Three blocks of 2-digit 7-segment displays. Obviously I need to chain latch shift registers like 74HC595, right? I'm familiar with that from other binary LED projects (through-hole LEDs, not components like this one.) Not familiar with the MAX2719 (7219?). But, sticking with the 74HC595 for now, I arrive at two questions:
(1) Do I really need 2 shift registers for this component? One per digit?
(2) I cannot figure out how to wire up two 74HC595s to this 10-pin component; any advice?
/*
CL3621AH 2-digit 7-segment display
http://www.xlitx.com/datasheet/CL3621AH.pdf
******* COMMON CATHODE **********
connect ardruino pins 10, 11 to resistors (330 ohm) and
then to component pins 5, 10. The rest connect direct.
compenent arduino uno
---pins-------------pins---
5 dig.1 10
10 dig.2 11
__________________________
3 A 2
9 B 3
8 C 4
6 D 5
7 E 6
4 F 7
1 G 8
2 DP 9
____________________________
Component pins (1 - 10)
(10) (9) (8) (7) (6)
| | | | |
*******************************************
* *
A A A A A A A A
F B F B
F B F B
F B F B
G G G G G G G G
E C E C
E C E C
E C E C
D D D D DP D D D D DP
* *
* *
*******************************************
| | | | |
(1) (2) (3) (4) (5)
array digit[] values represent LED on/off switches
0b[G][F][E][D][C][B][A]
0b0111111, // Zero
0b0000110, // One
0b1011011, // Two
0b1001111, // Three
0b1100110, // Four
0b1101101, // Five
0b1111101, // Six
0b0000111, // Seven
0b1111111, // Eight
0b1100111 // Nine
***************************************************
This code just cycles through 00-59.
***************************************************
*/
// these values turn segments on/off to display
// representations of numbers Zero through Nine.
int digit[] =
{
0b0111111, // Zero
0b0000110, // One
0b1011011, // Two
0b1001111, // Three
0b1100110, // Four
0b1101101, // Five
0b1111101, // Six
0b0000111, // Seven
0b1111111, // Eight
0b1100111 // Nine
};
// declare digit 1; digit 2
int d1, d2;
void setup()
{
for (int i = 2; i < 12; i++)
{ // we are using arduino pins 2-11
pinMode(i, OUTPUT);
}
}
void loop() {
for (int j = 0; j <= 59; j++)
{ // first loop: 0-59 with some binary conversions
d2 = j / 10;
d1 = j % 10;
setBrightness(10, 25);
digitalWrite(10, LOW); // LOW = active
digitalWrite(11, HIGH); // HIGH = inactive
shiz(d1); // ones digit
delay(10);
setBrightness(11, 25);
digitalWrite(10, HIGH); // HIGH = inactive
digitalWrite(11, LOW); // LOW = active
shiz(d2); // tens digit
delay(10);
}
}
void shiz(int n) {
for (int i = 2; i < 9; i++)
{
digitalWrite(i, bitRead(digit[n], i - 2));
}
}
void setBrightness(int p, int v) {
// p = pin; v = value
// common cathode, so high is low, flip the value
v = 255 - v;
analogWrite(p, v);
The following image represents my confusion. ![]()

