Measuring two resistors using a ADC channel

Thread Starter

kamarul amin

Joined Dec 2, 2014
62
No, many pins share both analog and digital functions. When they share each pin defaults to the analog function at power up, which keeps them safe no matter whatis connected to them. A digital only pin will similarly default to input again to keep things safe till the set up code is complete. As far as I know that is true across all microchip products.

Port d is digital only. Most pins of port b also have analog functions. AN 2 is on port a, and the only way to make it analog is to also make an 1 & 0 analog; see ADCON1 description.

You should be spending your time reading the spec sheet for your device. The documentation is very good and complete, so it is large. You can use the PDF table of contents to narrow down to the topics you need, such as I/O ports or A/D converter.
That's why I got an error when I tried to declare only AN2 to be analog input. Now it's getting more clear. It sound like I need more time to spend to understand this.

What should I know when I want to learn interrupt? PS0 PS1 PS2 PSA and bla bla.... I need to understand that kind of things ryte ? about the crystal oscillator, period and overflow?

Thank you :)
 

Thread Starter

kamarul amin

Joined Dec 2, 2014
62
OK, so you probably have to do it that way, but it makes exceedingly difficult for us here to work out why it doesn't work.
Can you post the library code here? Your lecturer may not be pleased at his code becoming public :eek:
I got it!!!!!!!!!!!!!!! never expect that he change the pin in the library for this folder only!!!!!!!!!!!! delete it and replace with the new one that I got from the other folder. now my LCD display words.. :) thank you :) :)
but now the problem is with the interrupt. I'll figure it out.
 
Top