Sorry i just edited above... ANSELH=0
Sorry i just edited above... ANSELH=0
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I did ANSEL, not ANSELH. Why would the pin revert to a 0/input when invoking shiftout even if ANSELH is high?Originally Posted by mister_e
As they are analog by default, i guess it's one of those weird thing it could do. But Why B.5 when the Clock signal apear on B.6.... because of the combination of the external load, Capacitance, TRIS switching AND internal A/D multiplexer i guess... i didn't spend too much time in the datasheet to study how it could happen but if the ANSELH is not cleared, those pin will certainely be analog, not digital as you want.
You know, sometimes it's better to don't know all the reasons and stay happy when it works
It's just weird that they didn't place the ANSEL and ANSELH register in the A/D datasheet section...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Thanks, I'll try the fix tonight. Wierd quirk though...Huh?Originally Posted by mister_e
I cleared the ANSELH register to 0 and all is right with the world...Thanks for the help.Originally Posted by mister_e
Ron
Great to know it's working. It's not often i saw TWO ANSEL registers so.. kinda interesting to know it exist![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
An interesting aside to this saga. Jeff from Melabs emailed me back about this quirk. This is important for anyone using Analog inputs with digital outputs. When the uP is commanded to change a bit, it reads, modify,writes the entire port. Since Analog bits are read as zero, when the port is rewritten, any Analog bit will be written as a zero. Even if it was used as a digital high output,as was in my case. Verrrry interesting!
Ron
Bookmarks