Shop OBEX P1 Docs P2 Docs Learn Events
Disableing DTR — Parallax Forums

Disableing DTR

Naphtali MooreNaphtali Moore Posts: 42
edited 2007-05-11 17:12 in BASIC Stamp
Ok, I·have a BOE with a BS2sx. I am using the dedicated serial in/out for runtime communications between the stamp and a PC. I have been able to disable the DTR pin physically to allow serial communications with out resetting the Stamp. NOW... I want the stamp to be able to do it on its own.

I know not this black art you call electronics, hehe. But I was thinking that if I just put a transistor on the DTR line and ran the control to PIN 1 of the STAMP then I could enable\disable the DTR line just by setting that pin to HIGH and LOW. Would this work? Which type of transitor should I use PNP, NPN?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-05-11 05:53
    Naphtali,

    This is probably not something you want to do. The BASIC Stamp editor requires the DTR-to-reset action for uploading programs. Consider the case where your program has disabled DTR and kept it disabled. How would you then program the Stamp again without some sort of physical intervention?

    -Phil
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-11 13:43
    The only situation I could come up with is where you send a command to the BASIC Stamp to re-enable DTR. You would have to add this functionality to the original programming. Then if for some reason the program failed you’d be in the situation Phil described. A transistor by itself won’t work as it will inherently invert the signal. You could use it to activate a small Reed-Relay though. That might be simpler to connect.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-11 16:28
    To the OP…Check back on this thread occasionally…One of my colleagues has a possible solution for you which is pretty simple. He’ll post it once he’s tested it. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Beau SchwabeBeau Schwabe Posts: 6,566
    edited 2007-05-11 17:12
    How about a solution using 1 resistor and 1 diode?

    Here is a simple program that will prevent "future" programs from entering the BS2 for 10 seconds.


    ' {$STAMP BS2}
    ' {$PBASIC 2.5}
    
    LOW 1         'Make pin LOW ; disable incoming DTR traffic
    PAUSE 10000   'Pause for 10 seconds
    HIGH 1        'Make pin HIGH; enable incoming DTR traffic    ...This could also be made an INPUT and have the same functionality.
    
    

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 5/11/2007 7:04:12 PM GMT
    631 x 735 - 173K
Sign In or Register to comment.