1. 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.
    Dismiss Notice

Help to convert common cathod to common anode seven segment display...

Discussion in 'Oshonsoft' started by manoj soorya, Sep 5, 2016.

  1. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India
    Hello Everybody

    I have a code for a calculator with common cathod. How it convert common anode display that I can use?

    This is the asm code.


    Any help would be appriciated.

    Thank you
     

    Attached Files:

    • vt.1.asm
      File size:
      198.1 KB
      Views:
      71
  2. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,834
    Likes:
    138
    Location:
    morristown,tn
    Where you see these change to 1 to 0 and the 0 to 1.
    Code (text):

              ADDWF       PCL,F

                RETLW       B'01111111'

                RETLW       B'10111111'

                RETLW       B'11011111'

                RETLW       B'11101111'

                RETLW       B'11110111'

                RETLW       B'11111011'

                RETLW       B'11111101'

                RETLW       B'11111110'

                MOVLW       B'11111111'
     
    So this become this
    Code (text):

    RETLW      B'01111111'    like this for each B'10000000'
    But for all them where ever they are in the code just change the state from a 1 to a 0
    and change the 0 to and 1.
     
    Last edited: Sep 5, 2016
  3. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India
    :woot:


    Is it will work as common Anode display?


    :woot:
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,834
    Likes:
    138
    Location:
    morristown,tn

    It should the way it is it goes high you change the code to go low and wire it up right it should work.
     
  6. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,259
    Likes:
    913
    Location:
    Rochdale UK
    In asm add the line comf in the code
    Code (asm):

      CALL  TABLE  
      MOVWF  BUFER2  
      COMF BUFER2   ; flips the bits for common anode
     
     
  7. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,456
    Likes:
    190
    Location:
    Lancashire UK
    Don't forget to invert the digit drive signals as well if it is a multiplexed display. If the cathodes are driven with NPN transistors with the emitters to ground then these will need to be changed to PNP transistors with the emitters connected to Vcc.

    Les.
     
  8. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India
    All segment are ON when run the hardware. need any change in hardware like invert the digit drive signals?
     
  9. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India

    Its not working... All segment of the LED are ON...
     
  10. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India
    Any simple method just like...




    CALL TABLE
    MOVWF BUFER2
    COMF BUFER2 ; flips the bits for common anode
     
  11. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,259
    Likes:
    913
    Location:
    Rochdale UK
    You have to change the software... AND you need to flip the drive like Les said... Only both will make the common anode work..
     
  12. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India
    And any simple way to change in only software only??
     
  13. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,259
    Likes:
    913
    Location:
    Rochdale UK
    If you have a circuit diagram, but the LED is different from the schematic, You'll have to wire it differently anyway..
     
  14. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India
    I just make these setup..only for one digit. But it is not working too.. Segment 'F' will Bright more and another segment are just bright.

    This is the setup I made..
     

    Attached Files:

  15. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India

    I dont get you. Master
     
  16. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India
    In common cathod display, its is working good...
    But in Common anode display, its a problem.

    I use NPN and PNP as used to test. But the problem persisit...

    I have much more Common Anode display, Less Common Cathode. and its multiplexed PCB too..

    I dont have multiplexed Display PCB for common cathod.

    Is really complecated to remove all common anode and changed to common cathod.

    So that I need to work with Common anode display
     
  17. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India
    why they use common cathod display? is it simple to make the code?
     
  18. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,834
    Likes:
    138
    Location:
    morristown,tn
    segment2.gif Without see the sch you could maybe do this
     
    • Like Like x 1
  19. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,259
    Likes:
    913
    Location:
    Rochdale UK
    If you have the display as your schematic, Then just using COMF will work... Unless the code isn't working??
     
  20. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,456
    Likes:
    190
    Location:
    Lancashire UK
    You need to provide the ORIGINAL schematic of how it was designed for common cathode and ALSO how you have connected the common anode LEDs. You would not just decide to replace an NPN transistor with a PNP one just because you had one. (I hope.)

    Les.
     
    • Like Like x 1
  21. manoj soorya

    manoj soorya Member

    Joined:
    Aug 23, 2014
    Messages:
    238
    Likes:
    4
    Location:
    India

    here is the schematic :
     
    Last edited: Oct 2, 2016

Share This Page