Assuming one back-plane to consider , what would be most efficient component-count/least complex discrete/CMOS/74 route , ie not pic/Pi/uC to firstly convert the ex-oring business to proper levels and then the "mapping", output could be linear per digit rather than bcd. Starting with an off-the-shelf commercial unit where the LCD display is driven off a uC, to give a remotely monitorable feed

# 7-segment LCD to BCD decoder ?

Started by ●October 5, 2014

Reply by ●October 5, 20142014-10-05

On Sunday, October 5, 2014 9:19:34 AM UTC-7, N_Cook wrote:> Assuming one back-plane to consider , what would be most efficient compo=nent-count/least complex discrete/CMOS/74 route , ie not pic/Pi/uC to firs= tly convert the ex-oring business to proper levels and then the "mapping",= output could be linear per digit rather than bcd. Starting with an off-the= -shelf commercial unit where the LCD display is driven off a uC, to give a = remotely monitorable feed Gal22V10 with 10 (need 7) input combinations and 10 (need 4) registers. Ju= st need four equations: Q0 =3D (/)I0 * (/)I1 * ....=20 ... Q3 =3D ... I can work out the equations later. Mouser got one for $160.89: http://www.mouser.com/ProductDetail/Lattice/5962-89841033A/?qs=3DsGAEpiMZZM= tzpSA5GSDwa0NaM8mhfT1i I just brought 309 of them off ebay for 33 cents each: http://www.ebay.com/itm/371148567428?_trksid=3Dp2059210.m2749.l2649&ssPageN= ame=3DSTRK%3AMEBIDX%3AIT Pricing is a funny thing.

Reply by ●October 5, 20142014-10-05

Den s=F8ndag den 5. oktober 2014 18.48.47 UTC+2 skrev edward....@gmail.com:> On Sunday, October 5, 2014 9:19:34 AM UTC-7, N_Cook wrote: >=20 > > Assuming one back-plane to consider , what would be most efficient com=ponent-count/least complex discrete/CMOS/74 route , ie not pic/Pi/uC to fi= rstly convert the ex-oring business to proper levels and then the "mapping= ", output could be linear per digit rather than bcd. Starting with an off-t= he-shelf commercial unit where the LCD display is driven off a uC, to give = a remotely monitorable feed>=20 >=20 >=20 > Gal22V10 with 10 (need 7) input combinations and 10 (need 4) registers. =Just need four equations:>=20 >=20 >=20 > Q0 =3D (/)I0 * (/)I1 * ....=20 >=20 > ... >=20 > Q3 =3D ... >=20 >=20 >=20 > I can work out the equations later. >=20 >=20 >=20 > Mouser got one for $160.89: >=20 >=20 >=20 > http://www.mouser.com/ProductDetail/Lattice/5962-89841033A/?qs=3DsGAEpiMZ=ZMtzpSA5GSDwa0NaM8mhfT1i>=20 >=20 >=20 > I just brought 309 of them off ebay for 33 cents each: >=20 >=20 >=20 > http://www.ebay.com/itm/371148567428?_trksid=3Dp2059210.m2749.l2649&ssPag=eName=3DSTRK%3AMEBIDX%3AIT>=20 >=20 >=20 > Pricing is a funny thing.not really, the mouser price is for those who have some ancient equipment t= hat just need to be fixed, price doesn't matter. No one else would be crazy= enough to use a long obsolete IC The Ebay price is just an attempt to get something as an alternative to put= ting them in the dumpster, and of course there is no guarantee that they ar= e what they say they are, or if they have been stored on a shelf somewhere = for 10 years so they are impossible to solder=20 -Lasse

Reply by ●October 5, 20142014-10-05

On Sun, 05 Oct 2014 17:19:34 +0100, N_Cook <diverse@tcp.co.uk> wrote:>Assuming one back-plane to consider , what would be most efficient >component-count/least complex discrete/CMOS/74 route , ie not pic/Pi/uC >to firstly convert the ex-oring business to proper levels and then the >"mapping", output could be linear per digit rather than bcd. >Starting with an off-the-shelf commercial unit where the LCD display is >driven off a uC, to give a remotely monitorable feedSo you want to convert LCD back to BCD? Are LCD signals normal... that is, active LOW? Map only 0 thru 9? ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply by ●October 5, 20142014-10-05

=20> > Mouser got one for $160.89: >=20 > > http://www.mouser.com/ProductDetail/Lattice/5962-89841033A/?qs=3DsGAEpi=MZZMtzpSA5GSDwa0NaM8mhfT1i>=20 > > I just brought 309 of them off ebay for 33 cents each: >=20 > > http://www.ebay.com/itm/371148567428?_trksid=3Dp2059210.m2749.l2649&ssP=ageName=3DSTRK%3AMEBIDX%3AIT>=20 > > Pricing is a funny thing. >=20 > not really, the mouser price is for those who have some ancient equipment=that just need to be fixed, price doesn't matter. No one else would be cra= zy enough to use a long obsolete IC Probably made around the same time and stored for same many years.> The Ebay price is just an attempt to get something as an alternative to p=utting them in the dumpster, and of course there is no guarantee that they = are what they say they are, or if they have been stored on a shelf somewher= e for 10 years so they are impossible to solder=20 That's OK. I am just using PLCC chip carrier socket anyway.

