I am working on developing a UART sniffer application on VC++ 2010. I want to read the TX and RX lines of the UART between two of my devices. And i am building intelligence into my UART sniffer application, in order, to differentiate messages, log the traffic and in turn help me debug the system.
I am using two FTDI cables to tap the TX and RX lines of the UART. I have the application ready with most of the application stuff which adds intelligence to my application along with the working COM port read.
I am using tserial.cpp as the underlying COM Port driver for my application.
But, i have an issue, that is the latency involved in reading the COM Ports. the UART that i want to sniff runs at 1Mbits/s. It looks to me like there is large latency while reading the COM Ports. And i usually end up with 400-500 bytes on a read, instead of being able to read individual messages sent on each line (TX and RX).
Can anyone please share your experience and guide me here.As to how to go about reducing this latency?
Thanks, Suhel