Latching the reset pin

JezWeston

New Member
Can a Picaxe (28X1) be safely left with the reset pin pulled to ground for quite some time (days)?

I'm running short on space on the usable surfaces of the 'box' that contains the current project, and one means of turning the thing off is just to latch the reset switch. I've looked through the forum, the manuals and the PIC16F886 datasheet, but this isn't mentioned, leading me to hope that this is not going to cause a problem. (Of course, it might not be mentioned because this is a stupid plan.)
 

leftyretro

New Member
Can a Picaxe (28X1) be safely left with the reset pin pulled to ground for quite some time (days)?

I'm running short on space on the usable surfaces of the 'box' that contains the current project, and one means of turning the thing off is just to latch the reset switch. I've looked through the forum, the manuals and the PIC16F886 datasheet, but this isn't mentioned, leading me to hope that this is not going to cause a problem. (Of course, it might not be mentioned because this is a stupid plan.)
I don't think there would be any harm keeping it in reset for whatever period, and current consumption should be lower (no clock running) but not zero. Keep in mind that all the I/O pins will go high impedenace I think, so you should have pull-up or pull-down resistors to ensure whatever your driving is in a known safe state.

Good luck
Lefty
 

westaust55

Moderator
28X1 use of the RESET pin

It depends upon exactly what you are trying to achieve.

Are you just trying to turn the project off?

If you have a switch for the reset to hold it in RESET mode, could it not just be the power switch? Cycling power effectively does the same thing for the PICAXE.

If trying to conserve power, another option could be to use the SLEEP command which will put the PICAXE into sleep mode for up to ~41 hours (almost 2 days), then just use the reset switch to wake the PICAXE up again.
 

JezWeston

New Member
Actually, I'm trying to pause the program at particular spots. Turning the whole thing off is tricky, the batteries are hard-wired in for shock resistance, and there's assorted LED drivers that need turning off through i2c, so just cutting power to the Picaxe may leave other things on and uncontrolled.

Still, testing reveals that latching the reset pin is working just fine, so far.

The next model will have a dedicated shutdown pin. When the Picaxe sees that go high, it'll shutdown the other parts in good order, then sleep. But that's the next model, this one I'm just trying to bodge into a demonstratable state.
 

kevrus

New Member
I don't think that thereset pin will do what you want, upon the reset pin being released (going high), the program will start from the beginning, and not pause at a particular spot.

If you just wanted to pause at a certain spot until something happens, then how about just using an input that waits for a high (or low) before continuing?

i.e
'this is your code here'

first_delay:
if pin1 = 0 then first_delay 'program will wait indefinitely until pin1 =1 and then will continue

'rest of your code here'

or am i completely barking up the wrong tree
 

hippy

Technical Support
Staff member
Can a Picaxe (28X1) be safely left with the reset pin pulled to ground for quite some time (days)?
Looking at a preliminary 16F886 (PICAXE-28X1) and up-to-date 16F88 (PICAXE-18X) datasheet, TmcL is stated as 2us minimum, no stated maximum, so the answer should be yes.
 

hippy

Technical Support
Staff member
Actually, I'm trying to pause the program at particular spots.
To do that using Reset, the simplest way is to have the program mark where it has got to in Eeprom. When it wakes it reads that Eeprom and branches to where it should be. That doesn't get round the issues that variables and SFR will have been reset or zeroed.

AFAIR, on the 18X, SFR at $C0..$FF is not cleared on reset so can be used for 'across reset' non-volatile storage as long as the chip remains powered. The 28X1 has SFR at $C0-$EF which could work the same but I haven't tested it.
 

JezWeston

New Member
I don't think that thereset pin will do what you want, upon the reset pin being released (going high), the program will start from the beginning, and not pause at a particular spot.
Sorry for being unclear. The program is a loop and I'm just pausing it at the start. So the behaviour on reset is actually what I want.

I can see Hippy's ideas coming in handy though, as it usually the case.
 
Top