PORTS Forum
Ports and Interfaces => Serial Ports => Topic started by: philbert on November 29, 2012, 12:58:47 am
-
Hi, We are in the process of porting some DOS/C code to Windows-The application is required to set/clear the Aux Output 2 bit on the Modem Control Register. In the DOS code is was a simple task of writing the required byte to the serial port address offset to the MCR. Under Windows I can't see how it can be done, also with the .NET serialport class there doesn't appear to be anyway.
I've googled away and haven't found a lot, mainly only to do with parallel port direct pin access.
Is there anyway to access the MCR from Windows/.NET? is a device driver the only way?
Cheers,
Phil
-
I think you would need to use an inpout DLL, which requires knowing the port's address. See:
http://www.janaxelson.com/parport.htm#Programming
Or revise the code so you don't need that bit.