Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #37324 > unrolled thread

Serial communications problem

Started byMe <me@right.her>
First post2015-08-04 11:06 -0400
Last post2015-08-06 10:23 -0500
Articles 9 — 8 participants

Back to article view | Back to comp.lang.c++


Contents

  Serial communications problem Me <me@right.her> - 2015-08-04 11:06 -0400
    Re: Serial communications problem Victor Bazarov <v.bazarov@comcast.invalid> - 2015-08-04 11:44 -0400
    Re: Serial communications problem Öö Tiib <ootiib@hot.ee> - 2015-08-04 08:47 -0700
    Re: Serial communications problem seeplus <gizmomaker@bigpond.com> - 2015-08-04 22:59 -0700
    Re: Serial communications problem Me <me@right.her> - 2015-08-05 13:11 -0400
      Re: Serial communications problem Paavo Helde <myfirstname@osa.pri.ee> - 2015-08-05 13:01 -0500
      Re: Serial communications problem Cholo Lennon <chololennon@hotmail.com> - 2015-08-05 15:27 -0300
      Re: Serial communications problem red floyd <no.spam@its.invalid> - 2015-08-05 13:20 -0700
        Re: Serial communications problem "Osmium" <r124c4u102@comcast.net> - 2015-08-06 10:23 -0500

#37324 — Serial communications problem

FromMe <me@right.her>
Date2015-08-04 11:06 -0400
SubjectSerial communications problem
Message-ID<9ute11n5qcui.j207p1oxg5yh$.dlg@40tude.net>
I am using VC++ 2012 and serial transfer using Writefile & Readfile.
Serial params set to 115200baud, 8bits, no parity, 1 stop, no handshake.
Does anyone know why when I send data out to a virtual serial port there is
sometimes a delay up to 10 seconds before it actually goes out the port?
Sometimes it sends right away.
This is verified by activity led's on receiving board.
Receiving side is using FT230X USB/Serial chip.
Thanks in advance.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

[toc] | [next] | [standalone]


#37327

FromVictor Bazarov <v.bazarov@comcast.invalid>
Date2015-08-04 11:44 -0400
Message-ID<mpqmhb$mi6$1@dont-email.me>
In reply to#37324
On 8/4/2015 11:06 AM, Me wrote:
> I am using VC++ 2012 and serial transfer using Writefile & Readfile.
> Serial params set to 115200baud, 8bits, no parity, 1 stop, no handshake.
> Does anyone know why when I send data out to a virtual serial port there is
> sometimes a delay up to 10 seconds before it actually goes out the port?

Sorry to break it to you, but your question has nothing to do with C++ 
language (the subject of this newsgroup).  Perhaps you can find a better 
place to ask your OS- and hardware-specific question.  So, to answer 
your question, somebody in the newsgroup dedicated to serial 
communication in Windows (if such exists) would likely know and be able 
to help with your problem, or maybe in the general Windows programming 
forum...

> Sometimes it sends right away.
> This is verified by activity led's on receiving board.
> Receiving side is using FT230X USB/Serial chip.
> Thanks in advance.
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>

V
-- 
I do not respond to top-posted replies, please don't ask

[toc] | [prev] | [next] | [standalone]


#37328

FromÖö Tiib <ootiib@hot.ee>
Date2015-08-04 08:47 -0700
Message-ID<cf96b0d6-46da-48ff-a55e-7b982218e5f1@googlegroups.com>
In reply to#37324
On Tuesday, 4 August 2015 18:06:44 UTC+3, Me  wrote:
> I am using VC++ 2012 and serial transfer using Writefile & Readfile.
 
There are no such things in C++. Did you write those yourself?
If so post your code. Did you mean 'WriteFile' and 'ReadFile' of Windows API?
There is whole MSDN for discussing that thing where  you might get better
answers. 

> Serial params set to 115200baud, 8bits, no parity, 1 stop, no handshake.
> Does anyone know why when I send data out to a virtual serial port there is
> sometimes a delay up to 10 seconds before it actually goes out the port?
> Sometimes it sends right away.

Perhaps you need to write 'Flushfilebuffers' function as well or to use 
'FlushFileBuffers' of Windows API.

> This is verified by activity led's on receiving board.
> Receiving side is using FT230X USB/Serial chip.
> Thanks in advance.

Your receiving board has Windows that just blinks leds? Winner of most
uncomfortable development setup I have heard of.

[toc] | [prev] | [next] | [standalone]


#37346

Fromseeplus <gizmomaker@bigpond.com>
Date2015-08-04 22:59 -0700
Message-ID<ea47a0b3-44e9-4401-95f3-a9442e1256a7@googlegroups.com>
In reply to#37324
On Wednesday, August 5, 2015 at 1:06:44 AM UTC+10, Me wrote:
> Does anyone know why when I send data out to a virtual serial port there is
> sometimes a delay up to 10 seconds before it actually goes out the port?

What platform is this, is it GUI?
Are you sending to an Arduino type thing?
Might get some help from that area.
If Windows, is the OS loaded down doing other stuff at times?

I have found when running non Win type threads, that you have to fit in with the Win message/slicing scheme to get attention.
You need to use an API/MFC setup for GUI operations.

[toc] | [prev] | [next] | [standalone]


#37352

FromMe <me@right.her>
Date2015-08-05 13:11 -0400
Message-ID<cs4udk2114l3.bpisqg5kue2q.dlg@40tude.net>
In reply to#37324
On Tue, 4 Aug 2015 11:06:12 -0400, Me wrote:

