Hi all,
I'm working with ADC in PIC16F877. The output is written on PortC in 8 bit.Could I display this output in 3 bit? For example
PortC = 11111111 -> PortE = 111
PortC = 01111011 -> PortE = 011
PortC = 00010001 -> PortE = 010
Could I do something like this? (I checked but not worked)
The problem here is that can I do xorwf with the PortC which is writen by output of ADC process)
I'm working with ADC in PIC16F877. The output is written on PortC in 8 bit.Could I display this output in 3 bit? For example
PortC = 11111111 -> PortE = 111
PortC = 01111011 -> PortE = 011
PortC = 00010001 -> PortE = 010
Could I do something like this? (I checked but not worked)
Code:
movlw B'01111011'
xorwf PortC,w
btfss status,z
movlw B'00000011'
movwf PortE
Last edited: