Digital input on analogue pins

accole

New Member
Hi,

I've just bought a 40X2 (having used 28X1s so far) as I want more inputs for a project and I'm planning the circuit board. With digital inputs on 28X1 I had to use 10kRs to pull down the input to 0 (I put these on the main board and the slave boards (multiple 28X1's talking together via a bus) didn't need 10kR.

With the analogue pins on 40X2 (which I will be using as digital input) do I need 10kR pull down to be wired? .. the analogue pins on 28X1 didn't seem to need 10kR according to manual (though that was using them as analogue inputs)

Thanks,
Anthony
 

fernando_g

Senior Member
On an analog input you don't specifically a pulldown (or pullup).

Having said that, if your input could become disconnected for any reason, it is wise to add a pullup or pulldown resistor that will set up a definitive value at the input, and your software would then detect that condition as a disconnected sensor (and react accordingly).

However, if you do that, you must ensure that the analog source driving the input can drive that resistor value without loss of accuracy or that you are not effectively creating a voltage divider..
 

hippy

Ex-Staff (retired)
As fernando_g says, you shouldn't need pull-downs when used as analogue inputs.

It's not clear why you needed pull-downs on the 28X1 when used as digital inputs; if you have push buttons or switches connected then you do need pull-downs ( or pull-ups if switch to 0V ) and if that's the case you'll need the same with the 40X2.
 

inglewoodpete

Senior Member
As fernando_g says, you shouldn't need pull-downs when used as analogue inputs.

It's not clear why you needed pull-downs on the 28X1 when used as digital inputs; if you have push buttons or switches connected then you do need pull-downs ( or pull-ups if switch to 0V ) and if that's the case you'll need the same with the 40X2.
Or any other PIC or PICAXE.
 

westaust55

Moderator
I think maybe accole has confused a few folks due to lack of clear information.

From post 1:
"With digital inputs on 28X1 I had to use 10kRs to pull down the input to 0'
a presumption :eek: but was this with switches to +5V?

and
"the analogue pins on 28X1 didn't seem to need 10kR according to manual (though that was using them as analogue inputs)"
correct no pull-up or pull down when used as analog inputs.

Finally:
"With the analogue pins on 40X2 (which I will be using as digital input) do I need 10kR pull down to be wired"
The answer is . . .
It depends:
1. if used with a switch to +%V then YES
2. if used with a switch to 0V then you need pull-up resistors
3. if used to monitor a signal from another logic IC then NO (unless that IC is open collector output in which case a pull-up resistor will be required).
 
Top