> Path: buffer2.nntp.dca1.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail
> NNTP-Posting-Date: Tue, 04 Aug 2015 10:06:27 -0500
> From: Me <me@right.her>
> Subject: Serial communications problem
> Newsgroups: comp.lang.c++
> User-Agent: 40tude_Dialog/2.0.15.1
> MIME-Version: 1.0
> Content-Type: text/plain; charset="us-ascii"
> Content-Transfer-Encoding: 7bit
> Date: Tue, 4 Aug 2015 11:06:12 -0400
> Message-ID: <9ute11n5qcui.j207p1oxg5yh$.dlg@40tude.net>
> X-Antivirus: avast! (VPS 150803-1, 08/03/2015), Outbound message
> X-Antivirus-Status: Clean
> Lines: 13
> X-Usenet-Provider: http://www.giganews.com
> X-Trace: sv3-U9taUM2t3C7dDlXOdibYjLEVM9ryJ16gdDoAy1WdBfgFNWwBYCQygsAPTwh/6i+mKP1eKlSMhR+XUqN!P2zRPvB44Po6qr30OGsFUxngaviCmTPNTu4vUQ37u+QnqTYFEDt5RkSVSCWASYeno/gOeQ==
> X-Complaints-To: abuse@giganews.com
> X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
> X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
> X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
> X-Postfilter: 1.3.40
> Bytes: 1606
> Xref: number.nntp.giganews.com comp.lang.c++:1031422
> X-Antivirus: avast! (VPS 150805-1, 08/05/2015), Inbound message
> X-Antivirus-Status: Clean
> 
> I am using VC++ 2012 and serial transfer using Writefile & Readfile.
> Serial params set to 115200baud, 8bits, no parity, 1 stop, no handshake.
> Does anyone know why when I send data out to a virtual serial port there is
> sometimes a delay up to 10 seconds before it actually goes out the port?
> Sometimes it sends right away.
> This is verified by activity led's on receiving board.
> Receiving side is using FT230X USB/Serial chip.
> Thanks in advance.
> 
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus

Just to give a little more info:
I am using Visual Studio C++ 2012 with a MFC aplication.
I tried asking in a group for MFC but the group seems dead and cannot find
another so I thought I'd give it a shot here.
The receiving board uses a LPC1768 MCU and has a usb to serial chip which
has activity indicator outputs. this board receives data from the PC to
control a custom scanner.

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

[toc] | [prev] | [next] | [standalone]


#37353

FromPaavo Helde <myfirstname@osa.pri.ee>
Date2015-08-05 13:01 -0500
Message-ID<XnsA4EDD5D27E83Bmyfirstnameosapriee@216.166.105.131>
In reply to#37352
Me <me@right.her> wrote in
news:cs4udk2114l3.bpisqg5kue2q.dlg@40tude.net: 

> Just to give a little more info:
> I am using Visual Studio C++ 2012 with a MFC aplication.
> I tried asking in a group for MFC but the group seems dead 

This is probably because MFC has been out of fashion for at least 15 years. 
Also beware that it contains some seriously ill-defined classes like 
CSocket, hopefully you are not using something like this.

Cheers
Paavo

[toc] | [prev] | [next] | [standalone]


#37354

FromCholo Lennon <chololennon@hotmail.com>
Date2015-08-05 15:27 -0300
Message-ID<mptkhp$t6b$2@speranza.aioe.org>
In reply to#37352
On 08/05/2015 02:11 PM, Me wrote:
> On Tue, 4 Aug 2015 11:06:12 -0400, Me wrote:
>
>>
>> I am using VC++ 2012 and serial transfer using Writefile & Readfile.
>> Serial params set to 115200baud, 8bits, no parity, 1 stop, no handshake.
>> Does anyone know why when I send data out to a virtual serial port there is
>> sometimes a delay up to 10 seconds before it actually goes out the port?
>> Sometimes it sends right away.
>> This is verified by activity led's on receiving board.
>> Receiving side is using FT230X USB/Serial chip.
>> Thanks in advance.
>>
>> ---
>> This email has been checked for viruses by Avast antivirus software.
>> https://www.avast.com/antivirus
>
> Just to give a little more info:
> I am using Visual Studio C++ 2012 with a MFC aplication.
> I tried asking in a group for MFC but the group seems dead and cannot find
> another

Microsoft replaced its newsgroups with web forums in 2010. You should 
ask here:

https://social.msdn.microsoft.com/Forums/en-US/home?forum=vcgeneral

Regards


> so I thought I'd give it a shot here.
> The receiving board uses a LPC1768 MCU and has a usb to serial chip which
> has activity indicator outputs. this board receives data from the PC to
> control a custom scanner.
>


-- 
Cholo Lennon
Bs.As.
ARG

[toc] | [prev] | [next] | [standalone]


#37355

Fromred floyd <no.spam@its.invalid>
Date2015-08-05 13:20 -0700
Message-ID<mptr41$2nq$1@dont-email.me>
In reply to#37352
On 8/5/2015 10:11 AM, Me wrote:
> I tried asking in a group for MFC but the group seems dead and cannot find
> another so I thought I'd give it a shot here.

I wanted to buy some meat, but the butcher was closed, so I tried to buy
some at the greengrocer's instead.

[toc] | [prev] | [next] | [standalone]


#37362

From"Osmium" <r124c4u102@comcast.net>
Date2015-08-06 10:23 -0500
Message-ID<d2hcfuFlmf6U1@mid.individual.net>
In reply to#37355
"red floyd" wrote:

> On 8/5/2015 10:11 AM, Me wrote:
>> I tried asking in a group for MFC but the group seems dead and cannot 
>> find
>> another so I thought I'd give it a shot here.
>
> I wanted to buy some meat, but the butcher was closed, so I tried to buy
> some at the greengrocer's instead.

He followed the most obvious alternative he could think of.  And it worked 
for him, didn't it?  I wasn't paying attention, nevertheless I saw at least 
three useful answers.

I'm happy for him and wish him well. 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c++


csiph-web