Angry Badger
Member
Hi,
I'm writing a 24hr clock program using a 16F690. There is a definition I use:
#define display PORTC ;portC drives 6 digit 7 seg com. cathode display
I use a look up table to convert binary to seven seg e.g:
Lookuptable:
retlw b'00111111' ; = 0 on 7 seg display
Then I send the data to the display:
movwf display
All this works fine! However the seven seg data is only seven bits (obviously) and I want to use the 'spare' bit7 on portC for another output function. Is there an easy way to make my label/definition only apply to bits 0 to 6 on portC and my look up table only return bits 0 to 6?
Thanks in advance for any help.
I'm writing a 24hr clock program using a 16F690. There is a definition I use:
#define display PORTC ;portC drives 6 digit 7 seg com. cathode display
I use a look up table to convert binary to seven seg e.g:
Lookuptable:
retlw b'00111111' ; = 0 on 7 seg display
Then I send the data to the display:
movwf display
All this works fine! However the seven seg data is only seven bits (obviously) and I want to use the 'spare' bit7 on portC for another output function. Is there an easy way to make my label/definition only apply to bits 0 to 6 on portC and my look up table only return bits 0 to 6?
Thanks in advance for any help.