6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Oct 05, 2024 4:26 pm

All times are UTC




Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2, 3  Next
Author Message
PostPosted: Thu Aug 11, 2022 12:14 pm 
Offline
User avatar

Joined: Mon Aug 30, 2021 11:52 am
Posts: 287
Location: South Africa
Just a random project that I've been working on / shamelessly stole from Doug Gabbard

It takes 8 input lines and converts them into 2 digit hexadecimal display using an ATF22V10C.

Attachment:
Dual Seven Segment Hex Display.gif
Dual Seven Segment Hex Display.gif [ 23.69 MiB | Viewed 1503 times ]
Apparently this should have been possible using an ATF16V8 (which is half the price) but the only source I could find was in Russian. Both need a clock to select which digit is being displayed. I'm using a 555 timer at 300Hz.

I used a TL866 II programmer and XG Pro version 12.01 to program it. Yes. Really. that link is legit. Yes, the version of XG Pro does matter though it only has to be later than version 5 or something.

I used WinCUPLto recompile my modified versions of Doug's original files. All I did was re-order the output pins to be a little more PCB friendly and added an output enable for both digits.

Tested with an ATF22V10C-5JX and an ATF22V10C-10SU. In theory the '22V10 needs a fast rising clock so I ran my 555 timer (with a rise time of about 150ns) through a Schmitt triggered buffer but in the end it worked fine without it. The LEDs I'm using are common cathode Kingbright KCDC03-123s and they have got to be some of the nastiest soldering I've done (the pins are pitched 1.5mm instead of the usual 1.27mm that would have just fitted on an adapter PCB).

You can find the source here in my github repo or just use the attached .jed file.

I find this way more understandable for debugging what is going on on a bus compared to using an 8 LED bar. I hope it's useful to someone!


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 12:30 pm 
Offline
User avatar

Joined: Mon Aug 30, 2021 11:52 am
Posts: 287
Location: South Africa
And ... I forgot to attach the schematic...
Attachment:
Dual seven segement HEX display schematic.png
Dual seven segement HEX display schematic.png [ 240.94 KiB | Viewed 1497 times ]
And the .jed file wouldn't attached so I've zipped it up and attached it here.


Attachments:
DualHex7Seg.zip [1.18 KiB]
Downloaded 34 times
Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 12:48 pm 
Offline
User avatar

