Disconnect Command

ReinPure

New Member
I've used the disconnect command on my 14M2 so that I could use the DAC output. The manual said I would always be able to perform a hard reset, but it's not working now.

I've read I should disconnect power and reconnect it as soon as I try to program, but as soon as I press program it instantly says "Error: Can't open port". Is there another way to flash the PICAXE or reset it?
 

AllyCat

Senior Member
Hi,

as I press program it instantly says "Error: Can't open port".
Welcome to the forum. That error message suggests that the programming cable is not working correctly or the wrong COM port is selected in the Program Editor. What type of programming interface are you using (the AXE027, a USB serial adapter or a "real" PC COM port)? The cable needs to supply its own power (e.g. from a USB port).

The correct hard reset procedure is to keep the PICaxe unpowered until the "Connecting to hardware" window appears (after pressing the "Program" button), then immediately apply power to the PICaxe.

Cheers, Alan.
 

westaust55

Moderator
As some further information on "hard resetting":

From the time the "Connecting to hardware" window appears you have a few seconds to energise the PICAXE chip before the Programming Editor times out (from memory at 5 seconds).
The PICAXE takes around 50 ms from energisation to internal initialisation read to download or start running a program.
Therefore, you do not need to be blindingly fast from seeing the "Connecting to hardware" window to energising the PICAXE chip.
 

BeanieBots

Moderator
Welcome to the forum.

I think the key thing here is to be aware that a "Error: Can't open port" error has nothing to do with the PICAXE or your circuit.
It is purely to do with your PC.
Make sure you have the correct port selected and that no other program running on your PC is using it.
 

tony_g

Senior Member
if you where using the terminal as well and didnt close that before hitting program that would also give you the com port error, ive done that a few times lately as well lol
 

hippy

Technical Support
Staff member
I've used the disconnect command on my 14M2 so that I could use the DAC output.
There is no need to use the DISCONNECT command for DAC use.

The DISCONNECT command stops the PICAXE reacting to download initiations seen on its Download Serial In pin, but DAC output shares the Download Serial Out pin. The DAC output can be used without having to inhibit the PICAXE response to downloads.

Once the DAC has been enabled by the DACSETUP command you lose the ability to SERTXD or have DEBUG output on that pin but, when a download is detected, the PICAXE will automatically switch the DAC output back to being Download Serial Out.
 
Last edited:
Top