# binary to hex display decoder

Thread Starter

#### Robin Mitchell

Joined Oct 25, 2009
819
Are there any four bit to hex display chips for seven seg displays?
There are none in the 4000 series so....any around?

#### blueroomelectronics

Joined Jul 22, 2007
1,757
The very old and expensive TIL311 was the closest thing I found. There was a discussion here awhile back on using a PIC.

Thread Starter

#### Robin Mitchell

Joined Oct 25, 2009
819
what retard in the electornics industry decided to make EVERY BLOODY seven seg decoder not use HEX....its the most bloody used thing!

#### tom66

Joined May 9, 2009
2,595
what retard in the electornics industry decided to make EVERY BLOODY seven seg decoder not use HEX....its the most bloody used thing!
The guy who said, "This chip needs to be fast, and low cost. We can omit hex, because very few people count hex."

Thread Starter

#### Robin Mitchell

Joined Oct 25, 2009
819
Z80!!!! All processors!!! Assembly!!!!!
We all need hex!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

#### spinnaker

Joined Oct 29, 2009
7,835
Just use a shift register. That us what I did. I have code for a PIC. Just let me know if you are interested.

#### blueroomelectronics

Joined Jul 22, 2007
1,757
The MAX6954 is an SPI to seven segment driver. The OP wants binary.

#### Markd77

Joined Sep 7, 2009
2,806
There are a couple of results if you search for MC14495 on ebay
Bit pricey, but does the job.

Thread Starter

#### Robin Mitchell

Joined Oct 25, 2009
819
I just made a PIC program where it can drive up to 16 seven seg diplays. It needs four IO ports (A to D) and you have the following:
Port A - 8 bit binary number
Port B - The address to save the number / the other four pins are control
Port C - The address selector ( selects which dispaly you want to drive)
Port D - The seven seg out

the trick is to split the 8 bit number into two four bit numbers and then save the first fourbit number into address (x) and the second number into address(x+1)

So when it displays the hex you get an 8 bit number into two hex displays
What do ya think...its also my first free product for the PIC18F45K20

#### tom66

Joined May 9, 2009
2,595
I just made a PIC program where it can drive up to 16 seven seg diplays. It needs four IO ports (A to D) and you have the following:
Port A - 8 bit binary number
Port B - The address to save the number / the other four pins are control
Port C - The address selector ( selects which dispaly you want to drive)
Port D - The seven seg out

the trick is to split the 8 bit number into two four bit numbers and then save the first fourbit number into address (x) and the second number into address(x+1)

So when it displays the hex you get an 8 bit number into two hex displays
What do ya think...its also my first free product for the PIC18F45K20
It seems you started liking microcontrollers after you fixed all of your problems with the PICkit 3...

Thread Starter

#### Robin Mitchell

Joined Oct 25, 2009
819
yup...thanks tom

#### spinnaker

Joined Oct 29, 2009
7,835
I just made a PIC program where it can drive up to 16 seven seg diplays. It needs four IO ports (A to D) and you have the following:
Port A - 8 bit binary number
Port B - The address to save the number / the other four pins are control
Port C - The address selector ( selects which dispaly you want to drive)
Port D - The seven seg out

the trick is to split the 8 bit number into two four bit numbers and then save the first fourbit number into address (x) and the second number into address(x+1)

So when it displays the hex you get an 8 bit number into two hex displays
What do ya think...its also my first free product for the PIC18F45K20

So that is 24 pins??? Yikes!

I would think you could do better with POV. You would probably want t a decoder chip or two to select each of the displays.

Thread Starter

#### Robin Mitchell

Joined Oct 25, 2009
819
but its a damn good chip
I could use a tiny pic which would take a single Hex number in and drive a single display...this one is for use with cpus like z80 so seeing the data is easier...

#### MMcLaren

Joined Feb 14, 2010
853
Sorry for the late reply but I just wanted to mention that this old design works quite well... Use two of them to display a 16-bit number (example silkscreen below)...

Regards, Mike

Rich (BB code):
;
;  // psuedo C code program example
;
;  char DigSel = 0;                     // digit select, 0 or 128
;
;  char SegData [] = { 0b00111111,      // "0"   -|-|F|E|D|C|B|A
;                      0b00000110,      // "1"   -|-|-|-|-|C|B|-
;                      0b01011011,      // "2"   -|G|-|E|D|-|B|A
;                      0b01001111,      // "3"   -|G|-|-|D|C|B|A
;                      0b01100110,      // "4"   -|G|F|-|-|C|B|-
;                      0b01101101,      // "5"   -|G|F|-|D|C|-|A
;                      0b01111101,      // "6"   -|G|F|E|D|C|-|A
;                      0b00000111,      // "7"   -|-|-|-|-|C|B|A
;                      0b01111111,      // "8"   -|G|F|E|D|C|B|A
;                      0b01101111,      // "9"   -|G|F|-|D|C|B|A
;                      0b01110111,      // "A"   -|G|F|E|-|C|B|A
;                      0b01111100,      // "b"   -|G|F|E|D|C|-|-
;                      0b00111001,      // "C"   -|-|F|E|D|-|-|A
;                      0b01011110,      // "d"   -|G|-|E|D|C|B|-
;                      0b01111001,      // "E"   -|G|F|E|D|-|-|A
;                      0b01110001 };    // "F"   -|G|F|E|-|-|-|A
;
;  void Main()
;  { char temp = porta;                 // sample input
;    CMCON = 7;                         // turn comparator off
;    TRISA = 255;                       // Port A all inputs
;    TRISB = 0;                         // Port B all outputs
;    while(1)                           // loop forever
;    { if(DigSel.b7)                    // if left (hi) digit
;        temp /= 16;                    // use hi nibble, 0..15
;      else                             // otherwise
;        temp &= 15;                    // use lo nibble, 0..15
;      temp = SegData[temp];            // get segment data
;      temp |= DigSel;                  // pick up digit select bit
;      PORTB = temp;                    // update display
;      DelayUS(8000-23);                // delay 8-msecs total
;      DigSel ^= 128;                   // toggle digit select bit
;    }
;  }
;

#### Attachments

• 23.4 KB Views: 326
• 31.1 KB Views: 316
• 80.1 KB Views: 45
Last edited:
Similar threads