Ik resistor in input circuit in Sec 3 of manual

huttonart

New Member
In Sec 3 Input device 1 there is a 1K resistor in series to Pin 0. On all the subsequent input devices in Sec 3 there is no 1k resistior. Why is thiis please? Is it that the 1k resistor is always assumed to be in place? Or is it only relevant to the mechanical switches in input device 1? many thanks steve
 

Dippy

Moderator
Assuming I'm looking in the right place in Manual 3 pages 25 to 29 then resistor is used only in P/B switch example? Is that the bit you are on about?
(It's always handy to be specific when asking questions so people don't have to spend time hunting/guessing etc.

All the examples (ADCs etc) afterwards have resistances intrinsically. The P/B switch example doesn't, it directly connects to the supply voltage. The resistor is there to play safe. Follow the advice.
People will say that the resistor isn't necessary. True in some cases. But on certain pins on certain PICAXEs the PICAXE pin can (albeit briefly) be set as an 'Output' and if low and you pressed the button a big POOF would appear. Or you could make a mistake and set a pin as output low. Another POOF.

Play safe, use the suggested circuit. It is there to save you embarrassment, annoyance, time and money. By all means use a resistor larger than 1k0. In that example even much bigger ones would be fine.
 

Grogster

Senior Member
Yes, I agree.

I myself did not used to use the 1k on the input pin(s), but after a few of my experiments killed PICAXE chips in the way that Dippy mentions, I decided to put these resistors in for ANY digital input - just to be safe.(even if the input is not used, in which case, a 10k to deck on any unused input)

Also, I found that SOMETIMES, the PICAXE would falsely-trigger if the 1k and 10k resistors were not used - a floating input can sometimes do odd things.

Outputs don't seem to care, and are generally left disconnected, but Inputs seem to be more fussy!
:D
 

westaust55

Moderator
Ik resistor in input circuit

All the examples (ADCs etc) afterwards have resistances intrinsically. The P/B switch example doesn't, it directly connects to the supply voltage. The resistor is there to play safe. Follow the advice.
The analogue input from the potentiometer (Manual 3 page 27) does not have input protection (via a 1kOhm or similar) shown. If the pot wiper is moved to either extremity then the PICAXE input is either at ~5Vdc or ~0Vdc.

But, as said, the resistors are not techncially essential but can prevent prevent mishaps causing PICAXE damage.

A situation where a pin is set to an output (and this may be a simple programming error) and say high then a circuit such as the potentiometer circuit on page 27 is attached and set to the minimim value (~0Vdc) and the PICAXE output is shorted causing overload of the output and failure of the PICAXE. :(
 
Top