Author Topic: Binary to Hex on seven segment  (Read 11247 times)

0 Members and 1 Guest are viewing this topic.

Offline Dan MoosTopic starter

  • Frequent Contributor
  • **
  • Posts: 357
  • Country: us
Binary to Hex on seven segment
« on: March 15, 2017, 04:31:50 am »
Simple question. Is there a super simple way (single chip?) to go from 8 bit binary to 2 digit Hex on a dual seven seg display? Without resorting to a MCU?
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13119
Re: Binary to Hex on seven segment
« Reply #1 on: March 15, 2017, 04:55:28 am »
Sure: Find a pair of the long obsolete Texas Instruments TIL311 displays as  N.O.S.  Expect to pay through the nose with the blood of your firstborn for the privilege of avoiding using a simple MCU.

« Last Edit: March 15, 2017, 04:57:59 am by Ian.M »
 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1448
  • Country: us
  • Very dangerous - may attack at any time
Re: Binary to Hex on seven segment
« Reply #2 on: March 15, 2017, 05:04:16 am »
MC14495 and DM9368

They both have been out of production for decades and are expensive.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13119
Re: Binary to Hex on seven segment
« Reply #3 on: March 15, 2017, 05:08:38 am »
N.B. 74LS47 is *NOT* suitable for a HEX dosplay. Its BCD only and displays obscure symbols for A-E and blanks for F.
 

Offline obiwanjacobi

  • Super Contributor
  • ***
  • Posts: 1013
  • Country: nl
  • What's this yippee-yayoh pin you talk about!?
    • Marctronix Blog
Re: Binary to Hex on seven segment
« Reply #4 on: March 15, 2017, 06:56:29 am »
You could also try program a Gal/Pal....
Arduino Template Library | Zalt Z80 Computer
Wrong code should not compile!
 

Offline Luminax

  • Regular Contributor
  • *
  • Posts: 159
  • Country: my
    • Electronesk
Re: Binary to Hex on seven segment
« Reply #5 on: March 15, 2017, 07:44:10 am »
Problem with 7-segment is you get A b C d E F which is kinda inelegant... but eh if it works for you
Then again... single chip... hmmmm
I sure can do it with a few discrete logic gates but single chip I have no knowledge of
Jack of all trade - Master of some... I hope...
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13119
Re: Binary to Hex on seven segment
« Reply #6 on: March 15, 2017, 08:06:33 am »
Futurelec still has the MC14495, but you wont like the price, nor the need for one per digit.
http://www.futurlec.com/Motorola/MC14495P1pr.shtml

There seem to be a number of sellers for the TIL311 display on EBAY.  Its also stocked by Jameco at an even more ludicrous price.
http://www.jameco.com/z/TIL311-Texas-Instruments-Hexadecimal-Display-11-Pin-DIP_32951.html
« Last Edit: March 15, 2017, 08:09:44 am by Ian.M »
 

Online Benta

  • Super Contributor
  • ***
  • Posts: 6257
  • Country: de
Re: Binary to Hex on seven segment
« Reply #7 on: March 15, 2017, 08:14:38 am »
You could also use dot-matrix displays with built in decoder.
Avago/Broadcom has them, but IIRC they are pretty expensive:
https://www.broadcom.com/products/leds-and-displays/smart-alphanumeric-displays/parallel-interface/

Something like 2 pcs. HDSP-0762
 

Offline ebclr

  • Super Contributor
  • ***
  • Posts: 2331
  • Country: 00
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8413
Re: Binary to Hex on seven segment
« Reply #9 on: March 15, 2017, 09:52:31 am »
MC14489? Slightly cheaper than the other alternatives here and can handle up to 5 displays.
 

Offline grumpydoc

  • Super Contributor
  • ***
  • Posts: 2906
  • Country: gb
Re: Binary to Hex on seven segment
« Reply #10 on: March 15, 2017, 10:10:35 am »
(E)PROM or GAL.

Never understood why this wasn't available as a standard TTL function.
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Binary to Hex on seven segment
« Reply #11 on: March 16, 2017, 12:33:11 am »
The Fairchild DM9368 is another one that did that. 

