If you leave AN0 floating, you'll pick up noise... if you place a pull-down on... TADA, no longer noise, your count should be=0
If you leave AN0 floating, you'll pick up noise... if you place a pull-down on... TADA, no longer noise, your count should be=0
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I guess I need to rephrase the problem. The TPS values are incorrect when the 10F222 is attached to the output of the TPS. The TPS values really don't change much at all when attached, look at the TPS values when not attached. It varies appr 1.8 volts without the PIC attached to calculate the analogue level.
I don't have a clue how TPS are made, but i have this feeling that you may need a buffer between the PIC and the sensor...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
missed that ADCON linerusty you said
![]()
Last edited by mister_e; - 30th October 2008 at 03:32.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
You've got GPIO.0 set as a digital pin, and an output, and set logic low, so it's dragging down the TPS line.
Try configuring the pin correctly for what you are trying to do...
And since the ADC on the 10F222 is an 8bit result, there's no need for throttle to be a word.
BUT...since you're also DEFINE'ing ADC_xxxxx, this might be overriding everything you've just set up wrong.
Bookmarks