GPIO.3 is an input only, it just can't be configured as an output. Check your datasheet under TRISIO register, you'll discover that BIT3 is a read only bit... so whatever value you put there... it will always be set as an input.
GPIO.3 is an input only, it just can't be configured as an output. Check your datasheet under TRISIO register, you'll discover that BIT3 is a read only bit... so whatever value you put there... it will always be set as an input.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
i'm not sure to follow you then... let's see if the following lines could give you some lights
Code:'GPIO Bits 76543210 TRISIO = %00001010 ' xx------- Not implemented, don't care ' --0------ GP5 = output ' ---0----- GP4 = Output ' ----1---- GP3 = Input, Read only bit, input only, regardless to what you write here ' -----0--- GP2 = Output ' ------1-- GP1 = input ' -------0- GP0 = Output
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
OK, now I get it; I have to look at the table in the data sheet. I had copied that code from the following string:
http://www.picbasic.co.uk/forum/show...ight=pic12f683
So, I was correct that TRISIO = %00010000 makes GP4 an input.
~ Dave
Yup GP4 AND GP3![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks