Free up the serial port when not in use

benryves

Senior Member
First and foremost, I am highly impressed with the quality of the programming editor software (complaints or suggestions always sound louder than praise).

Once the software is running, it keeps the serial port open. I'm interested in using the PICAXE as an intermediate device between a piece of Windows software and some external device, so have to close the PICAXE software then reopen it each time I want to test my circuit and/or software.

A workaround I've found is to switch the editor to an unused COM port (eg my modem on COM3); however, the programming editor seems very slow to apply settings (30-40 seconds). This delay is also evident at software startup. I'm not sure if this is a problem with my particular system or not (I have a number of development tools installed).

I'm not sure how your code is structured, so I don't know how easy it would be only open the COM port when it's needed (eg terminal sessions or downloading a program). I fully appreciate that keeping the port open is standard behaviour for applications that use COM ports, and I don't want really to cause extra work for you!

As an aside, I notice that the compilers are available as standalone applications in the Programming Editor's installation directory, and these can (as far as I can see) be used to generate an object file. Is the protocol for downloading programs to a PICAXE available? (Again, I can appreciate that you might not want it to be, though the thought of one PICAXE programming another at runtime would be interesting).

Thanks for reading. :)
 

hippy

Ex-Staff (retired)
Are you using a recent version off the programming Editor ? One of the changes made a while ago was to close the serial ports when not being used to allow precisely what you are attempting to, and that seems to have worked for me so far.

You'll probably need to detail the sequence of operations your performing which lead to the port being left in use after download has completed.

As to the 'executable code' and download protocol for the PICAXE, that is not information which Rev-Ed have put into the public domain.
 

benryves

Senior Member
Thanks for the reply.

I redownloaded Programming Editor fairly recently (within a fortnight ago). I shall check again, more thoroughly - I was used to older versions of the software, and so when I was having problems opening the port I assumed this feature hadn't been added. If this is the case (which I assume so) I'm terribly sorry for blaming my bugs on your software!
 

benryves

Senior Member
You're quite right - the serial port is indeed freed up after programming the PICAXE. My error, sorry. :-(

If you erase the PICAXE (PICAXE->Clear Hardware Memory) the port is left open, however I don't know why I'd have used this option then tried to use my own program to access the serial port.

As far as the protocol for sending programs goes; without a public standard the only way would be reverse engineering - where do Revolution Education stand on this? (eg, if someone was to write up and publish their findings, or built a class library so non-Windows users could send binaries to their PICAXEs). My interest would be more in getting one PICAXE to program another (as a way to build a small "programmable" computer based around PICAXEs).
 

hippy

Ex-Staff (retired)
You're right - my 5.0.8 version leaves the serial port in use after Clear Hardware Memory.

In case there's any confusion, I'm 'just another PICAXE user', so cannot comment on the reverse engineering issues, apart from to suggest checking the applicable law on reverse engineering, and reading the Rev-Ed License ( you may have to re-install / repair to see the initial installation dialogue ).
 

Technical

Technical Support
Staff member
Reverse engineering/disassembly is specifically prohibited by the user agreement that must be confirmed to complete software installation.

Linux compilers are almost complete and once our final X1/14M development/documentation is complete will be beta-tested and released. We have delayed release as we wanted to support *all* the new parts on Linux.

We will look into and correct the serial port bug.

Edited by - Technical on 19/04/2007 17:06:31
 

benryves

Senior Member
I'm having a minor (related) problem with 5.1.1; if the Programming Editor is set to display the Terminal window automatically after a download, the port is left open when that Terminal window is closed. This can be easily resolved by pressing F8 to bring it back up then closing it again.

Thanks! :)

Edited by - benryves on 07/06/2007 16:35:51
 
Top