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
Com1 even parity and Tx 115 k,problem

 
Post new topic   Reply to topic    Forum Index -> ZBasic Language
Author Message
marcelo_bahia



Joined: 15 May 2009
Posts: 4
Location: argentine

Posted: 15 May 2009, 21:25 PM    Post subject: Com1 even parity and Tx 115 k,problem Reply with quote

1)I have problem to tx Z24p, using Com1 to Hyperterminal PC, in the following format with eight bits of data, even bit parity and 2 stop bits 8-E-2
when you put even parity error and is not tx to PC, if I do not use even parity works ok , you can help me.Thank you

' initialize the queue
Call OpenQueue(oq)

' define the characteristics of the serial channel 1,8bit data,even parity par,2 bit stop &H38
Call DefineCom(1, 0, 0, &H38,2)

' open the serial channel
Call OpenCom(1, 19200, 0, oq)

2)another query, I must Tx to 115k, when using 115 k, also fails.



Com1_8E2.bas
 Description:

Download
 Filename:  Com1_8E2.bas
 Filesize:  748 Bytes
 Downloaded:  2229 Time(s)

Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 15 May 2009, 21:47 PM    Post subject: Reply with quote

COM1 is explicitly opened by ZBasic as part of its startup procedures so that when you call Debug.Print, the output has somewhere to go. It is ok to reconfigure COM1 to a different setting but you must first call CloseCom(). That should fix your problem but there are also some other considerations to what you are trying to do.

The ZX24p has a second serial port (COM2) on pins 11 and 6 (TX, RX). Perhaps you are already using these I/O pins. If not then it might make sense to use this COM port instead and leave COM1 for debug print messages.

COM1 (pins 1 and 2) is also used for downloading ZBasic programs so you may need to disconnect external circuitry so that it doesn't interfere with downloading a new program. Also COM1 is setup to receive RS232 (inverted) signals. If you are trying to connect to a logic level (TTL) device on COM1, that may not work for you and again COM2 may be a better choice. Worst case you can use a software-based serial port that has a maximum speed of 19,200 BAUD.

One final comment is that the 40-pin versions of these devices (e.g. Oak Micros ZX-24pe) allows you to use COM1 as a logic level serial port as well as a RS232 or download serial port by using a DPDT switch. The COM1 logic levels are available on pins 19 and 20 of the device.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZBasic Language 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