NallS
Newbie
This piece of code sets the state of GP1 as the state of GP0. Using the stimulus Debug tool I can toggle the state of GP0 to make GP1 follow the state change. My issue is figuring out how to make GP1 only change state when GP0 goes from high-to-low. There is no bit toggle instruction for this PIC10F202 so I've tried using the COMF instruction but that just flips the byte not a single chosen bit. I've also tried to use BSF and BCF in multiple different ways to manipulate each single bit value but they don't work when I feed the 00000001 value to the WREG before the TRIS GPIO line, after removing this is was able to manipulate the bit of GP0 with BSF/BCF. What I want find out is:
1)Why when I use TRIS, after giving that binary value to the WREG to set the bits, am I not able to use BCF/BSF on GP0 to change its state?- (I think this has something to do with Tristate and High Impedance but this is all new to me)
2) If that isn't issue being in my code then how do I go about manipulating the bit belonging to GP1 to toggle only when GP0 goes from 1 to 0 state?