common anode to common cathode

Discussion in 'The Projects Forum' started by zorbzz, Mar 21, 2010.

  1. zorbzz

    zorbzz Thread Starter Member

    Joined:
    Jun 16, 2008
    20
    0
    HI does anyone know if its possible to use common cathode 7 seg displays in place of common anode displays?
    I want to build a 4 digit counter but I only have common cathode displays and the the design requires common anode doh!
    The design uses a pic and you can see it on the link below,
    The website has the source code aswell maybe that can be changed to support common cathode??

    Thanks alot.


    http://picprojects.org.uk/projects/counter/counter.htm
     
    Last edited: Mar 21, 2010
    #1
  2. Wendy

    Wendy Moderator

    Joined:
    Mar 24, 2008
    19,826
    1,956
    The datasheets show how to do this. The fairchild version was better, but it has been removed from their website. See page 6 of the attached copy.
     

    Attached Files:

    #2
  3. zorbzz

    zorbzz Thread Starter Member

    Joined:
    Jun 16, 2008
    20
    0
    Thanks.
    So I just need an transistor on all of the cathodes?
     
    Last edited: Mar 21, 2010
    #3
  4. Wendy

    Wendy Moderator

    Joined:
    Mar 24, 2008
    19,826
    1,956
    Not if you're using common cathode. The datasheets show how to use this chip for either display. In the case of a common cathode display you will a transistor for every segment as a driver, the anodes in other words.

    The transistors invert the signal.

    A common theme on decoder chips is multiplexing, where you can have one decoder driving several displays. In this case you might have another transistor that selects which display is on at any one time. Pics may have this already incorporated, I'm not up on their capabilities.
     
    #4
    zorbzz likes this.
  5. zorbzz

    zorbzz Thread Starter Member

    Joined:
    Jun 16, 2008
    20
    0
    Thanks bill, I read somewhere that I can modify the code in the pic to make it into a common cathode display instead of the common anode.
    Does anyone know how to do this?

    The picproject website provides the asm for the project so I might try figure it out, if not ill have to fork out the $$ for the common anode devices as I really like this project.

    Pity i just bought 50 common cathode displays!!!
    hehe
     
    #5
  6. blueroomelectronics

    blueroomelectronics Senior Member

    Joined:
    Jul 22, 2007
    1,758
    97
    I use CC displays in my Dragonfly kit. Schematic is in the manual.
    [​IMG]
     
    #6
  7. BMorse

    BMorse Senior Member

    Joined:
    Sep 26, 2009
    2,673
    233

    in order for it to work with common cathodes, you will have to change all the 1's to 0's and 0's to 1's in this part of the file Counter_Functions.inc :

    Code:
        
        retlw    b'00111111'    ;0
        retlw    b'00000110'    ;1
        retlw    b'01011011'    ;2
        retlw    b'01001111'    ;3
        retlw    b'01100110'    ;4
        retlw    b'01101101'    ;5
        retlw    b'01111101'    ;6
        retlw    b'00000111'    ;7
        retlw    b'01111111'    ;8
        retlw    b'01101111'    ;9
        retlw    b'00000000'    ;blank (10)
        retlw    b'01000000'    ;-     (11)
        retlw    b'01010000'    ; r    (12)
        retlw    b'00011000'    ; L    (13)
    
    as far as I can tell from scanning through the code, that this is the only part that needs to be changed....
    B. Morse
     
    #7
    zorbzz likes this.
  8. MMcLaren

    MMcLaren Well-Known Member

    Joined:
    Feb 14, 2010
    661
    91
    Just use the same NPN column driver transistors on the common cathodes to retain the active high column enable signals. Connect emitter to ground and collector to common cathode. You'll also need to reverse discrete LEDs D6-D9 and rewire that driver transistor too (emitter to ground and collector to common cathodes). Then change one line in counter_main.inc from bsf flags,invert to bcf flags,invert to reverse the polarity of the segment driver lines.

    Regards, Mike
     
    Last edited: Mar 24, 2010
    #8
    zorbzz likes this.
  9. zorbzz

    zorbzz Thread Starter Member

    Joined:
    Jun 16, 2008
    20
    0
    Thanks heaps everyone for the help, Ill give it a try and see how it turns out.
    Seems logical now it has been explained.
     
    #9
  10. ajish2012

    ajish2012 New Member

    Joined:
    Apr 27, 2010
    6
    0
    Well the answer I would have to give you then is ‘we can’. We can use common cathodes seven segment displays in the place of common anode displays. However the problem here, like always, is that you have no anodes left! Right! Hmm! There is one way you can make it up for that anode shortage. Get some transistors and place it on all of the cathodes!

    <snip>
     
    Lasted edited by : May 9, 2010
    #10
Loading...