droptail
- 12th November 2009, 00:51
Will these settings set PortA.3 as an analog input?
ADCON1 =0
TRISA =255
DEFINE OSC 3 '3.56 MHz oscilator
DEFINE ADC_BITS 8 'Result resolution
DEFINE ADC_CLOCK 3 'Sets internal RC clk(2-6us)
DEFINE ADC_SAMPLEUS 5 'Cap sample time of 5us
code:
ADCIN PORTA.3,w7 'Ck for vibration
Then I SEROUT to an LCD display.
Nothing else required to set for this multi functional (Vref) pin?
I get the other PortA pins to work, but not this PortA.3 pin (although I have op amp inputs on the others).
Is there a minimum input current requirement to be able to be read by the PIC?
I have 1.5V going through a 1k allowing for 1.5mA of current input to the pic.
Thanks
ADCON1 =0
TRISA =255
DEFINE OSC 3 '3.56 MHz oscilator
DEFINE ADC_BITS 8 'Result resolution
DEFINE ADC_CLOCK 3 'Sets internal RC clk(2-6us)
DEFINE ADC_SAMPLEUS 5 'Cap sample time of 5us
code:
ADCIN PORTA.3,w7 'Ck for vibration
Then I SEROUT to an LCD display.
Nothing else required to set for this multi functional (Vref) pin?
I get the other PortA pins to work, but not this PortA.3 pin (although I have op amp inputs on the others).
Is there a minimum input current requirement to be able to be read by the PIC?
I have 1.5V going through a 1k allowing for 1.5mA of current input to the pic.
Thanks