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

Status
Not open for further replies.

#### manoj soorya

##### Member
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

#### Attachments

• 198.1 KB Views: 85

#### be80be

##### Well-Known Member
Where you see these change to 1 to 0 and the 0 to 1.
Code:
          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:
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:

#### manoj soorya

##### Member

Is it will work as common Anode display?

#### be80be

##### Well-Known Member
It should the way it is it goes high you change the code to go low and wire it up right it should work.

#### Les Jones

##### Well-Known Member
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.

#### manoj soorya

##### Member
In asm add the line comf in the code
Code:
  CALL  TABLE
MOVWF  BUFER2
COMF BUFER2   ; flips the bits for common anode
All segment are ON when run the hardware. need any change in hardware like invert the digit drive signals?

#### manoj soorya

##### Member
Where you see these change to 1 to 0 and the 0 to 1.
Code:
          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:
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.

Its not working... All segment of the LED are ON...

#### manoj soorya

##### Member
Any simple method just like...

CALL TABLE
MOVWF BUFER2
COMF BUFER2 ; flips the bits for common anode

#### manoj soorya

##### Member
You have to change the software... AND you need to flip the drive like Les said... Only both will make the common anode work..
And any simple way to change in only software only??

#### manoj soorya

##### Member
You have to change the software... AND you need to flip the drive like Les said... Only both will make the common anode work..
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..

#### Attachments

• 552.2 KB Views: 103

#### manoj soorya

##### Member
If you have a circuit diagram, but the LED is different from the schematic, You'll have to wire it differently anyway..

I dont get you. Master

#### manoj soorya

##### Member
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

#### manoj soorya

##### Member
why they use common cathod display? is it simple to make the code?

#### be80be

##### Well-Known Member
Without see the sch you could maybe do this

#### Les Jones

##### Well-Known Member
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.

#### manoj soorya

##### Member
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.

here is the schematic :

Last edited:
Status
Not open for further replies.