Obsolete and no longer produced, of course, but $1.50 each on Aliexpress.  Almost certainly used pulls but if they work and it is just a one-off project rather than trying to produce something, why not?  (Other than the wait time if you can't find any MC14495 or DM9368 from anywhere other than China, of course...)
 

Online Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3486
  • Country: ca
  • Place text here.
Re: Binary to Hex on seven segment
« Reply #12 on: March 16, 2017, 01:11:07 am »
An EPROM comes to mind. That's not an MCU.
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Binary to Hex on seven segment
« Reply #13 on: March 16, 2017, 03:32:00 am »
A simple PLD does not have quite enough outputs to drive two displays unless multiplexing is used.  A complex PLD does though and can be had for less than $2 but a 16 bit wide EPROM is about that price as well.

I hate to say it but the cheapest solution may be a Microchip PIC programmed to do the decoding.  8 input pins and 14 output pins requires 22 I/Os so the 28 pin packages are not quite good enough but the larger packages are.  Or a pair of 18 pin PICs can do it for almost the same price which has layout advantages.

I have no idea why there was never a common pin compatible hexadecimal decoder version of the 7447.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13119
Re: Binary to Hex on seven segment
« Reply #14 on: March 16, 2017, 04:00:42 am »
OTOH with two external transistors to support a reasonable brightness while multiplexing, the MCU pin requirement drops to 17 I/Os, possible on a 20 pin PIC, and it also reduces the number of resistors needed.  The code would be almost trivially simple as well.

A more interesting challenge would be to come up with a minimum total pin-count solution that only uses parts currently in production available off-the-shelf without programming or special ordering of preprogrammed chips - 8 bit parallel in, 2x 7 segment LED out, and to consider if the solution would scale well to 6 digits e.g, monitoring a 16 bit address busd + and 8 bit data bus.
« Last Edit: March 16, 2017, 04:03:18 am by Ian.M »
 

Offline Luminax

  • Regular Contributor
  • *
  • Posts: 159
  • Country: my
    • Electronesk
Re: Binary to Hex on seven segment
« Reply #15 on: March 16, 2017, 08:14:37 am »
A simple PLD does not have quite enough outputs to drive two displays unless multiplexing is used.  A complex PLD does though and can be had for less than $2 but a 16 bit wide EPROM is about that price as well.

I hate to say it but the cheapest solution may be a Microchip PIC programmed to do the decoding.  8 input pins and 14 output pins requires 22 I/Os so the 28 pin packages are not quite good enough but the larger packages are.  Or a pair of 18 pin PICs can do it for almost the same price which has layout advantages.

I have no idea why there was never a common pin compatible hexadecimal decoder version of the 7447.

I would say that it is due to the reason I mentioned above, I have seldom came across a system with 7-segment that displays hex regularly or even sparsely. I've came across a few with the 14 segments though...

Reiterating my personal opinion, I think it looks ugly to display hex on 7 segments
Jack of all trade - Master of some... I hope...
 

Online macboy

  • Super Contributor
  • ***
  • Posts: 2288
  • Country: ca
Re: Binary to Hex on seven segment
« Reply #16 on: March 16, 2017, 11:57:26 am »
A simple PLD does not have quite enough outputs to drive two displays unless multiplexing is used.  A complex PLD does though and can be had for less than $2 but a 16 bit wide EPROM is about that price as well.

I hate to say it but the cheapest solution may be a Microchip PIC programmed to do the decoding.  8 input pins and 14 output pins requires 22 I/Os so the 28 pin packages are not quite good enough but the larger packages are.  Or a pair of 18 pin PICs can do it for almost the same price which has layout advantages.

I have no idea why there was never a common pin compatible hexadecimal decoder version of the 7447.
The reason is that the logic to decide the 16 characters is significantly more complex than that to decide 10. That means a bigger die and higher cost. I believe that I actually read this in an old dataset for one manufacturer's version long ago.

A 28 pin PIC can easily do 22 I/O, especially if one uses the internal oscillator. The number of LOC for this function would measure in the dozens, and I personally would use assembly just due to the simplicity of the solution (a loop with a lookup table for each nibble).
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Binary to Hex on seven segment
« Reply #17 on: March 16, 2017, 12:32:22 pm »
A 28 pin PIC can easily do 22 I/O, especially if one uses the internal oscillator. The number of LOC for this function would measure in the dozens, and I personally would use assembly just due to the simplicity of the solution (a loop with a lookup table for each nibble).

I assumed the internal oscillator would be used but even so, the ones I looked at came up 2 I/O pins short but maybe one of the more expensive 28 pin parts has enough I/O pins.
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13119
Re: Binary to Hex on seven segment
« Reply #18 on: March 16, 2017, 12:56:43 pm »
The 28 pin 8 bit PICs typically have 4 pins you cant use for output - 2 Vss, 1 Vdd and /MCLR - leaving 24 I/Os available. Some have a low voltage core with a decoupling cap pin for the core regulator. USB devices loose you a decoupling pin + two data pins.  However on non-USB 8 bit 28 pin PICs you'll certainly have at least 23 I/O pins available..
 

Online macboy

  • Super Contributor
  • ***
  • Posts: 2288
  • Country: ca
Re: Binary to Hex on seven segment
« Reply #19 on: March 16, 2017, 01:41:51 pm »
A 28 pin PIC can easily do 22 I/O, especially if one uses the internal oscillator. The number of LOC for this function would measure in the dozens, and I personally would use assembly just due to the simplicity of the solution (a loop with a lookup table for each nibble).

I assumed the internal oscillator would be used but even so, the ones I looked at came up 2 I/O pins short but maybe one of the more expensive 28 pin parts has enough I/O pins.

I didn't realize how few 28-pin parts would fit the bill (mostly due to dedicated pins for modern features like USB), but some do. The PIC16F570 for example is only ~$1 and has 24 I/O as three full 8-bit ports.
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17167
  • Country: us
  • DavidH
Re: Binary to Hex on seven segment
« Reply #20 on: March 16, 2017, 05:04:17 pm »
The 28 pin 8 bit PICs typically have 4 pins you cant use for output - 2 Vss, 1 Vdd and /MCLR - leaving 24 I/Os available. Some have a low voltage core with a decoupling cap pin for the core regulator. USB devices loose you a decoupling pin + two data pins.  However on non-USB 8 bit 28 pin PICs you'll certainly have at least 23 I/O pins available.

I know you said typical but the 28 pin DIP/SOIC PIC16F57 has eight dedicated pins:

Vdd
Vss
OSC1/CLKIN
OSC2/CLKOUT
-MCLR/Vpp
T0CKI
N/C
N/C

Which leaves 20 I/O pins on a 28 pin package.  The SSOP of the same device swaps the two N/C pins for an extra Vdd and Vss.  As you and macboy point out however, other 28 pin devices like the 16F570 do not have this problem so there is a single device which can decode 8-bit hexidecimal into two 7-segment displays without multiplexing for $1.28 in a DIP and $1.05 in a SOIC in single unit quantities.

It might still be worth multiplexing because then only 7 current limiting resistors are needed and only 8+7+2=17 I/O pins allowing a smaller and ever so slightly less expensive 20 pin 16F527 do it.

There are also AVR microcontrollers for not much more.
 

Offline Luminax

  • Regular Contributor
  • *
  • Posts: 159
  • Country: my
    • Electronesk
Re: Binary to Hex on seven segment
« Reply #21 on: March 17, 2017, 01:55:59 am »
A 28 pin PIC can easily do 22 I/O, especially if one uses the internal oscillator. The number of LOC for this function would measure in the dozens, and I personally would use assembly just due to the simplicity of the solution (a loop with a lookup table for each nibble).

I assumed the internal oscillator would be used but even so, the ones I looked at came up 2 I/O pins short but maybe one of the more expensive 28 pin parts has enough I/O pins.

I didn't realize how few 28-pin parts would fit the bill (mostly due to dedicated pins for modern features like USB), but some do. The PIC16F570 for example is only ~$1 and has 24 I/O as three full 8-bit ports.

And adding just a few cents more you can get an even more powerful PIC18F, for example the PIC18F25K40 with all pins available for multiplexing/reassigning (except for, of course, 1 VDD and 2 VSS giving you a total of 28-3 => 25 pins)
Jack of all trade - Master of some... I hope...
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Binary to Hex on seven segment
« Reply #22 on: March 17, 2017, 04:22:51 am »
XC9536 CPLD, it's about $1.50 in single quantities and the IO pins can source or sink enough current to drive LEDs.
 

Offline kwass

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: us
Re: Binary to Hex on seven segment
« Reply #23 on: March 17, 2017, 04:46:39 am »
Futurelec still has the MC14495, but you wont like the price, nor the need for one per digit.
http://www.futurlec.com/Motorola/MC14495P1pr.shtml


There's also the Fairchild 9368 for a little less here:  http://www.intertexelectronics.com/IC-Fairchild-DM9368PC-DM9368-IC-Decoder-Driver-Latch-7-segment-Led-P4388.aspx


-katie
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf