Click to See Complete Forum and Search --> : Serial problem


chee0007
January 14th, 2008, 08:53 AM
Hi.
I got a serial card (high speed serial card) that is modified with a 8Mhz crystal. When i did handshaking with the card itself, (like connecting com1 and com2, both ports are from the same card), it is able to send and receive the correct data.

However if i get another computer with a standard serial port and tried to send data to the high speed card via a cable, it received garbage.

I suspected that the high speed serial is using a non standard baud rate, with a speed mutiplier in play.

Hence i tried to guess the correct baud rate of the high speed serial card by doing the following.

Computer 1 (standard serial card)
Keeps sending data out at 9600 baud rate

Computer 2 (modified high speed )
I did a baud rate polling, something like this...
for(iBaud=100;iBaud<9600;iBaud++)
Connect(comport, iBaud)
recvData(buf, 10)

Theoritically, it should be able to receive the correct message from computer 1, but unfortunately, i don't.

Can I know what is wrong with this method?
Thanks and regards!

chee0007
January 16th, 2008, 09:24 AM
anyone knows the solution?

S_M_A
January 16th, 2008, 01:57 PM
I agree, that should have worked unless the high speed board have some limitations that disables it from getting close to the 9600 baud setup on standard PC. Somewhere in the back of my head I find the figure 5%, if I'm correct that's the maximum allowed difference in actual baudrate that would work in (might just as well be less...). Maybe you should let your loop go beyond 9600? It might be that the high speed board truncates baud setting to closest lower setting that can be acheived.

Since you get garbage flow control issues shouldn't be any issue I guess.