01-17-2011 11:01 AM
We have configured USB COM port at 625000 baud rate and reading the data continously. When the COM port is read for long time, see some garbage bytes inbetween valid data. Could somebody help what could be the problem?
01-17-2011 12:08 PM - edited 01-17-2011 12:09 PM
Could be a lot of things. How long do you need to run to see this, how much "garbage" are you seeing. How is the serial adapter connected to the other side? Are you using shielded communication wires? How long is this wire? What environment is it running through? Is it running near any electric motors, switch gear, etc.? 625K baud is a pretty fast rate, translating to some where near 4 - 6 Mbits/Sec, What mode are you using, RS232, RS422, RS485?
01-17-2011 12:58 PM
Most of the time value 00 gets inbetween. This garbage value comes one are twice.
After reading the COM port for more than 1 hr this problem happens.
Labview tool runs on windows XP.
The connection from hardware to PC is as below.
1. From hardware RJ45 connects to RS232 connector.
2. Then RS232 cable connects to RS232- USB convertor.
3. The RS232-USB convertor is connected to PC as virtual COM port.
No electric motors or such kind in between. The wire could be nearly 1m long.
01-17-2011 03:41 PM
1m is a trivial length, doubt that causing any problem. I am a little suspicious of the USB-Serial adapter. With an "old school" serial port it was generally hardware until the OS read the buffers where the incoming data was being "stored". Not sure with the USB version, suspect that there is little hardware buffering, and with anything in a non-realtime OS (Windows) a interrupt that puts the USB task in a lower priority and you could have and issue, although figure it would drop data rather than add it.
--- Pondering ---
01-18-2011 06:29 AM
Could you suggest me a solution so that the interrupt in OS doesn't lose any data while running in low priority?
01-18-2011 12:46 PM - edited 01-18-2011 12:47 PM
Can you post the code you are using for capturing the serial data. Or a screen capture of the block diagram, in .png format (NOT .bmp, they are too large a file).
Also, what is happening with the data, are you displaying it, parsing it and doing something with that, what?