Technical?

mhalbern

Member
Using a PICAXE 08M, when unused I/O pins are not defined in code as either input or output, what is their default condition?
 

premelec

Senior Member
Don't know for sure - take a look at DIRS & PINS commands in manual 2 [p97?] - set this initially as you want in your start code... Probably init as inputs as you don't want to cause possible currents with low impedance setting by mistake...
 

BeanieBots

Moderator
They are initially set as inputs.
Even PICAXEs which have 'fixed' outputs such as the 18X, will be 'floating' for the first 76mS after power up.
 
Last edited:

Technical

Technical Support
Staff member
Please see the 08/08M appendix at the end of part1 of the manual for more details - it answers this question in depth.
 

premelec

Senior Member
Paralleling 2 08 Picaxes...

Is it OK to parallel two 08 or 08M or combo hard wire pin for pin EXCEPT V+ so that whichever V+ pin is actuated [ONLY 1 V+ at a time] the program in that PICAXE is running - the issue being permissablity of voltage being applied to a PICAXE pin which hasn't got V+ on it - i.e. are the pins floating with V+ not applied? [for 5 volts max] - I have foolish reasons for considering this configuration [some 08s not being used...]... Thanks...
 

BeanieBots

Moderator
Not 100% sure what you are thinking of doing.
When a PIC (PICAXE) is powered, an OC input will float. A floating pin can "float" up and down between 0v and Vcc. More often than not, it will follow the local mains frequency. It will not go much above Vcc due to the internal clamp diode. When not powered, it will be clamped to 0v by the same diode. If it is not powered and and a logic high is applied to the pin, current will flow to its Vcc pin and power the device parasitically. This MAY cause damage.

SOME ADC pins on SOME PICs are an exception to this but I cannot remember which ones. The PIC datasheet will answer that.

Is that what you wanted to know?
 

hippy

Senior Member
@ premelec : What I think you are asking is; "Can I connect an input signal to a PICAXE which is un-powered" ?

Beyond "this is not a valid operational mode" there's not going to be any definitive answer.

Whn un-powered there is no real definition of what state any of the pins are in; I/O is simply silicon connected to that line. How that behaves and what affects it has is anyone's guess.

Most pins on a PICAXE / PICmicro have diode clamps from I/O pin to +V so input can parasitically power the device and this can cause all sorts of odd behaviour. Depending on what input signals there are can put some signals beyond the absolute maximum operating ratings of the device.

If +V supply into the un-powered PICAXE is pulled to 0V when un-powered all its inputs will effectively be current sinks to 0V through these diodes. Likely to destroy the chip and perhaps whatever is sourcing the signal. If the +V supply is open circuit then there will still be current sink paths but it's hard to tell what they will be. How the un-powered pin output circuit will affect things I don't know.

You could limit current by splitting all inputs through their own current limiting R's into each PICAXE input which should minimise adverse effects. Likewise add R's on otputs so the un-powered device doesn't affect the lines of the active devices and output from the powered doesn't affect the un-powered.

The bottom line, from an engineering perspective, would be, "do not do this".

If an analysis of potential catastrophic failure shows damage limited to what is deemed acceptable then you can try "suck it and see". I've powered a PICAXE through an AC signal to two input pins and used its internal diodes as a bridge rectifier and a cap to 0V being the only connection to the chip's +V. That worked in the configuration used but wouldn't be a recommended configuration.

It's like "should I try adding urine to my car fuel to see if it increases performance"; you can try, but no one is going to recommend it nor put money on the outcome beyond it may not work and it could cause damage.
 

premelec

Senior Member
Thanks BB & Hippy I think the key is that there is a catch diode to V+ so I'd have to use an OR structure if two 08 pins were connected - where one 08 was unpowered - so that either could control something - I was hoping for something trivially simple but two diodes for an OR could work etc... anyhow thanks for the detail and reminding me of the situation... probably I should get back to 'normal' thinking! :)
 
Top