Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
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'
RETLW B'01111111' like this for each B'10000000'
CALL TABLE
MOVWF BUFER2
COMF BUFER2 ; flips the bits for common anode
In asm add the line comf in the code
Code:CALL TABLE MOVWF BUFER2 COMF BUFER2 ; flips the bits for common anode
Where you see these change to 1 to 0 and the 0 to 1.
So this become thisCode: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'
But for all them where ever they are in the code just change the state from a 1 to a 0Code:RETLW B'01111111' like this for each B'10000000'
and change the 0 to and 1.
You have to change the software... AND you need to flip the drive like Les said... Only both will make the common anode work..
You have to change the software... AND you need to flip the drive like Les said... Only both will make the common anode work..
If you have a circuit diagram, but the LED is different from the schematic, You'll have to wire it differently anyway..
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.