PDA

View Full Version : 18f4550 ADC not responding



celequanta
- 8th March 2012, 12:11
I just wrote a simple program to check the operation of Analog to digital converter on my PIC18F4550, but the output is just meaningless. I have shown the program below, which is a simple program to control a stepper motor.


6334

I am not getting readings of (0 to 1023) on my lcd. Instead the value oscillates between ( 16 and 28 ) and most of the time unpredictable values.

Plz help me out of this, I am stuck with this for 3 days...

Kamikaze47
- 9th March 2012, 20:40
The first thing that pops out at me is the ADCIN line. The ADCIN command accepts the ADC channel, not the pin. Try this instead:

ADCIN 0,an1

celequanta
- 10th March 2012, 10:26
Oh yes! you are right.. I will check it out tonight.

Acetronics2
- 10th March 2012, 12:26
error ... :shame: