Page 1 of 1

Changing The IDE's Serial Port Settings

Posted: 15 June 2008, 15:54 PM
by Don_Kirby
Is there any way to modify any of the serial port settings that the IDE uses to communicate with an attached device besides the Baud rate?

With our new-ish ability to download without a DTR signal, the IDE needs to transmit the ATN character. THe problem arises when the device is configured to use settings other than the standard XXX, 8, N, 1. If the device is configured to something else (i.e. XXX, 8, E, 1), it doesn't recognize the ATN Character being sent.

Would it be possible to add a few more options to the Serial Port Options screen, or is all of this handled in the ZLoad code?

-Don

Re: Changing The IDE's Serial Port Settings

Posted: 15 June 2008, 17:30 PM
by dkinzer
Don_Kirby wrote:Would it be possible to add a few more options to the Serial Port Options screen, or is all of this handled in the ZLoad code?
The IDE uses code similar to that used by ZLoad but it isn't identical. For one thing, the IDE's code is written in C++ while the ZLoad code is standard C. For another, the IDE code must contend with Windows GUI issues while ZLoad is simpler because it is a console application.

That said, the "serial open" code in the IDE probably could be modified to support additional serial configuration choices. I'd have to review the code to determine the effort it would take.

The other option would be to modify the ZLoad source code (copied to your disk during installation) and build you own customized loader.

Posted: 15 June 2008, 18:43 PM
by Don_Kirby
Is this the correct bit of code?

Code: Select all

sprintf(commSpec, "COM%u:%u,N,8,1", port, ZX_STD_SPEED);
Seems like it shouldn't be too much trouble to change ZLoad to accept the other parameters.


-Don

Posted: 15 June 2008, 19:39 PM
by dkinzer
Don_Kirby wrote:Is this the correct bit of code?
Yes, that's it.

I took a quick look at the IDE code and concluded that it will be fairly simple to implement a way to override the default configuration by adding a line to the User.Properties file something like this:

Code: Select all

port.config.2=E,8,1
This would set the configuration for Com2 to E,8,1. In the absence of such a configuration line, the default N,8,1 configuration would be used.