Electronics > Microcontrollers
Converting from 7 segment to numbers
David Aurora:
I've got a climate control/info display for my car that is stuffed (dodgy flat flex from LCD driver to display, and Ford don't sell spare parts. $600 new unit or nothing).
I've looked into repairs/replacement and it just isn't feasible (my usual auto electrician won't even touch it because it's so expensive/such a pain in the ass). So I've decided to have a crack at just putting in a new screen and decoding the data from the circuit board with an Arduino system. The original screen is driven by one of these- http://www.nxp.com/documents/data_sheet/PCF8576C.pdf. At the moment I'm able to figure out what most of the original LCD segments do by feeding in an AC signal directly to the screen conductors on the LCD glass, which then tells me which PCB pad drives which segment. So I know for example that voltage on pin 1 lights up the "OVERSPEED" segment, and pin 41 lights up the "ÂșC" segment and so on. So far so good, easy enough to read that input and spit out that information onto a screen.
The part I'm not sure about is the actual numbers, which are a 7 segment type display. Feeding signals to some of the LCD pins I've identified as numbers will show parts of the characters, and the next pin will show other parts, and each pin seems to light up two segments (e.g. two parallel vertical lines of the bottom half of character, or two parallel lines of the top half, and so on). I've never played around with 7 segment displays before (except with an online 595 simulator but I just used that to learn how shift registers work for a totally different purpose). Just wondering if it's likely to be fairly straightforward to read those signals and decode those to actual numbers in code? I won't be able to try for myself until I set up far more i/o but I'd kind of like to know in advance if it's likely to be straightforward or a total pain. I guess what I'm trying to do is convert parallel to serial, is that correct? Basically read the pins that drive a digit, and convert that to a decimal. So if I was reading 00001010 I could assume that digit should read 1.
If somebody could confirm or deny my ineptitude I'd be pretty darn grateful, cheers.
mariush:
See this:
http://www.mikroe.com/eng/chapters/view/17/chapter-4-examples/#c4v2
Scroll down to LED display and it explains how segments in a number are usually numbered and what segments should be on or off for various numbers. Note that the code on page is for PIC microcontrollers which is slightly different but you're looking for the table with the segments which should be the same on almost all led numbers.
TerminalJack505:
From the sounds of it your LCD display is multiplexed. This is why one pin lights up two segments.
The problem with this is that the waveforms from the controller aren't digital. They will look something like those on page 15 or 16 of the datasheet.
Notice how there are either 5 or 7 different voltage levels that control each segment. This will further complicate decoding.
David Aurora:
--- Quote from: mariush on May 16, 2012, 02:07:33 pm ---See this:
http://www.mikroe.com/eng/chapters/view/17/chapter-4-examples/#c4v2
Scroll down to LED display and it explains how segments in a number are usually numbered and what segments should be on or off for various numbers. Note that the code on page is for PIC microcontrollers which is slightly different but you're looking for the table with the segments which should be the same on almost all led numbers.
--- End quote ---
Thanks, I'll take a look :)
--- Quote from: TerminalJack505 on May 16, 2012, 03:22:28 pm ---From the sounds of it your LCD display is multiplexed. This is why one pin lights up two segments.
The problem with this is that the waveforms from the controller aren't digital. They will look something like those on page 15 or 16 of the datasheet.
Notice how there are either 5 or 7 different voltage levels that control each segment. This will further complicate decoding.
--- End quote ---
Haha yeah, I did notice that and had a brief "Oh fuck... do I really want to go down this path" moment. But one step at a time I guess. I'll take a look at what the controller is spitting out some time soon and see where I stand then on the complexity front. Maybe the I2C bus feeding it is another avenue to consider, but I know absolutely zero about I2C at this point.
Chet T16:
I looked into trying to read the value from a 7 segment display before and realistically when its multiplexed its going to be a huge pain!
If you're sure the controller is using i2c then thats the way to go. Is it using standard i2c? The display in my opel uses a variation with 3 wires.
Navigation
[0] Message Index
[#] Next page
Go to full version