Here is the data lookup table in my seven segment display. Segment is connected to PORTB in PIC16F628A
You can see the last bit (RB7) is all zero’s. I want to make that bit into a separate output.
That means when a number shows in the segment when I set that bit high separately it must active (make high).But now it’s not high it’s low. Because the current display value has drawn that bit also as low. This is the coding I use,
Can somebody tell me how to make that RB7 as a separate output?
Thanks a lot.
Code:
TABLE addwf PCL,f
retlw b'00111111' ; display number 0
retlw b'00000110' ; display number 1
retlw b'01011011' ; display number;2
retlw b'01001111' ; display number 3
retlw b'01100110' ; display number 4
retlw b'01101101' ; display number 5
retlw b'01111101' ; display number 6
retlw b'00000111' ; display number 7
retlw b'01111111' ; display number 8
retlw b'01101111' ; display number 9
You can see the last bit (RB7) is all zero’s. I want to make that bit into a separate output.
That means when a number shows in the segment when I set that bit high separately it must active (make high).But now it’s not high it’s low. Because the current display value has drawn that bit also as low. This is the coding I use,
Code:
bsf PORTB,7
Can somebody tell me how to make that RB7 as a separate output?
Thanks a lot.