in Education by
I'm working on some idea connected with RS-232 interface manipulation. I can open this port, configure it, write or read data and do some other things with WinAPI. But I don't know how to control individual pins. Well I can take control of DTR and RTS lines via EscapeCommFunction function. But I need to manipulate with TxD and RxD lines ("turn" them "on" or "off", binary). Is this possible in Windows 7? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You can't manipulate the RxD line as it's an input. You can set the TxD line to be continuously ON or OFF by playing with the com port's break state. SetCommBreak and ClearCommBreak would be the API functions that let you do that. If only one output has to be activated at a time, you can expand your 3 outputs to 8 outputs by using a decoder chip, such as the 74137. Beware of transient outputs while switching inputs. You can also use a shift register chip (such as the 74164) to expand 2 outputs (one clock and one signal) into 8 outputs. You can get even more outputs by daisy-chaining shift registers. If you decide to use these ICs, make sure you don't overload their inputs. RS-232 voltage levels are not the same as TTL voltage levels. Check the spec sheets. You might have to use clamping diodes, or a RS-232 transceiver. Another alternative is to use the parallel port. The parallel port has 8 bidirectional lines plus a small handful of other control lines. Check out the Inpout and Uniportio libraries on how to access the parallel port from Windows. Seeing that serial and parallel ports are now obsolete, I think your best bet is to use an USB I/O board. You can find some that are cheaper than a parallel cable. Some of them have terminal blocks that make it easy to interface with your experiment.

Related questions

0 votes
    I see many user interface control libraries for .NET, but where can I get similar stuff for win32 using ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    There are two strings in a program. Each of them contains a path to some file or folder. How can ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    There are two strings in a program. Each of them contains a path to some file or folder. How can ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    There are two strings in a program. Each of them contains a path to some file or folder. How can ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    How many messages does the queue for a standard window hold? What happens when the queue overflows? The ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    I'm using a 3rd party DLL written in unmanaged C++ that controls some hardware we have. Unfortunately ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    I'm using a 3rd party DLL written in unmanaged C++ that controls some hardware we have. Unfortunately ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    I'm using a 3rd party DLL written in unmanaged C++ that controls some hardware we have. Unfortunately ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 5, 2022 in Education by JackTerrance
0 votes
    I'm using a 3rd party DLL written in unmanaged C++ that controls some hardware we have. Unfortunately ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 5, 2022 in Education by JackTerrance
0 votes
    Compare and contrast the following technologies (i) SRAM and DRAM (ii) USB and Serial Port (iii)Joystick and ... and LED display Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    I am using a program that talks to my COMM port, but I have made another program that I want to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    I am using a program that talks to my COMM port, but I have made another program that I want to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    I am using a program that talks to my COMM port, but I have made another program that I want to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 10, 2022 in Education by JackTerrance
0 votes
    I'm looking for a way to determine if a COM is a standard COM or if it's an SPP COM, ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jan 15, 2022 in Education by JackTerrance
0 votes
    What are GPIO Pins used in Raspberry Pi boards?...
asked Jan 20, 2023 in Technology by JackTerrance
...