7 segment reverse decode

Thread Starter

Fadintc

Joined Dec 8, 2023
7
Good day dear sirs

I have a far terminal 24volt 7 segment display common anode connected to elevator control board
And need to decode its signal into Esp32 board so I can read it via IOT

What chip or circuit should I use to reverse the BCD system

Is there any chip work in reverse of 4511 or similar driver


Thanks in advance
 

dl324

Joined Mar 30, 2015
16,988
Welcome to AAC!
What chip or circuit should I use to reverse the BCD system

Is there any chip work in reverse of 4511 or similar driver
Which are you working with? BCD or 7 segments? The former will be easier, but you need to define what you mean by "reverse decode".

If you're transmitting the data to an ESP32, why can't you use it to do your decoding?
 

Thread Starter

Fadintc

Joined Dec 8, 2023
7
Hi Fad,
Welcome to AAC.
If you can spare 7 Input pins on your ESP32, a simple sketch could recode the LED Bits.
E
Thanks for your response
First i apologies for mistyping i meant ESP8266 and need to use the maximum availability of gpio
Besides that I prefer to use chip as buffer protection with live 24 volt

But it's really a good idea and hope you can share a guidance about such sketch
 

Thread Starter

Fadintc

Joined Dec 8, 2023
7
Welcome to AAC!
Which are you working with? BCD or 7 segments? The former will be easier, but you need to define what you mean by "reverse decode".

If you're transmitting the data to an ESP32, why can't you use it to do your decoding?
Thanks for your response
As BCD located on far terminal of elevator control board so I can only deal with 7 segment output

Revere coding means to convert the 8 signals of 7 segment into 4 bit binary data and input it into ESP8266

As you know 4511 work as BCD
And Ifound 74tl148 which work as 8 to 3 convert but still can't figure out how to use it
 

boostbuck

Joined Oct 5, 2017
547
The 148 is a 3:8 mux, which is not what you want. You are very unlikely to locate a chip that has the hardware you need, apart from the 74C195 as Ian suggests in #4.

Why not do it in software? The ESP8266 has plenty of I/O. Is there a reason you don't want to do that? It will be much simpler, at least in hardware.
 

dl324

Joined Mar 30, 2015
16,988
As BCD located on far terminal of elevator control board so I can only deal with 7 segment output
How are you accessing the segment data? Are you connecting to the LEDs in the display? How many digits are you dealing with?

How is the data going to be sent to your ESP8266?
 

MisterBill2

Joined Jan 23, 2018
18,911
Here is a Sort of a round-about scheme, but feesd the seven signals into an 8-bit D/A cpmverter then use an analog input. You willthen need a small bit of code to convert from a voltage reading to a number.
 

Thread Starter

Fadintc

Joined Dec 8, 2023
7
The 148 is a 3:8 mux, which is not what you want. You are very unlikely to locate a chip that has the hardware you need, apart from the 74C195 as Ian suggests in #4.

Why not do it in software? The ESP8266 has plenty of I/O. Is there a reason you don't want to do that? It will be much simpler, at least in hardware.
In fact i just one pinnas an output to simulate ordering the cabin
Rest is free
But I'm just a beginner in coding and don't know where to start

I'll appreciate any guidance or sample sketch
 

Ian0

Joined Aug 7, 2020
9,981
Why do you need to decode it? Can't you just assume that what you are reading is a 7-bit number, then use a lookup table in the ESP32 if you need to know the original number?
 

Thread Starter

Fadintc

Joined Dec 8, 2023
7
Why do you need to decode it? Can't you just assume that what you are reading is a 7-bit number, then use a lookup table in the ESP32 if you need to know the original number?
In fact thanks to you here is the first hint or key to know where to start
But can't find any relative sample so i edit it

I'm just a beginner
 

Ian0

Joined Aug 7, 2020
9,981
In fact thanks to you here is the first hint or key to know where to start
But can't find any relative sample so i edit it

I'm just a beginner
If you look at the 7 output as a binary number, you get 126,48,109,121,51,91,31,127,115 instead of 0,1,2,3,4,5,6,7,8,9.
In the ESP32 you have a 32-bit microcontroller operating at 160MHz - more power than a desktop computer of a few years back (about the same as a 486) Surely it can't be beyond the wit of man to get from one list to the other?
 

Thread Starter

Fadintc

Joined Dec 8, 2023
7
Totally agreed
Spit I'm using slower esp8266 but can't figure out how to form the right code

Is there any tutorials or documentation for that?
Link please
 

MisterBill2

Joined Jan 23, 2018
18,911
Writing even "simple" code is not a trivial task, as the TS tells us. That is a big portion of why I suggest using the computers whose makers use different words for everything than the rest of the world. Using seven inputs is not a trivial task, converting the 7 inputs to a decimal number is not trivial to a beginner.
 

boostbuck

Joined Oct 5, 2017
547
Is there any tutorials or documentation for that?
Are you looking for a cut-and-paste solution? Your requirements may be a little specific for that.

Do you have ANY coding experience? Your first post would imply you do have, but it seems you do not. Reading seven digital inputs into a binary value and writing an if-then-else statement to look up the correct value as output is fairly trivial, if not very elegant.

What coding experience do you have? It would help in guiding you.
 

MisterBill2

Joined Jan 23, 2018
18,911
Are you looking for a cut-and-paste solution? Your requirements may be a little specific for that.

Do you have ANY coding experience? Your first post would imply you do have, but it seems you do not. Reading seven digital inputs into a binary value and writing an if-then-else statement to look up the correct value as output is fairly trivial, if not very elegant.

What coding experience do you have? It would help in guiding you.
it seems like it could be done with seven IF/THEN statements. But only if they allow the AND functions for the "IF" portion.
 

Ian0

Joined Aug 7, 2020
9,981
I would read the seven inputs as a 7-bit number, then use a SWITCH/CASE statement.
Note that there would have to be two versions depending on whether it is a common anode or common cathode display, and it would have to deal with 6s and 9s with or without tops and bottoms.
 
Top