Holger Bruns wrote on Mon, 02 Nov 2009:
Felipe Monteiro de Carvalho schrieb:
It may be useful to know that there is a serial communication example
using Synaser here:
http://wiki.lazarus.freepascal.org/Hardware_Access#Serial_Communication
Yes, thank you. I checked this out. The procedure reccvbyte, as used
in this manner:
Write(IntToHex(ser.RecvByte(1000), 2), ' ');
reads every incoming character as zero. Simply, is does not work.
Are you certain that your serial port is actually configured
correctly? Many people have successfully used these units in the past,
so it most likely seems like a configuration or usage problem.
Moreover, the serread function you posted earlier is about as low
level as you can get: it directly reads bytes from a handle using a
system call. If that never works, then the problem is almost certainly
completely unrelated to anything FPC.
You may also want to post the complete test program that you are
using, maybe there is an error somewhere.
I try to implement a direct port access. If this also leads to
access errors, I should give it up. Embarassing.
Please stop complaining in virtually every reply to people trying to help you.
Jonas
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal