gc1m+@andrew.cmu.edu (Geoffrey I. Cox) (11/17/89)
I am working on a project that involves an A/D converter which is connected to an IBM PC through COM1:. I am having a great deal of difficulty establishing the connection between the device and the Turbo C programs I write. The manual for the converter has this command in Basic (which works in Basic): 10 OPEN "COM1:9600, N, 8, 1, CS, DS" AS #1 How do I achieve this in Turbo C? If possible, lease send replies to my account. Thanks in advance. ____ ||||| ___________________________________________________________________ >--{o.o}--> Geoff Cox | ARPA => gc1m@andrew.cmu.edu |`-'| Carnegie-Mellon University | BITNet=> gc1m%andrew@cmccvb.bitnet _____`---'____________________________________________________________________
smasters@gmuvax2.gmu.edu (Shawn Masters) (11/19/89)
You need to use the TurboC function bioscom(). The equivalent TurboC call for that BASIC statement(I had to look it up, honest I don't use BASIC), is: bioscom(0,0xE3,0); This sets up the port the same way. For more or different settings, the TurboC manual provides a short to the point explination. Shawn Masters George Mason University smasters@gmuvax2.gmu.edu