ACON0 and ANSEL register

Thread Starter

chassler53852

Joined Jan 22, 2013
10
so Im working with a pic kit2 demo board with a pic16f690 chip

I have a program that reads the potinter and lights the leds
when its turned.
if (t>60)
rc0=1
and so on...
now I want to read input port ra1 using a temp sensor and pluging it into
the hole in the serial port on the board that corresponds to ra1

well its not reading the temp sensor
do I need to change ANSEL -1; line to something else
I have changed the ADCON0 to read port RA1 in my loop program.
and it didnt work. what do I need to do?
 

ErnieM

Joined Apr 24, 2011
8,415
In the data sheet for the device look for "EXAMPLE 9-1: A/D CONVERSION." It's in assembly, but it tells you all the registers you need change to make that reading.

Don't just copy the settings. Check each one to see if it suits your needs.

BTW, what PICkit demo board uses the PIC16F690? What part number?
 
Top