Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Reading status of serial port pins
Name: JimW1234567 Date: August 12, 2003 at 01:36:37 Pacific OS: MSDOS CPU/Ram: 800MHz 256MB
Comment:
Can someone post some code that will read the level of the com port (RS232) lines under MSDOS/Windows?
I'm trying to write a small decoder program for an interface that uses only the CTS line of the serial port for it's output, to provide either logic 1 or logic 0.
Name: KTS Date: September 13, 2003 at 09:41:28 Pacific
Reply:
Actually, it sounds to me like you are NOT in DOS, but rather you are trying to use the .NET framework to do this. If that is the case, I have both bad news and good news. The bad news is that MS did not include any .NET framework classes that will do this. You MUST currently use a P/Invoke and utilize the old Win32 code. Simply put you use Interop to dervive a baseclass that can then be used in any language VB, C#, C++, J#, etc. There is a very good example of how to do this at:
Summary: I'm working with an Inertial Measurement Unit (RS232 Interface). All i've done so far is an open followed by a read on the serial port. Here's a sample output: Read Status is 100 @Ð !!!!¬þ 1!!¬¥...
Summary: You can open the COM1 port and write to it just as it is an ordinary DOS file, but to read from a serial port isn't so easy... The reason is serial communications are interrupt driven and you need an ...
Summary: If you're looking to go for C or ASM programming, or just regular understanding of serial port programming. Nothing beats HelpPC http://www.faqs.org/faqs/assembly-language/x86/general/part1/section-6....