08M2 Reset

mjy58

Member
I am running a program in an 08M2 on the AXE091 development board. If I leave the computer connected via the download cable with the PICAXE program running, shut down the PC and then power it up, the 08M2 is reset.

As the 08M2 does not have a reset pin, I do not understand how this is happening:confused:
 

nick12ab

Senior Member
I am running a program in an 08M2 on the AXE091 development board. If I leave the computer connected via the download cable with the PICAXE program running, shut down the PC and then power it up, the 08M2 is reset.

As the 08M2 does not have a reset pin, I do not understand how this is happening:confused:
It is nothing to do with the reset pin, it is to do with the serial port. I have previously investigated this and found that the problem only seems to happen on normal serial ports and not USB to Serial converters. The cause is that the computer sends out a signal (probably a break signal) on the serial port which is high causing the PICAXE to try to start a program download which will not happen because no program data is being sent so the PICAXE times out and resets.

I'm guessing that it might be to wake the modem attached to the computer so that cavemen with their dial-up modems are ready connected to the internet when their computer starts.

If the PICAXE needs to be constantly connected to the PC, I'd suggest you get a (Prolific) USB-to-Serial converter. If no program downloads need to be done without it, a counterfeit one will do. I can't guarantee that the FTDI USB-to-Serial adaptors will be immune from the problem.
 

westaust55

Moderator
When your PC is restarting it is likely causing a momentary change in the status of the data line to the PICAXE.
Any Time that the SerialIn line goes high it causes the PICAXE to expect a new program download.
If this program download does not start, the PICAXE resets and the existing program restarts.
 
Last edited:

Goeytex

Senior Member
When my PC powers down, the standard serial port TX pin goes high and then slowly decays to zero volts over about 2 seconds. When the voltage decays to about 2 volts the Picaxe resets. This does not look like an intentional signal as it has a fairly slow rise time and even slower decay time.

I tested with a CH340 based USB to RS232 adaptor which I sometimes use for Picaxe Programming and the power off resetting behavior does not occur. I do not have an AXE027 to test. I can't guarantee anything with a Prolific PL2303 based adapter as these are generally very troublesome.

EDIT:
Adding a "Disconnect" command somewhere in the program should prevent this reset from happening. The caveat is that you will have to do a "hard reset" to start a new program download.
 
Last edited:

nick12ab

Senior Member
I tested with a CH340 based USB to RS232 adaptor which I sometimes use for Picaxe Programming and the power off resetting behavior does not occur. I do not have an AXE027 to test. I can't guarantee anything with a Prolific PL2303 based adapter as these are generally very troublesome.
With a PL2303 based adaptor, when restarting the computer there were no pulses whatsoever. So if you want no startup pulses, simply use a PL2303 adaptor. Adaptor under test is the USB010.

And troublesome? In what way? As long as you use a genuine adaptor, it's simply a matter of downloading the driver from here, going into Device Manager and clicking 'update driver' with the adaptor selected, and then choosing 'I will choose a driver to install' > 'Have Disk' and navigate to the driver downloaded from above using the Browse dialog.
 

Technical

Technical Support
Staff member
Although it may work, when the computer is not powered you are still basically hanging an unpowered electronic circuit (be it FTDI or PL2303) off the PICAXE programming pins, and so should always expect unreliable behaviour and 'spikes'. This is not generally a good idea, so the best approach is to simply remove the cable when the computer is not powered.

Failing that a 'disconnect' command is the best solution, as already mentioned.
 

hippy

Technical Support
Staff member
Pulsing outputs on power off are an annoying fact of life and depends on the specific equipment; it can also be seen with status LEDs flashing on as power is turned off in some cases.

What happens is power turns off but the supply rails do not drop instantly nor always at the same time throughout the entire circuit. For the pulsed LED case; if the cathode voltage falls to 0V as power goes off, but the +V the anode connects to has some juice left in it, the LED will light and then dim as +V also drops to 0V. Other circuits can behave in a similar way, outputs going high as their inputs go low, then slowly dropping as power actually disappears.

Similar glitches can happen at power on, especially if something behaves differently to how it does when fully initialised which may be some time later.
 

Goeytex

Senior Member
And troublesome? In what way?
C'mon on Nick,

How many pages do you suppose are on these forums (and others) that are related to PL2303 problems. My guess is hundreds if not thousands.

Troublesome in that many folks to not know what PL2303 based adapter to get or where to get it unless they are informed. Otherwise they are likely to go to Ebay or elsewhere, where they are likely to get a counterfeit that won't work with Picaxe and end up posting yet another new "Cannot Download" thread.

Prolific does not make adapters, so when you recommend a Prolific Adapter I think that needs to be qualified and a source provided for a genuine PL2303 based component from a reputable manufacturer.
 

nick12ab

Senior Member
C'mon on Nick,

How many pages do you suppose are on these forums (and others) that are related to PL2303 problems. My guess is hundreds if not thousands.

Troublesome in that many folks to not know what PL2303 based adapter to get or where to get it unless they are informed. Otherwise they are likely to go to Ebay or elsewhere, where they are likely to get a counterfeit that won't work with Picaxe and end up posting yet another new "Cannot Download" thread.

Prolific does not make adapters, so when you recommend a Prolific Adapter I think that needs to be qualified and a source provided for a genuine PL2303 based component from a reputable manufacturer.
One from a reputable source: here. And if another adaptor uses a counterfeit chip it isn't a Prolific chip.

The CH340 seems to be less common on the forum but again, not problem-free:
Just a heads up, I purchased one of these adapters the other day only to find that it didn't work for me. For £3 off ebay it was a stunning deal though. I run Linux on both my desktop and laptop. Out of curiosity I tried it on my laptop and to my surprise it worked.
The FTDI chip itself is far from innocent:
http://www.picaxeforum.co.uk/showthread.php?20129
http://www.picaxeforum.co.uk/showthread.php?20171
http://www.picaxeforum.co.uk/showthread.php?20197
http://www.picaxeforum.co.uk/showthread.php?20291
http://www.picaxeforum.co.uk/showthread.php?20668

Of course, all three of these driver chips aren't without genuine issues, it's just that the PL2303's problem count is artificially inflated by the counterfeit ones.
 
Top