Forum Index
Changing The IDE's Serial Port Settings

 
Author Message
Don_Kirby



Joined: 15 Oct 2006

Posted: 15 June 2008, 22:54 PM    Post subject: Changing The IDE's Serial Port Settings

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
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Location: Portland, OR

Posted: 16 June 2008, 0:30 AM    Post subject: Re: Changing The IDE's Serial Port Settings

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.
Back to top
Don_Kirby



Joined: 15 Oct 2006

Posted: 16 June 2008, 1:43 AM    Post subject:

Is this the correct bit of code?

Code:

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
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Location: Portland, OR

Posted: 16 June 2008, 2:39 AM    Post subject:

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:
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.
Back to top
Display posts from previous:   
Page 1 of 1

 



ZBasic Microcontrollers Home
All content Copyright © 2005, 2006, 2007, 2008, 2009, 2010 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group