Results 1 to 8 of 8

Thread: Program or batch file to control DTR on a serial port

  1. #1
    Low Bitrate
    Join Date
    May 2001
    Location
    Dunstable, England
    Posts
    70

    Post 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
    http://www.percyt.com/mp3player.htm

  2. #2
    Newbie
    Join Date
    Jul 2001
    Posts
    4

    Post

    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. #3
    Low Bitrate
    Join Date
    May 2001
    Location
    Dunstable, England
    Posts
    70

    Post

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

    Darren Thrower
    http://www.percyt.com/mp3player.htm

  4. #4
    cj
    cj is offline
    Low Bitrate
    Join Date
    Aug 2001
    Posts
    57

    Post

    Try perl and some kind of script using this module.

  5. #5
    Low Bitrate
    Join Date
    May 2001
    Location
    Dunstable, England
    Posts
    70

    Post

    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
    http://www.percyt.com/mp3player.htm

  6. #6
    Newbie
    Join Date
    Dec 2001
    Posts
    7

    Post

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

  7. #7
    Low Bitrate radioman193's Avatar
    Join Date
    May 2001
    Location
    Dansville NEW YORK
    Posts
    81

    Cool

    The shutdown POP is your soundcard powering down you will need to power down the Sub amps first and that wont happen.
    AMPS LAST ON AND FIRST OFF.

    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. #8
    Rob
    Rob is offline
    Maximum Bitrate Rob's Avatar
    Join Date
    Aug 2001
    Location
    Missing In Action
    Posts
    779

    Post

    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)
    {
    outportb(0x378,127);
    }

    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.

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •