Why the PICAXE can reset when unplugging the download cable (RS232)

nick12ab

Senior Member
This is just a blog regarding the inherent flaw with the pinout of the download connector when used with a standard (i.e. proper) serial port or a RS232 USB-to-Serial adapter.

This is what the download circuit looks like when connected to a PICAXE.



With the plug disconnected, if you were to measure the voltage between the tip and the ring, the ring will be 10V less than the tip. The low current can be clamped to 0 by the Serial In pin when this is connected.



When the plug is partially disconnected, the connections are mixed up as shown. Because Serial Out is a low output, it behaves like the proper 0V connection on the download connector. As the proper 0V on the download plug (the tip) is no longer connected to the proper 0V of the download connector, the 10V on the ring becomes the ground level of the plug. Now, the tip on the plug is 10V more than the ring. As a result, whichever connection in the download socket is connected to the tip gains 10V potential in relation to the circuit's ground (0V) and that connection happens to be Serial In. The Serial In pin on the PICAXE clamps this to 5V which is high, so the PICAXE thinks a program download is being started and tries to accept data that never comes. After a short delay, the PICAXE resets.



Workarounds for the issue, if it is an issue for you:
  • Add a PTB switch on the serial in connection which is to be pressed when plugging in/unplugging the cable
  • Switch to the 3-pin molex connector
  • Shell out for the AXE027
 

Attachments

marks

Senior Member
Nice pics there nic12ab !
or should I say Picaxes. lol

I think you'll find using the USB axe027 cable,
When powering up a PC with everything connected OR
plugging the cable into the USB port.
will also cause program to pause.
Not a flaw just something to be aware of !

The method I use is a 200 ohm resistor in Series to PROTECT the serial outpin,
an axe027 fitted with a 3 pin header used to plug and unplug without problem while powered up.
 

nick12ab

Senior Member
marks;bt96 said:
When powering up a PC with everything connected OR
plugging the cable into the USB port.
will also cause program to pause.
I haven't actually tried the AXE027 - the claim that it is a fix is just theoretical based on it being logic level and therefore the negative voltage that causes this is not present. With Windows, you should use the /fastdetect switch in the boot menu to disable serial mouse detection as the serial mouse detection is probably what's causing the reset. See this site which shows you how to do it.

Please post to say if it worked or not (the /fastdetect switch) since it'll help others.
 
Top