Wassup ! can you help me to open a serial port (COM1), and to send a string on it as "@0A 1000,100" (ps : in basic, it is like this : open "com1:9600,n,8,1,RS,DS,CS" as #1 print #1,"@0A 1000,100" thanx
Posted on 2001-02-11 07:34:00 by ZeuX
well if you download the Win32 API reference (ftp://ftp.borland.com/pub/delphi/techpubs/delphi2/win32.zip) and look in the communication sections theres a whole load on that. hope that helps. -brad
Posted on 2001-02-11 12:51:00 by Rage9
yourve gotta open the port with CreateFile and for the file name, "COM1",0 or "COM2",0 respectivly. Then to write or read to the port, use the returned handle in a call to WriteFile or ReadFile. However, somewhere in that, you have to set the paremters for port. These are such things as the flow control settings, or port speed, timeouts etc.
Posted on 2001-02-12 04:13:00 by George
in addition: use BuildCommDCBA with f.e. "baud=9600 parity=N data=8 stop=1" and SetCommState to setup the port. beaster.
Posted on 2001-02-12 06:52:00 by beaster
In addition: Im here to remind you that baud is in bytes so 9600 bytes a second is 9.6 kb a second, which isnt that much, i beleive you can make it as fast as you want though. -brad
Posted on 2001-02-12 17:27:00 by Rage9
Microsoft has an technical excellent article on their web site. There is a link at a prevoius post (maybe under parrallel port) It comes with C code which is quite easy to translate. Cheers fiddler
Posted on 2001-02-12 23:37:00 by fiddler