Seven segment display basic questions 2

Thread Starter

usernoname

Joined Oct 31, 2022
4
I have the same display that I desoldered from my old clockradio. The common cathodes are pin 1 and 2. Pins 5 thru 23 (except 11) are anodes. LED segments that share the same anode are connected to different cathodes. I have written an arduino function and tested the two rightmost digits in the display. I'm a self learned hobby enthusiast so I'm not sure the code is kosher, but it works. It goes like this:

int displayNumber(int t,int e){ //e is the rightmost digit and t is next to it
byte plexOne; //Segments to PIN 1
byte plexTwo; //Segments to PIN 2
switch (t) {
case 0:
plexOne = B111; // these represent segments connected from PIN 16-18 to PIN 1
plexTwo = B1011; // these represent segments connected from PIN 16-19 to PIN 2
break;
case 1:
plexOne = B011;
plexTwo = B0000;
break;
case 2:
plexOne = B110;
plexTwo = B0111;
break;
case 3:
plexOne = B111;
plexTwo = B0110;
break;
case 4:
plexOne = B011;
plexTwo = B1100;
break;
case 5:
plexOne = B101;
plexTwo = B1110;
break;
case 6:
plexOne = B101;
plexTwo = B1111;
break;
case 7:
plexOne = B111;
plexTwo = B0000;
break;
case 8:
plexOne = B111;
plexTwo = B1111;
break;
case 9:
plexOne = B111;
plexTwo = B1110;
break;
default:
plexOne = B000;
plexTwo = B0000;
break;
}

// make room for next digit
plexOne = plexOne << 4;
plexTwo = plexTwo << 3;

switch (e) {
case 0:
plexOne += B1011;
plexTwo += B111;
break;
case 1:
plexOne += B0000;
plexTwo += B110;
break;
case 2:
plexOne += B1110;
plexTwo += B101;
break;
case 3:
plexOne += B0110;
plexTwo += B111;
break;
case 4:
plexOne += B0101;
plexTwo += B110;
break;
case 5:
plexOne += B0111;
plexTwo += B011;
break;
case 6:
plexOne += B1111;
plexTwo += B011;
break;
case 7:
plexOne += B0000;
plexTwo += B111;
break;
case 8:
plexOne += B1111;
plexTwo += B111;
break;
case 9:
plexOne += B0111;
plexTwo += B111;
break;
default:
plexOne += B0000;
plexTwo += B000;
break;
}

// Put them together into one integer and return it
int multiplex = plexTwo;
multiplex = multiplex << 7;
multiplex += plexOne;
return multiplex;
}
Hello,
I think I have the same display that I desoldered from my old snooze clock (no radio).

I have arduino IDE and I want use this display with ESP32 and NTP server.
Do you have wire bread board or draw electric schema please ?

Thank you.
sorry for my poor english.


MOD Note:
This thread was split from -- https://forum.allaboutcircuits.com/threads/seven-segment-display-basic-questions.118021/
 

Thread Starter

usernoname

Joined Oct 31, 2022
4
Hello,
I think I have the same display that I desoldered from my old snooze clock (no radio).

I have arduino IDE and I want use this display with ESP32 and NTP server.
Do you have wire bread board or draw electric schema please ?

Thank you.
sorry for my poor english.


MOD Note:
This thread was split from -- https://forum.allaboutcircuits.com/threads/seven-segment-display-basic-questions.118021/
Maybe this can help you
http://blog.tynemouthsoftware.co.uk/2012/12/led-clock-part-2-teardown.html
but I do not find any code...
 

Thread Starter

usernoname

Joined Oct 31, 2022
4
Thank you Dodgydave for datasheet.

Can you help me replace it by arduino or esp, because I want have allways good time with gps modul or by ntp ?
Only how can I connect it together, and after I will write sketch.
 
Last edited:
Top