There have been previous suggestions to use a small PLD for this purpose. Here's my solution;
Code: Select all
Name sevenseg;
Partno AN001;
Revision 01;
Date 1/14/19;
Designer M. Bakula;
Company Tristate Mechatronics;
Location Lake Mary, FL;
Assembly Front Panel;
Device g16v8a;
/******************************************************/
/* */
/* sevenseg - hex to seven segment decoder. */
/* */
/* binary on pins 2-5 produces segment outputs */
/* 7 segment on pins 12 -18. */
/* */
/******************************************************/
/** Inputs **/
Pin [2..5] = [I0..3];
/** Outputs **/
Pin [12..18] = [Q0..6];
/** Var Declarations **/
Field input = [I3..0];
Field output = [Q6..0];
/** Logic Equations **/
Table input => output {
'b'0000 => 'b'0000001;
'b'0001 => 'b'1001111;
'b'0010 => 'b'0010010;
'b'0011 => 'b'0000110;
'b'0100 => 'b'1001100;
'b'0101 => 'b'0100100;
'b'0110 => 'b'0100000;
'b'0111 => 'b'0001111;
'b'1000 => 'b'0000000;
'b'1001 => 'b'0001100;
'b'1010 => 'b'0001000;
'b'1011 => 'b'1100000;
'b'1100 => 'b'0110001;
'b'1101 => 'b'1000010;
'b'1110 => 'b'0110000;
'b'1111 => 'b'0111000;
}I compiled this with WinCUPL, and programmed an Atmel ATF16V8B-15PU with the resulting .jed file, using a MiniPro TL866CS. The attached photo shows the results. Other than WinCUPL crashing (I think due to issues with Windows 10, but I'm not a Windows person,) it was quite simple to create the chip. When my planned LED displays come in, I'll probably play with the pin assignments to make integration on a breadboard easier.