Joined: Wed Jul 27, 2022 6:14 am
Posts: 54
Nice one,
funny, just a week ago, i have done this, too. (viewtopic.php?f=10&t=7284#p94683) Without enable. But with the possibility to use the dot with two more inputs.

I think dual hex with the 16v8 is a little bit more complicated, because you will need 2 digit outputs. There is the possibility to use one common cathode and one common anode display, so you can use only one pin for the digit selection. I'll tried this, too, but I could not reduce the number of terms for segment A,C and E to 8. That's why I gave up at some point and went for the 22V10.
(https://github.com/willie68/WCPLD/blob/ ... small.wpld)

Code:
Pin Variable                                    Pterms   Max     Min   
Pol   Name              Ext     Pin     Type     Used   Pterms  Level   
--- --------            ---     ---     ----    ------  ------  -----   

    A                           15       V        10      8       4     
    AADD                        0        F        -       -       -     
    AIA                         2        V        -       -       -     
    AIB                         3        V        -       -       -     
    AIC                         4        V        -       -       -     
    AID                         5        V        -       -       -     
    B                           17       V        8       8       4     
    BADD                        0        F        -       -       -     
    BIA                         6        V        -       -       -     
    BIB                         7        V        -       -       -     
    BIC                         8        V        -       -       -     
    BID                         9        V        -       -       -     
    C                           16       V        9       8       4     
    CLK                         1        V        -       -       -     
    D                           14       V        7       8       4     
    E                           18       V        9       8       4     
    F                           13       V        8       8       4     
    G                           12       V        1       8       4     
    OEAB                        19       V        1       8       4     
    OUTPUT                      0        F        -       -       -   

_________________
don't count on me, i'm engineer (Animotion)
my arduino pages: http://rcarduino.de


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 2:03 pm 
Offline
User avatar

Joined: Wed Jul 27, 2022 6:14 am
Posts: 54
Ha, :mrgreen:, a little research and I found the solution for using 16V8.
The trick is to do the equations with negative logic instead of positive logic and then later invert the output pins. In our case, there are fewer terms. Imagine using a common anode display. At 0 the LED lights up, at 1 it doesn't. (Afterwards we can simply flip the polarity of the pin for our common cathode display.)
For the inverse case, there are simply far fewer equations.
Code:
/* *************** INPUT PINS *********************/
PIN  1 = CLK;
PIN  2 = AIA;
PIN  3 = AIB;
PIN  4 = AIC;
PIN  5 = AID;
PIN  6 = BIA;
PIN  7 = BIB;
PIN  8 = BIC;
PIN  9 = BID;

/* *************** OUTPUT PINS *********************/
PIN  19 = OEAB ;
PIN  18 = !E ;
PIN  17 = !B ;
PIN  16 = !C ;
PIN  15 = !A ;
PIN  14 = !D ;
PIN  13 = !F ;
PIN  12 = !G ;
/* ************* Declarations **********************/

FIELD AADD = [CLK,AID,AIC,AIB,AIA] ;
FIELD BADD = [CLK,BID,BIC,BIB,BIA] ;
FIELD OUTPUT = [A,B,C,D,E,F,G] ;

/********* EQUATIONS ****************/
OEAB = !CLK;
/* 7-Segment A */
TABLE AADD => OUTPUT {
'b'00000=>'b'00000011 ; /* 0 */
'b'00001=>'b'10011111 ; /* 1 */
'b'00010=>'b'00100101 ; /* 2 */
'b'00011=>'b'00001101 ; /* 3 */
'b'00100=>'b'10011001 ; /* 4 */
'b'00101=>'b'01001001 ; /* 5 */
'b'00110=>'b'01000001 ; /* 6 */
'b'00111=>'b'00011111 ; /* 7 */
'b'01000=>'b'00000001 ; /* 8 */
'b'01001=>'b'00011001 ; /* 9 */
'b'01010=>'b'00010001 ; /* A */
'b'01011=>'b'11000001 ; /* B */
'b'01100=>'b'01100011 ; /* C */
'b'01101=>'b'10000101 ; /* D */
'b'01110=>'b'01100001 ; /* E */
'b'01111=>'b'01110001 ; /* F */
}

/* 7-Segment B */
TABLE BADD => OUTPUT {
'b'10000=>'b'00000011 ; /* 0 */
'b'10001=>'b'10011111 ; /* 1 */
'b'10010=>'b'00100101 ; /* 2 */
'b'10011=>'b'00001101 ; /* 3 */
'b'10100=>'b'10011001 ; /* 4 */
'b'10101=>'b'01001001 ; /* 5 */
'b'10110=>'b'01000001 ; /* 6 */
'b'10111=>'b'00011111 ; /* 7 */
'b'11000=>'b'00000001 ; /* 8 */
'b'11001=>'b'00011001 ; /* 9 */
'b'11010=>'b'00010001 ; /* A */
'b'11011=>'b'11000001 ; /* B */
'b'11100=>'b'01100011 ; /* C */
'b'11101=>'b'10000101 ; /* D */
'b'11110=>'b'01100001 ; /* E */
'b'11111=>'b'01110001 ; /* F */
}

At the moment this is only theoretical, but after work, i can prove this with real hardware...
actual output from cupl:
Code:
Pin Variable                                    Pterms   Max     Min   
Pol   Name              Ext     Pin     Type     Used   Pterms  Level   
--- --------            ---     ---     ----    ------  ------  -----   

 !  A                           15       V        8       8       4     
    AADD                        0        F        -       -       -     
    AIA                         2        V        -       -       -     
    AIB                         3        V        -       -       -     
    AIC                         4        V        -       -       -     
    AID                         5        V        -       -       -     
 !  B                           17       V        6       8       4     
    BADD                        0        F        -       -       -     
    BIA                         6        V        -       -       -     
    BIB                         7        V        -       -       -     
    BIC                         8        V        -       -       -     
    BID                         9        V        -       -       -     
 !  C                           16       V        8       8       4     
    CLK                         1        V        -       -       -     
 !  D                           14       V        6       8       4     
 !  E                           18       V        8       8       4     
 !  F                           13       V        6       8       4     
 !  G                           12       V        1       8       4     
    OEAB                        19       V        1       8       4     
    OUTPUT                      0        F        -       -       -     

_________________
don't count on me, i'm engineer (Animotion)
my arduino pages: http://rcarduino.de


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 2:15 pm 
Offline
User avatar

Joined: Mon Aug 30, 2021 11:52 am
Posts: 287
Location: South Africa
willie68 wrote:
Nice one ...

I think dual hex with the 16v8 is a little bit more complicated, because you will need 2 digit outputs.

Thanks! yours too!

I went and dug up the Russian site where someone as managed to use an ATF16V8

And I see you've just posted the solution whilst I was typing this :D

Although I think, trying to decipher the link I posted, it looks like his version needs four timing (high) signals rather than two. I guess maybe that is controlling each of the four common pins individually to multiplex out a half of each digit every quarter time. Or something. [EDIT]Nope, that's not it. No idea why he has 4 enable signals.

I've settled on the '22V10 as it just works and they're about USD0.50 here at RS components 8)


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 4:14 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1005
Location: Canada
I built up a few hex displays a few years back for debugging purposes. I used a couple of 14495s and a 74xx574. They work pretty good.

Image
Image

http://forum.6502.org/viewtopic.php?f=4&t=5679#p69335

_________________
Bill


Last edited by BillO on Thu Aug 11, 2022 6:14 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 4:24 pm 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
willie68 wrote:
... but I could not reduce the number of terms for segment A,C and E to 8.

Try using the Quine-McCluskey minimization compiler option. I got the code to compile with that.


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 7:35 pm 
Offline
User avatar

Joined: Mon Aug 30, 2021 11:52 am
Posts: 287
Location: South Africa
BillO wrote:
I built up a few hex displays a few years back for debugging purposes. I used a couple of 14495s and a 74xx574. They work pretty good.
Cool! I must have run into the MC14495 at some time because the DigiKey link is purple in my browser. I don't remember ever looking at it or what it does though :shock:

Looking at the prices in I suspect I know why I didn't consider it. They're running R150 to R270 on Alibaba for a single IC whereas I can buy a (tube of) ATF22V10S-10s for R9 each. I'd love if they were cheaper (and available somewhere locally) it would have been so much easier than mucking around with programmable chips.

Speaking of available, I kinda wishsomeone would just sell a consumer bus debugging HEX display thing. It seems like a wheel that gets reinvented often.

I was thinking of a PCB very similar to yours but with VCC and GND moved to the top of the board so that they don't get in the way of anything else next to the bus pins. Something like this (still a work in progress):
Attachment:
7 Segment Reader.png
7 Segment Reader.png [ 579.17 KiB | Viewed 1435 times ]
(I also put the clock on the board and have left and right version so I can place them side-by-side for a 16 bit number).


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 8:14 pm 
Offline
User avatar

Joined: Sat Jul 24, 2021 1:37 pm
Posts: 282
Shameless plug as I believe this is very relevant to this thread: I have a YouTube series where I go through building such a module. Last episode was talking about the MC14495, and next episode will be talking about doing it with a 16V8. The ultimate goal is to show how to design the module below using an ATmega MCU.

Attachment:
Screenshot 2022-08-11 at 22.13.12.png
Screenshot 2022-08-11 at 22.13.12.png [ 9.92 MiB | Viewed 1426 times ]

_________________
BB816 Computer YouTube series


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 11:44 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1005
Location: Canada
I usually get my MC14495 supply of an ebay seller that has been trustworthy over the years. I get them for about $2.00 CDN each.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Thu Aug 11, 2022 11:45 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1005
Location: Canada
akohlbecker wrote:
Shameless plug as I believe this is very relevant to this thread: I have a YouTube series where I go through building such a module. Last episode was talking about the MC14495, and next episode will be talking about doing it with a 16V8. The ultimate goal is to show how to design the module below using an ATmega MCU.

Image
Nice compact module!

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 12, 2022 6:57 am 
Offline
User avatar

Joined: Wed Jul 27, 2022 6:14 am
Posts: 54
tmr4 wrote:
willie68 wrote:
... but I could not reduce the number of terms for segment A,C and E to 8.

Try using the Quine-McCluskey minimization compiler option. I got the code to compile with that.

No, tried every possible minimization code (0..4), but always got this:
Code:
Pin Variable                                    Pterms   Max     Min   
Pol   Name              Ext     Pin     Type     Used   Pterms  Level   
--- --------            ---     ---     ----    ------  ------  -----   

    A                           15       V        12      8       4     
    AADD                        0        F        -       -       -     
    AIA                         2        V        -       -       -     
    AIB                         3        V        -       -       -     
    AIC                         4        V        -       -       -     
    AID                         5        V        -       -       -     
    B                           17       V        12      8       4     
    BADD                        0        F        -       -       -     
    BIA                         6        V        -       -       -     
    BIB                         7        V        -       -       -     
    BIC                         8        V        -       -       -     
    BID                         9        V        -       -       -     
    C                           16       V        10      8       4     
    CLK                         1        V        -       -       -     
    D                           14       V        10      8       4     
    E                           18       V        8       8       4     
    F                           13       V        10      8       4     
    G                           12       V        10      8       4     
    OEA                         19       V        1       8       4     
    OUTPUT                      0        F        -       -       -     

_________________
don't count on me, i'm engineer (Animotion)
my arduino pages: http://rcarduino.de


Top
 Profile  
Reply with quote  
PostPosted: Fri Aug 12, 2022 3:32 pm 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
willie68 wrote:
No, tried every possible minimization code (0..4) ...

My mistake. I didn't realize your github code was already modified to the inverted form.


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 13, 2022 7:39 am 
Offline
User avatar

Joined: Wed Jul 27, 2022 6:14 am
Posts: 54
akohlbecker wrote:
Shameless plug as I believe this is very relevant to this thread: I have a YouTube series where I go through building such a module. Last episode was talking about the MC14495, and next episode will be talking about doing it with a 16V8. The ultimate goal is to show how to design the module below using an ATmega MCU.

Attachment:
Screenshot 2022-08-11 at 22.13.12.png

Nice. Several years ago I try to do something like this on my own. But for me soldering SMD is not an option. The QFP should be Ok, but even with 1206 resistor I have already problems.dont think about 0805 or even 0603...

_________________
don't count on me, i'm engineer (Animotion)
my arduino pages: http://rcarduino.de


Top
 Profile  
Reply with quote  
PostPosted: Sat Aug 13, 2022 8:11 am 
Offline
User avatar

Joined: Mon Aug 30, 2021 11:52 am
Posts: 287
Location: South Africa
akohlbecker wrote:
Shameless plug as I believe this is very relevant to this thread: I have a YouTube series where I go through building such a module. Last episode was talking about the MC14495, and next episode will be talking about doing it with a 16V8. The ultimate goal is to show how to design the module below using an ATmega MCU.
It was your video on building a HEX display that inspired me to build one for myself, big thanks for that!

I thought of using a Raspberry Pico but... a) it's quite big and b) it's sensitive to a slow rise or noise on its power input line which causes it to either not boot or crash. I also thought of using the RP2040 directly but it's beyond my ability to solder (or program without the Pico dev board).

The diode ROM mentioned in this thread is very appealing from the view that it only needs a soldering iron to build. No mucking with software compilers and programmers or programmer hardware.

willie68 wrote:
I think dual hex with the 16v8... (https://github.com/willie68/WCPLD/blob/ ... small.wpld)
Ultimately I'd like to use the ATF16V8BQL-15XU because it's only 6.6mm x 4.5mm and would fit on the back of the surface mount Kingbright displays I'm using (along with the '555). If anyone manages to get a dual hex display going with a '16V8 that'd be awesome but it's not a tangent I want to go off on as I'm already, like, three major tangents deep :roll:


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page 1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: