SERIAL PORT power control

Does anyone know how to send the 5v through

the serial port in qbasic???? For running

motors and whatnow.... is there a way to turn

the volts on and off?


  • First - determine how much power your motor is going to require (sink) then determine how much power your particular UART can supply (source).

    If the sink (including peek) is under what you can source then you can directly connect the motor to ground and some control line such as Request To Send (RTS). Having done that you would be able to control the single bit by manipulating the MODEM Control Register (MCR) of the UART (base + 4).

    If the sink (including peek) is close to or over what you can source then you will need to use the selected control line as a base current driver to a transister or other switching device.

    If you are building something to amuse yourself then have fun - if this is a serious control project then feel free to email me. Having spent better than 25 years doing this for commercial an d military applications I may be able to help.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!