Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Bi-directional LED ?

Status
Not open for further replies.
WOw, then each 7-segment display has different patterns for different number, the program is increased.
The diodes have to be able to withstand being reverse biased at the controllers driving levels though.
Sorry but I don't understand this. But I use PNP for common anode, works fine.

Thanks
 
bananasiong said:
charlieplexing!! I thought it is the same as multiplexing.. we need to send the signal to one port only for displaying eight 7-segment displays right? That's smarter than multiplexing.

Can't I use PNP for common anode, can I?

EDIT: Can I still use the look up table if I use charlieplexing? The pattern for displaying the same number for the different 7-segment display seems to be different.
Charlieplexing advantage is reduced I/O pins. Disadvantages are non-standard display wiring and brightness limited due to I/O pin current limits.

Charlieplexing common anode displays requires an active high column driver signal and that's why I'm using NPN column drivers. Though you could use a PNP if you want to use two transistors for each column driver.

Yes, you use the same segment lookup tables (example below). The ISR driver (example in a previous post) takes care of that "floating" bit/pin wiring pattern.

Code:
SegData
        andlw   b'00001111'     ;                                 |B0
        movwf   TEMP            ;                                 |B0
        movlw   high SegTable   ;                                 |B0
        movwf   PCLATH          ;                                 |B0
        movlw   low  SegTable   ;                                 |B0
        addwf   TEMP,W          ;                                 |B0
        skpnc                   ;                                 |B0
        incf    PCLATH,f        ;                                 |B0
        movwf   PCL             ;                                 |B0

SegTable
        dt      b'00111111'     ; "0"   -|F|E|D|C|B|A
        dt      b'00000110'     ; "1"   -|-|-|-|C|B|-
        dt      b'01011011'     ; "2"   G|-|E|D|-|B|A
        dt      b'01001111'     ; "3"   G|-|-|D|C|B|A
        dt      b'01100110'     ; "4"   G|F|-|-|C|B|-
        dt      b'01101101'     ; "5"   G|F|-|D|C|-|A
        dt      b'01111101'     ; "6"   G|F|E|D|C|-|A
        dt      b'00000111'     ; "7"   -|-|-|-|C|B|A
        dt      b'01111111'     ; "8"   G|F|E|D|C|B|A
        dt      b'01101111'     ; "9"   G|F|-|D|C|B|A
        dt      b'00000000'     ; " "   -|-|-|-|-|-|- 'nul' char
        dt      b'01000000'     ; "-"   G|-|-|-|-|-|- 'minus'
 
Last edited:
Yes, in a traditional multiplexed common anode design like the one below, you would normally use active low PNP or P-channel MOSFET column driver transistors.

**broken link removed**
 
Thank you for the suggestion. I have lighted switches spec'd and sourced and use them in different projects.

This project is designed to be very inexpensive and so I didn't want to include lighted switches. However, I thought it would be very cool if you could use a 10 cent LED as a switch or as a switch and indicator.
 
Then probably as a simple/cheap technique you can try to glue a smd LED on a pcb mounatable push switch, and have the switches behind a plastic membrane :)
 
mvadu said:
Then probably as a simple/cheap technique you can try to glue a smd LED on a pcb mounatable push switch, and have the switches behind a plastic membrane :)

No... Too tricky and potentially mechanically unsound.
 
Just use a conductive epoxy, that's how mebrane switch makers mount surface mount LED's on their memebrane panels, I think they even make it clear, though finding a supplier of the stuff might not be easy. It also usually has a short shelf life and specific storage requirements.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top