It was you well commented code that allowed the mistake to be found.
Keep up the good work!
And be sure to read the section of the data sheet I pointed to to see why the analog settings did not cause the problem... This time![]()
It was you well commented code that allowed the mistake to be found.
Keep up the good work!
And be sure to read the section of the data sheet I pointed to to see why the analog settings did not cause the problem... This time![]()
Dave
Always wear safety glasses while programming.
Thanks for that.
Okay by you if I pick your brains one more time, pse?.....
Just for the sheer sake of learning/curiosity, I'm reading the value of a standard 1mS~2mS R/C pulse, then writing that value to the LCD (Input mode). One of the ADCs is used to create another 1mS~2mS pulse, then displaying that value and at the same time sending the pulse to a separate pin (Output mode)... which works fine on ports A.1 and A.2, but not on ports A.3 ~ A.5.
I'm not sure that I'm fully understanding the ANSEL/TRISA thing because neither does the mode selection work when A.2 is HIGH - the program jumps straight to output mode and stays there.
Thanks again for your previous help. Appreciate you coming back.
Looks like the problem is using an analog configured pin as an input. You can use analog set pins as outputs as the data sheet says but not as digital inputs. The data sheet says something like if a pin is set for analog then all digital reads will be 0(low).
Dave
Always wear safety glasses while programming.
Bookmarks