Reply by ●October 5, 20142014-10-05

> >Assuming one back-plane to consider , what would be most efficient compo=nent-count/least complex discrete/CMOS/74 route , ie not pic/Pi/uC to first= ly convert the ex-oring business to proper levels and then the "mapping", o= utput could be linear per digit rather than bcd.>=20 > >Starting with an off-the-shelf commercial unit where the LCD display is =driven off a uC, to give a remotely monitorable feed>=20 > So you want to convert LCD back to BCD? >=20 > Are LCD signals normal... that is, active LOW?Could be either way.>=20 > Map only 0 thru 9?seg2bcd and seg2bin would then be the same. Active high input here: -------------------------------------------------- GAL22V10 ; Device definition ; Pin definition ;[24 [23] [22] [21] [20] [19] [18] [17] [16] [15] [14] [13] VCC Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 NC ;[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] CLK D1 D2 D3 D4 D5 D6 D7 D8 D9 NC GND ; +- A -+ ; F B ; |- G -| ; E C ; +- D -+ ; ; A B C D E F G =20 ; D6 D5 D4 D3 D2 D1 D0 Q3 Q2 Q1 Q0 ; 0: 1 1 1 1 1 1 1 0 0 0 0 ; 1: 0 1 1 0 0 0 0 0 0 0 1 ; 2: 1 1 0 1 1 0 1 0 0 1 0 ; 3: 1 1 1 1 0 0 1 0 0 1 1 ; 4: 0 1 1 0 0 1 1 0 1 0 0 ; 5: 1 0 1 1 0 1 1 0 1 0 1 ; 6: 1 0 1 1 1 1 1 0 1 1 0 ; 7: 1 1 1 0 0 0 0 0 1 1 1 ; 8: 1 1 1 1 1 1 1 1 0 0 0 ; 9: 1 1 1 1 0 1 1 1 0 0 1 ; EQUATIONS Q3 =3D D6*D5*D4*D3*D2*D1*D0=20 + D6*D5*D4*D3*/D2*D1*D0 Q2 =3D /D6*D5*D4*/D3*/D2*D1*D0=20 + D6*/D5*D4*D3*/D2*D1*D0=20 + D6*/D5*D4*D3*D2*D1*D0 + D6*D5*D4*/D3*/D2*/D1*/D0 Q1 =3D D6*D5*/D4*D3*D2*/D1*D0=20 + D6*D5*D4*D3*/D2*/D1*D0=20 + D6*/D5*D4*D3*D2*D1*D0 + D6*D5*D4*/D3*/D2*/D1*/D0 Q0 =3D /D6*D5*D4*/D3*/D2*/D1*/D0=20 + D6*D5*D4*D3*/D2*/D1*D0=20 + D6*D5*D4*/D3*/D2*/D1*/D0 + D6*D5*D4*/D3*/D2*/D1*/D0 + D6*D5*D4*D3*/D2*D1*D0

Reply by ●October 5, 20142014-10-05

On 10/5/2014 9:19 AM, N_Cook wrote:> Assuming one back-plane to consider , what would be most efficient > component-count/least complex discrete/CMOS/74 route , ie not pic/Pi/uC to > firstly convert the ex-oring business to proper levels and then the "mapping", > output could be linear per digit rather than bcd. > Starting with an off-the-shelf commercial unit where the LCD display is driven > off a uC, to give a remotely monitorable feedFirst, you'd need to characterize the drive -- how much skew is there between backplane drive and segment on/off drives (any skew will appear as potential glitches on a static, combinatorial logic decoder so you would have to *sample* the decoded outputs at some epsilon after each BP clock edge). [epsilon can be large-ish if a MCU is "decoding in software". Also, consider temperature effects on the drive] You would also need to look at the particular "font" that is implemented: do 6's have tails? what about 9's? (sometimes 6 will have but 9 won't). And, any "other characters" that the display might present from time to time (e.g., 'A', 'o', 'P', 'H', 'h', 'e', 'L', 'E', etc.) that might collide with some of the "don't cares" in your decoder logic. The basic approach is simple: just build some Karnaugh maps describing each segment's performance. Then, cover the most appropriate ones with minterms to get your *desired* outputs (subject to the above notes) Note that it is *really* important to understand how the display is actually being driven. You can play games with the visual characteristics of LCD's by driving them in unconventional (yet "legal") ways.

Reply by ●October 5, 20142014-10-05

