Shop OBEX P1 Docs P2 Docs Learn Events
Prop restarts after starting serial communication — Parallax Forums

Prop restarts after starting serial communication

propwellpropwell Posts: 87
edited 2009-05-19 06:53 in Propeller 1
Hi together,

i've got a Propeller-Program running, which uses the SerialMirror.spin (but the same problem appears with the FullDuplexSerial.spin).
When I start the serial comunication with "start(...)", after about half a second the propeller restarts completeley for about 3 or 4 times, and then the program runs completely perfect.

Is there any thing, that can make the Propeller restart, a conidition that affects the Serial Comunication?

Thank you,

propwell

Comments

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-05-17 16:28
    Just a guess but the reset is controlled from the dtr line (pin4) Is the thing you are communnicating with using handshakes?? Try with "No flow control"
  • hover1hover1 Posts: 1,929
    edited 2009-05-17 16:53
    propwell said...
    Hi together,

    i've got a Propeller-Program running, which uses the SerialMirror.spin (but the same problem appears with the FullDuplexSerial.spin).
    When I start the serial comunication with "start(...)", after about half a second the propeller restarts completeley for about 3 or 4 times, and then the program runs completely perfect.

    Is there any thing, that can make the Propeller restart, a conidition that affects the Serial Comunication?

    Thank you,

    propwell
    Are you running the program with the USB cable disconnected? If so, we just had a recent conversation on this at:

    http://forums.parallax.com/showthread.php?p=790298

    I'm running Simple_Serial.spin to talk to a serial LCD in a GPS application. The pullup on A30 worked for me.

    Jim

    Jim
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-05-18 13:50
    Hello Popwell,

    usual PC-terminalsoftware toggles the DTR-PIN when opening the com-port

    PST.EXE from parallax does it NOT but ALL other that I have tested

    If you use a connection that does noz include the DTR-Line it won't reset.
    But you need the DTR-line for programming the Propeller

    ou could use some other two pins to drive a serial connection

    best regards

    Stefan
  • propwellpropwell Posts: 87
    edited 2009-05-18 13:58
    i'm sorry, but as i'm pretty new in the Microcontrollerbusinnes ( [noparse];)[/noparse] ) i don't really understand your answer:
    - what is the DTR-Pin on the Prop?
    - in my Program, i use Pins 30 an 31 for the serial comunication! is one of these the DTR-Pin?

    Thank you very much for your answers!
  • RaymanRayman Posts: 14,827
    edited 2009-05-18 15:44
    Sounds like that USB cable problem as hover1 mentions...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-05-18 15:56
    propwell,

    The PC's (or USB's) DTR pin is used by the Propeller Tool to reset the Prop to begin an upload sequence. Any time a connected PC toggles DTR, the Prop's /RST pin is pulled low momentarily, and the Prop resets. What StefanL38 points out is that most terminal programs, when they open a port, toggle the port's DTR line. Rayman and hover1 think that DTR is getting toggled by backfeeding power through the Prop Plug or onboard USB chip. Which of these is true depends on the answer to this question: When you observe this behavior, is your PC connected to the Prop, or not?

    -Phil
  • propwellpropwell Posts: 87
    edited 2009-05-18 20:48
    well actually i don't have the Propeller here at the moment, but i'm pretty sure that this problem only occured AFTER disconecting (and restarting) the Propeller...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-05-18 22:59
    In that case, add a 2.2K pullup to pin A30, and the problem should go away.

    -Phil
  • hover1hover1 Posts: 1,929
    edited 2009-05-18 23:56
    Phil Pilgrim (PhiPi) said...
    In that case, add a 2.2K pullup to pin A30, and the problem should go away.

    -Phil
    Yup, worked for me.

    @propwell
    If you want to understand the problem more, these are some of the·past posts on the problem:

    http://forums.parallax.com/showthread.php?p=790298

    http://forums.parallax.com/showthread.php?p=651731

    And Phil diagnosised it pretty well.

    Let us know if that works for you.

    Jim

    ·
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-05-19 06:53
    On my home made demoboards I pull P30, P31 and the reset pin high with 4.7K or 10K resistors and have built in jumpers so that I can isolate restet, and-or reverse P30, P31.
Sign In or Register to comment.