Hi,
I am having trouble reading from the input pin and not sure what registers to set before reading the input register 0x00 as I have configured P0_2 pin as Input.
Actually I am trying to figure out the registers to read for the input side.We cant just read registers 0x00 and 0x01 directly as we have to set other registers first and this is the issue , I am not sure which registers to set before reading the input registers 0x00,0x01
Heres what I do
1. set register 0x06 to 0x04 as I need the third bit (P0_2) as input .
2. I set register 0x46 to 0xFF to enable pullup/pulldown
3. i set register 0x48 to oxFF to select pullup .
Then I read the state of (P0_2) to see if it is one or zero by reading 0x00 register but its not returning the right value instead the value in 0x00 is the same as the output register (0x02).whatever value i set in 0x02 register , it gets copied to 0x00 register
so i just need to know what registers to set before reading input registers 0x00.
Please advise
Thanks
Nabeel