No announcement yet.

Program or batch file to control DTR on a serial port

  • Filter
  • Time
  • Show
Clear All
new posts

  • Program or batch file to control DTR on a serial port

    When I turn on my mp3player in the car, the amps have already been powered up by the remote switch wire and as the motherboard initialises the soundcard, the subs nearly jump out of the boot (trunk)!!!

    I've seen on here a member (called OMS) has a program to put DTR to high to switch on his amps - but as his system is Linux, he's told me he can't help.

    What I need is a program (or batch file) that when put in the startup menu will put DTR to high which will trigger a relay between DTR and ground and then it will turn my amps on. Then, when the system is shut down, the program ends, the relay opens and turns the amps off so that the motherboard doesn't 'thump' them

    Can anyone help???
    Best regards,

    Darren Thrower

  • #2
    Or you could just have a time delay on the speakers of about 5seconds, so when the computer is powered, so is the amp, but the speakers aren't connected for 5seconds or so, so you won't get the thump..


    • #3
      But that won't help with the shutdown - i'll still get the thump when it shuts down.
      Best regards,

      Darren Thrower


      • #4
        Try perl and some kind of script using this module.


        • #5
          If I was a developer, then I wouldn't have had to post this request in the first place!

          Please please - someone must be able to help me - I don't want to damage my ICE!!
          Best regards,

          Darren Thrower


          • #6
            ill throw together a program in C if you want, email me, [email protected]


            • #7
              The shutdown POP is your soundcard powering down you will need to power down the Sub amps first and that wont happen.

              OR just put a switch on your Remote line
              then just switch the amps on After the Pc is booted up!

              [ 12-16-2001: Message edited by: radioman193 ]


              • #8
                I take it your using windows, if you are there is a simple C command called outportbin the dos libary, which you can use to write to a directly to a port at bit level.

                Bellow is a crude example to turn all the data bits on a LPT port to high.

                include <dos.h>

                void main(void)

                To change the DTR all you have to do is change the address. I only used the LPT port as I couldn't rember the address of the DTR.

                An on and off program like to one above could be quite easily called from a batch file.

                I hope this helps a bit.

                And you say people actually pay money for M$ Windows?
       (Does what it says on the URL) (The new car, with zero rust!) (My other site)
                Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)