Shop OBEX P1 Docs P2 Docs Learn Events
Propeller and Hyper — Parallax Forums

Propeller and Hyper

NewzedNewzed Posts: 2,503
edited 2007-09-09 12:03 in Propeller 1
I am using Hyper for my Prop display.· If I want to log data overnight, I have noticed that if I remove the Prop Plug, the Prop continues to log and I can shut down my PC.· When I reboot the PC in the morning, the prop program stops completely when I re-insert the Prop Plug and I have to reset the Prop.· Why does the Prop shut down when I insert the Prop Plug?· All data logged up to the time I re-insert the Prop Plug is good and I can read the EEPROM after resetting.

Sid

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Yesterday is history, tomorrow is a mystery, and today is a gift.

That is why they call it the present.

Don't have VGA?
Newzed@aol.com
·

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-04 23:25
    Sid,
    When you insert the PropPlug, it triggers the reset line. Remember, the Propeller needs the reset line to be triggered in order to start the boot loader. The 4 pins on the PropPlug are Ground, Receive-Data, Transmit-Data, and Reset. The easiest way to prevent this is to make a short jumper to go between the PropPlug and the plug for the PropPlug. Put a SPST switch in the reset line. When you want to use the programming port for just data, open the switch. When you want to use it for programming, close the switch. The Propeller will probably reset when you close the switch and that won't matter if you're going to program it.
  • NewzedNewzed Posts: 2,503
    edited 2007-09-04 23:32
    Thanks, Mike - I thought it might be something like that.· Can I use a NO Tact Switch or does it have to stay closed when I'm programming?· I can make a little adapter board on SuperMill that will do the trick.· I just need to know if it has to be a switch or if a pushbutton will do.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-04 23:46
    A pushbutton will do if you can hold it closed during the downloading process. A toggle switch is easier since you don't have to use the mouse to click the menu item for Program EEPROM or Program RAM while you're trying to reach and hold down the pushbutton at the same time.
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-09-05 00:15
    Why not a NC which you press while inserting the prop plug?
  • Nick WaldvogelNick Waldvogel Posts: 71
    edited 2007-09-05 00:26
    Would the prop reset when you release the switch if you use a NC?
    Fred Hawkins said...
    Why not a NC which you press while inserting the prop plug?
    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-05 03:34
    Nick,
    The Prop shouldn't reset when you release the switch. If you look at the Protoboard schematic (for example), the reset line on the chip is attached to the PropPlug input and there's a reset switch to ground. The Propeller holds the reset line high through a pullup except after a power up when the "brown out" detector senses the power up.

    The PropPlug has a DTR output that goes through a small capacitor to the Protoboard and this lets a short reset pulse go through when DTR goes from high to low (which also happens when the USB is disconnected or closed.
  • NewzedNewzed Posts: 2,503
    edited 2007-09-05 16:37
    Mike, I found a litle PCB mount SPST slide switch in my spare parts bin, so I laid out the board, ran out to the shop and made the board.· Assembled it, plugged in into my Proto Board and it works great.· Now, if I am reading and storing data and displaying it on Hyper, I set the switch to OPEN and close Hyper.· The Prop keeps running, and if I turn Hyper on again, it picks right up with the current reading.· If I pull the Prop Plug with Hyper running, Hyper stops displaying but the program keeps running.· If I plug the Prop Plug back in the program keeps running and Hyper picks up with the current reading.· Outstanding!

    My SuperMill has more than paid for itself.· Any time I need a little board like this one, I run out to the shop, set up SuperMill and in less than an hour my board is etched, drilled, trimmed and deburred.· Everybody should have one!

    Thanks for your help, Mike.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • NewzedNewzed Posts: 2,503
    edited 2007-09-08 14:03
    For Mike Green:

    I'm having a little bit of trouble with the switch-modified Prop Plug adapter.· When I pull the Prop Plug, the Prop will log data for X amount of time -·one time·I got to Write #883 before it quit, another time I got to #1055 before it quit.· Last night I hooked everything up with the switch in the Open position and the Prop Plug connected.· Started logging, left my PC on overnight, and this morning it was still logging fine.· I finally stopped it at #1503 Writes.· It occurred to me, that with the Prop Plug disconnected, Rx and Tx are floating.· Do yoiu think it would help if I installed a 10K pullup - or pulldown - on the Rx and Tx pins where they are soldered in to the Proto Board.· Pulldown would be easier, but I can make it a pullup - whichever you suggest.· The·Write can be terminated by pressing any key, and perhaps a random spike is shutting down the·Write operation.

    Sid



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
  • NewzedNewzed Posts: 2,503
    edited 2007-09-09 12:03
    Mike, don't worry about the pullups - I solved my own problem.· In order to stop the read whenever I wanted to I had written:

    ans := comm.rxtime(5000)
    ··· if ans·=>0·····
    ····· menu

    I changed it to:

    ans := comm.rxtime(5000)
    ··· if ans == "q"
    ····· menu

    and the program ran for 21 hours without a problem. Prop Plug disconnected and PC off.

    Sid

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Yesterday is history, tomorrow is a mystery, and today is a gift.

    That is why they call it the present.

    Don't have VGA?
    Newzed@aol.com
    ·
Sign In or Register to comment.