Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
Changing The IDE's Serial Port Settings

 
Post new topic   Reply to topic    Forum Index -> ZBasic IDE
Author Message
Don_Kirby



Joined: 15 Oct 2006
Posts: 329
Location: Long Island, New York

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

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
Posts: 2493
Location: Portland, OR

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

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
Posts: 329
Location: Long Island, New York

Posted: 16 June 2008, 1:43 AM    Post subject: Reply with quote

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
Posts: 2493
Location: Portland, OR

Posted: 16 June 2008, 2:39 AM    Post subject: Reply with quote

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:   
Post new topic   Reply to topic    Forum Index -> ZBasic IDE Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 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