🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8872

Re: Comm Port

#8872
From: Eelke Klein
Date: Tue, 14 Sep 2004 08:52
52 lines
3552 bytes
McKool wrote:
> I use the normal Configuration, but when you configure the Port in a normal 
> way (8,N,1) are not in total 9 bits instead of 10? i need to have a low 
> signal in the port for 25 ml, so 9bits / 360 bauds = 0,025 => 25 ml is it 
> not?
You forgot the start bit for a total of ten bits.
> I'm using Widnows but which blocking calls do you refer? I'm use 
> "TransmitCommChar"... it is a boolean function and I supposed that it 
> returns only when the byte is sent (so when everything is Ok).
No it returns immediatly:

BEGIN Win32 documentation:

Remarks
The TransmitCommChar function is useful for sending an interrupt 
character (such as a CTRL+C) to a host system.

If the device is not transmitting, TransmitCommChar cannot be called 
repeatedly. Once TransmitCommChar places a character in the output 
buffer, the character must be transmitted before the function can be 
called again. If the previous character has not yet been sent, 
TransmitCommChar returns an error.

END Win32 documentation
> 
> My problem is that ai have to be precise in the time when i write the two 
> bytes because the divice read the low and hight signals in the port in order 
> to get active and i have to pulse 25 ml low and then hight oder 25 ml with a 
> error margin of 1 ml.
> 
>             25 ml low|  25 ml Hight  | hier start my real communication.
> ---------                --------------
>             |                |                    |
>             |                |                    |
>             |---------- |                    |50 ml
> 
> Because  of that I try to send a 0x0 using 360 baud, but after the 25 ml low 
> i have to change to the communication baud which is 10472 and send the start 
> byte... this start byte shall arrive to the device between the ml 49 and ml 
> 51.  The 25 ml are OK, but when i change the configuration and sent the 
> start byte i lose time, and i can not calculate it....
Notice that these signals will never be completely low or completely 
high they will allways be a series of pulses zero bits are short pulses 
and 1 bits are long pulses. The start and stop bits have fixed lengths.
> 
> Can i maybe at 10472 in someway make the same low-hight behavior?
Probably if you send enough 0 and 0xFF values however the problem of the 
signal never being really low or really high will persist. You should 
the WriteFile function for this as it will allow you to send a block at 
once making the timing more accurate.

Eelke
Technical Details
Message-ID: <4146b149$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4145a779$1@newsgroups.borland.com> <88fbk0d602p65ajvc5lk89tc2bc5qv93dg@4ax.com> <41469b86$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c3fce443b4c5c053
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 14 Sep 2004 10:52:37 +0200
From: Eelke Klein <e.klein@mplussoftware.nl>
User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Comm Port
References: <4145a779$1@newsgroups.borland.com> <88fbk0d602p65ajvc5lk89tc2bc5qv93dg@4ax.com> <41469b86$1@newsgroups.borland.com>
In-Reply-To: <41469b86$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.58.1.162
Message-ID: <4146b149$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1095151945 81.58.1.162 (14 Sep 2004 01:52:25 -0700)
Lines: 52
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!fr.ip.ndsoftware.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail