473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

serial communication too fast?

Hi,

I'm writing a program in C# which logs data comming from a com port. the
port is set up 8 bit, no parity, 1 stop bit (n-8-1), @ 38400 baud. I'm
supposed to receive this data and simply display it in a listbox. No
problem there. Once I start iterating through the data to do some
manipulation though, it wont print to my listbox unless I put a break point
in my code. Then I get some data printed. A few seconds later, the same
thing happens, and I put a break point in the code again and more data gets
printed. I'm thinking that the data is comming too fast, but I'm running on
a P4 with 512M ram. It just doesn't make sense.
The data comes in fine if I just take it in and print it (like on
hyperterminal for example).

any ideas?

regards,

marco
Nov 15 '05 #1
2 2430
have your listbox get refreshed every few seconds
(Listbox.Refresh())
you can use a timer and on the tick event refresh the
listbox.
-----Original Message-----
Hi,

I'm writing a program in C# which logs data comming from a com port. theport is set up 8 bit, no parity, 1 stop bit (n-8-1), @ 38400 baud. I'msupposed to receive this data and simply display it in a listbox. Noproblem there. Once I start iterating through the data to do somemanipulation though, it wont print to my listbox unless I put a break pointin my code. Then I get some data printed. A few seconds later, the samething happens, and I put a break point in the code again and more data getsprinted. I'm thinking that the data is comming too fast, but I'm running ona P4 with 512M ram. It just doesn't make sense.
The data comes in fine if I just take it in and print it (like onhyperterminal for example).

any ideas?

regards,

marco
.

Nov 15 '05 #2
Found an answer, I actualy put a thread.join(250 ms) and it solved the
problem.
"the man" <an*******@discussions.microsoft.com> wrote in message
news:04****************************@phx.gbl...
have your listbox get refreshed every few seconds
(Listbox.Refresh())
you can use a timer and on the tick event refresh the
listbox.
-----Original Message-----
Hi,

I'm writing a program in C# which logs data comming from

a com port. the
port is set up 8 bit, no parity, 1 stop bit (n-8-1), @

38400 baud. I'm
supposed to receive this data and simply display it in a

listbox. No
problem there. Once I start iterating through the data

to do some
manipulation though, it wont print to my listbox unless I

put a break point
in my code. Then I get some data printed. A few seconds

later, the same
thing happens, and I put a break point in the code again

and more data gets
printed. I'm thinking that the data is comming too fast,

but I'm running on
a P4 with 512M ram. It just doesn't make sense.
The data comes in fine if I just take it in and print it

(like on
hyperterminal for example).

any ideas?

regards,

marco
.

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andreas Horneff | last post by:
Hi @ all, I've got a problem with serial communication in Borland C++ Builder. I've already found a lot of stuff about serial communication in the internet, but it dosen't work. What I want...
11
by: sarah | last post by:
hI, I have a project. I need to realise serial communication between PC and Altera FPGA in c or c++. The function of FPGA is working well. it can send data to uart. Does anybody know how to...
3
by: carmen | last post by:
I'm working in an aplication for a Smart Device that need to "talk" with a printer continuosly through the serial port. I'm trying to use the John Hint's sample code "Use P/Invoke to develop a .NET...
4
by: Vidya Bhagwath | last post by:
Hello Experts, I am porting the C++ code into the Visual C#.NET. My C++ code is mainly based on the serial communication. So I am using the windows structure such as DCB.. etc and the windows...
6
by: Leandro Berti via DotNetMonster.com | last post by:
Hi All, I wrote a code to do serial communication with an equipament. When i use the code outside of threaded class it seens work properly, but when i put inside a class and execute a thread in...
4
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. ...
4
by: =?Utf-8?B?RG91ZyBE?= | last post by:
Hey all- I am pretty new to serial communication, but from what I am experiencing it is a little slow in VB.net (2.0). Using other tools I can communicate with my hardware extreamly fast without...
4
by: max_mont | last post by:
Hi all, I'm a newbie in .NET technology. I've already developed Serial communication applications in C++ (WIN32). And I wanted to migrate to .NET technology. There is a serial component in...
2
by: Adrian Chen | last post by:
please help me! I come across a problem. Now I develop a finger print management system which is based on B/S.When users click a button in the web pages, a device connected to the COM1 serial port...
0
by: Dhananjay | last post by:
Hi, I am working on an VB.Net application which I want to communicate to external device using comm port (Serial Port) . So for that first I am trying to simulate the communication on serial...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.