Led controlling through hyperterminal or serial port



  • Hi,

    I want to switch on and off the LED and increase and decrease the brightness of the LED through hyperterminal.if i send command 1 then LED should glow.

    how to read a word from a hardware port?
    how to output a word to a hardware port?

    im using outport to output word toa hardware it shows error:outport is not declared in scope.

    please do suggest some ideas to do it.

    thank you in advance


  • Lifetime Qt Champion

    Hi,

    What are you using to communicate with your serial port ? What OS are you running ? What version of Qt ?



  • windows 7.im using QT evalution version.Im using USB UART bridge.my boss told me to send 5V from hyperterminal or serial port ,then LED should glow which is connected to RS232.

    thank you in advance.


  • Lifetime Qt Champion

    Then it sounds like QSerialPort is a good starting point



  • You can do something like this because some of the serial port signals are voltage driven. Using QSerialPort would allow you to turn those signals on/off.

    You could hook your LED to the TX line and send characters but the pulse rate probably won't give you much "on" time.

    Most serial port signals are at a higher voltage (even as high as 12v) and could provide more current to your LED than you should give it. So do the calc and put in a series resistor to protect your LED and your serial port.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.