473,473 Members | 2,017 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Need help with serial communication

2 New Member
I`m working on an embedded project that implies an external device equiped with microcontroller to communicate via rs-232 with a pc application. I`ve written the pc application in .net C# that receives data using the serial port object provided by .net framework. If I don`t put a delay after the transmit USART function in the embedded device the .net application loose data. If a put a delay the application works fine.
Time is critical for my project. Can anyone please tell me how can I fix this problem ?
Mar 19 '07 #1
2 1163
Cletus Wilbury
1 New Member
I`m working on an embedded project that implies an external device equiped with microcontroller to communicate via rs-232 with a pc application. I`ve written the pc application in .net C# that receives data using the serial port object provided by .net framework. If I don`t put a delay after the transmit USART function in the embedded device the .net application loose data. If a put a delay the application works fine.
Time is critical for my project. Can anyone please tell me how can I fix this problem ?
I've worked on similar problems, and it helps if you can analyze the timing carefully.
If you need to look at the data coming across with precise time stamping, my friend has designed a useful device just for that purpose.

EZ-Tap

Comes with Windows software to read/store/display data the device sends out on USB port.

EZ-Tap forum

I just set up that forum, first time I've ever done it, seems to work?
Mar 24 '08 #2
Plater
7,872 Recognized Expert Expert
Firstly, if you are using a USB->Serial converter, there is really not anything you can do, the lag is due to the conversion between serial and usb (and back) withen the drivers/hardware for the device.

If you're using a hardware uart on the pc side (built in serial port), check how you do the reads. (Don't do them only in the DataReceived event because you will miss some events and fall behind)
Mar 24 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: kamarudin samsudin | last post by:
Hi all, I try to invoke python serial script via my browser using PHP (exec function). For the serial communication, i used pySerial module. It fine when it run it as root but when i try to run...
1
by: Jamil | last post by:
I have a target box connected to my desktop (x86 Windows 2000) PC through a serial cable (COM port). The target box running on different processor and OS. The target box needs to send a specific...
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...
6
by: Ken | last post by:
When running a program in the debugger, what would cause it to crash without any error messages? I get "The program has exited with code 0 (0x0)". The program is a MDI app with threading for...
0
by: Back 9 | last post by:
Hello, I am converting c++ codes to C# now. When I get to serial communication parts, I found the data types used in C++ are different from C# which is not at all supprising at me. But problem...
5
by: Mo | last post by:
Hi, I have an application where I read a serial port data from a barcode and set the labels on a form. I also have a textbox and button where you can enter the data and here is the problem. if I...
0
by: ghjk | last post by:
I want to read sms from GSM modem using C# in serial communication. I wrote the code. But i want to do it automatically. I put my code here and please tell me how can i do it automatically. ...
4
by: nmsreddi | last post by:
Hi friends , after a long busy work happy to back to forums, i have developed a windows application(C#2,0) for serial communication. the aim of my application is to connect to external...
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...
4
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.