On Sunday, October 5, 2014 10:24:23 AM UTC-7, Don Y wrote:> On 10/5/2014 9:19 AM, N_Cook wrote: >=20 > > Assuming one back-plane to consider , what would be most efficient comp=onent-count/least complex discrete/CMOS/74 route , ie not pic/Pi/uC to firs= tly convert the ex-oring business to proper levels and then the "mapping", = output could be linear per digit rather than bcd. Starting with an off-the-= shelf commercial unit where the LCD display is driven off a uC, to give a r= emotely monitorable feed>=20 > First, you'd need to characterize the drive -- how much skew is there bet=ween backplane drive and segment on/off drives (any skew will appear as pot= ential glitches on a static, combinatorial logic decoder so you would have = to *sample* the decoded outputs at some epsilon after each BP clock edge). = [epsilon can be large-ish if a MCU is "decoding in software". Also, consid= er temperature effects on the drive] GAL can handle it, perhaps even pll/sampling the microcontroller clock. Th= e GAL can run at 150MHz.> You would also need to look at the particular "font" that is implemented:=do 6's have tails? what about 9's? (sometimes 6 will have but 9 won't).>=20 > And, any "other characters" that the display might present from time to t=ime (e.g., 'A', 'o', 'P', 'H', 'h', 'e', 'L', 'E', etc.) that might collide= with some of the "don't cares" in your decoder logic. Just details. GAL22V10 can handle any possible combinations of 7 inputs, o= r even up to 10 inputs.> The basic approach is simple: just build some Karnaugh maps describing e=ach segment's performance. Then, cover the most appropriate ones with mint= erms to get your *desired* outputs (subject to the above notes) Nope, don't need to optimize gates inside the GAL or for nano seconds. Jus= t decode the 1s and 0s. However, OP might need more than one digit. So, build the output as cascad= eable shift registers: ; A B C D E F G =20 ; D6 D5 D4 D3 D2 D1 D0 Q3 Q2 Q1 Q0 ; 0: 1 1 1 1 1 1 1 0 0 0 0 ; 1: 0 1 1 0 0 0 0 0 0 0 1 ; 2: 1 1 0 1 1 0 1 0 0 1 0 ; 3: 1 1 1 1 0 0 1 0 0 1 1 ; 4: 0 1 1 0 0 1 1 0 1 0 0 ; 5: 1 0 1 1 0 1 1 0 1 0 1 ; 6: 1 0 1 1 1 1 1 0 1 1 0 ; 7: 1 1 1 0 0 0 0 0 1 1 1 ; 8: 1 1 1 1 1 1 1 1 0 0 0 ; 9: 1 1 1 1 0 1 1 1 0 0 1 ; ; D7 =3D Load, D8 =3D Shift (rotate) Q3 =3D D8*Q2 + D7*D6*D5*D4*D3*D2*D1*D0=20 + D7*D6*D5*D4*D3*/D2*D1*D0 Q2 =3D D8*Q1 + D7*/D6*D5*D4*/D3*/D2*D1*D0=20 + D7*D6*/D5*D4*D3*/D2*D1*D0=20 + D7*D6*/D5*D4*D3*D2*D1*D0 + D7*D6*D5*D4*/D3*/D2*/D1*/D0 Q1 =3D D8*Q0 + D7*D6*D5*/D4*D3*D2*/D1*D0=20 + D7*D6*D5*D4*D3*/D2*/D1*D0=20 + D7*D6*/D5*D4*D3*D2*D1*D0 + D7*D6*D5*D4*/D3*/D2*/D1*/D0 Q0 =3D D8*Q3 + D7*/D6*D5*D4*/D3*/D2*/D1*/D0=20 + D7*D6*D5*D4*D3*/D2*/D1*D0=20 + D7*D6*D5*D4*/D3*/D2*/D1*/D0 + D7*D6*D5*D4*/D3*/D2*/D1*/D0 + D7*D6*D5*D4*D3*/D2*D1*D0

Reply by ●October 5, 20142014-10-05

On 05/10/2014 18:24, Don Y wrote:> On 10/5/2014 9:19 AM, N_Cook wrote: >> Assuming one back-plane to consider , what would be most efficient >> component-count/least complex discrete/CMOS/74 route , ie not >> pic/Pi/uC to >> firstly convert the ex-oring business to proper levels and then the >> "mapping", >> output could be linear per digit rather than bcd. >> Starting with an off-the-shelf commercial unit where the LCD display >> is driven >> off a uC, to give a remotely monitorable feed > > First, you'd need to characterize the drive -- how much skew is > there between backplane drive and segment on/off drives (any skew > will appear as potential glitches on a static, combinatorial > logic decoder so you would have to *sample* the decoded outputs > at some epsilon after each BP clock edge). > > [epsilon can be large-ish if a MCU is "decoding in software". > Also, consider temperature effects on the drive] > > You would also need to look at the particular "font" that is > implemented: do 6's have tails? what about 9's? (sometimes > 6 will have but 9 won't). > > And, any "other characters" that the display might present from > time to time (e.g., 'A', 'o', 'P', 'H', 'h', 'e', 'L', 'E', etc.) > that might collide with some of the "don't cares" in your > decoder logic. > > The basic approach is simple: just build some Karnaugh maps > describing each segment's performance. Then, cover the most > appropriate ones with minterms to get your *desired* outputs > (subject to the above notes) > > Note that it is *really* important to understand how the display > is actually being driven. You can play games with the visual > characteristics of LCD's by driving them in unconventional (yet > "legal") ways.The other consideration is often there is a contrast control which AFAIK is variation of the fractional step change voltages, so more complication unless you set for one contrast setting only

Reply by ●October 5, 20142014-10-05