Need help regarding serial Communication Programming
-
I have to check whether the CTS signal and RTS Signal in serial port. I have modified my dcb.fOutxCtsFlow=TRUE; dcb.fRtsControl=RTS_CONTROL_ENABLE; I am placing a LED between pin7(RTS) and pin5 for GND to check whether voltage occurs in that pin7. But no voltage occurs. S.Yamini
-
I have to check whether the CTS signal and RTS Signal in serial port. I have modified my dcb.fOutxCtsFlow=TRUE; dcb.fRtsControl=RTS_CONTROL_ENABLE; I am placing a LED between pin7(RTS) and pin5 for GND to check whether voltage occurs in that pin7. But no voltage occurs. S.Yamini
-
I have to check whether the CTS signal and RTS Signal in serial port. I have modified my dcb.fOutxCtsFlow=TRUE; dcb.fRtsControl=RTS_CONTROL_ENABLE; I am placing a LED between pin7(RTS) and pin5 for GND to check whether voltage occurs in that pin7. But no voltage occurs. S.Yamini
-
what is your OS? if your OS is windows XP/2003 or later , you can work with com/parallel port directly, because this ports close by Microsoft, you can use API for this work. successful
My OS is Windows Xp. Can u tell me which API I can use S.Yamini
-
I have to check whether the CTS signal and RTS Signal in serial port. I have modified my dcb.fOutxCtsFlow=TRUE; dcb.fRtsControl=RTS_CONTROL_ENABLE; I am placing a LED between pin7(RTS) and pin5 for GND to check whether voltage occurs in that pin7. But no voltage occurs. S.Yamini
-
Please give more details. I think you need to: 1. Open the serial port (CreateFile) 2. Get the state of the DCB (GetCommState) 3. Set dcb.fOutxCtsFlow and dcb.fRtsControl 4. Set the state of the DCB (SetCommState) Are you doing all of these?
I am sorry I have Placed my question wrong. I have to control a relay using serial port .The RTS and DTR should become high so that I control my relay. S.Yamini
-
I am sorry I have Placed my question wrong. I have to control a relay using serial port .The RTS and DTR should become high so that I control my relay. S.Yamini
-
I meant, we need more details about what you are doing in your program - a longer code section, maybe. Once you set the parameters in the DCB, did you do:
SetCommState(hPort, &dcb);
I am trying to control a relay via serial port using RTS and DTR pins in serial port . I have set these two pins high via VC++ coding or C. Can we suggest me something. S.Yamini
-
I am trying to control a relay via serial port using RTS and DTR pins in serial port . I have set these two pins high via VC++ coding or C. Can we suggest me something. S.Yamini
It's difficult to help if you don't show what you are doing already. Maybe you are missing a step in your program, so the lines are not actually going high. If you are setting the pins high, maybe they can not supply enough current to turn on a relay. Instead of using the control lines, what about using lines on a parallel port? Have a look at this article www.codeproject.com/useritems/PaPiC.asp[^] - it uses the InpOut32 library, which allows direct access to I/O ports.