ADC Issues
Posted: Tue Mar 17, 2009 1:29 am
I'm trying to turn on just port AN0 as an analog input. I've inserted C-blocks right before and after where I take my input into pin 1 (RA0/AN0). I'm using a PIC18F1320, and my sensor is a temperature sensor (LM34)
First block:
adcon0 = 0xc3;
adcon1 = 0xFE;
Second Block:
adcon0 = 0xc1;
I'm currently trying to simply output the value to an lcd screen. The display shows 0, and when I use a DMM to check the voltage into the port, it reads 0. Connections are all complete and correct, so I think the error might be in how I am calling on the input.
I've attached the flowcode as well. Thank you in advance.
First block:
adcon0 = 0xc3;
adcon1 = 0xFE;
Second Block:
adcon0 = 0xc1;
I'm currently trying to simply output the value to an lcd screen. The display shows 0, and when I use a DMM to check the voltage into the port, it reads 0. Connections are all complete and correct, so I think the error might be in how I am calling on the input.
I've attached the flowcode as well. Thank you in advance.