I just started fiddling with a PIC 12F629 and was curious as to which way is best to send data out the GPIO,0 ( pin 7 ) that is stored in say W_TEMP. Right now I'm clearing the C bit in OPTION_REG and rotating the LSB on W_TEMP and then rotate C into GPIO. This seems messy...
What I am noticing in my simulator that GPIO,1 is also changing states; however it is set to an input. That is why this seems messy to me.
Is there a better way to shift 8 bits on to GPIO from W_TEMP?
Thanks
*Edit - I only want to shift the bits on to GPIO,0. One bit at a time of course.
-Ken
Code:
bcf OPTION,0
movlw CODE
movwf W_TEMP
rrf W_TEMP,1
rlf GPIO,1
goto L0006 ; Delay function
What I am noticing in my simulator that GPIO,1 is also changing states; however it is set to an input. That is why this seems messy to me.
Is there a better way to shift 8 bits on to GPIO from W_TEMP?
Thanks
*Edit - I only want to shift the bits on to GPIO,0. One bit at a time of course.
-Ken
Last edited: