Shop OBEX P1 Docs P2 Docs Learn Events
Question about unusual resets on the Prop — Parallax Forums

Question about unusual resets on the Prop

RICoderRICoder Posts: 91
edited 2009-02-25 08:49 in Propeller 1
First off, I'm only about 99.9999% sure its a reset [noparse]:)[/noparse]

The setup:
I have a prop running a DS1620 thermostat module and some LEDs as well as an XBee.· I also have an LCD running.· As such, there is a 3.3v power supply going to the prop and a 5v supply going to the LCD (which needs that to drive it).· Of note (probably) is that the two power sources are plugged in to different wall-warts due to me not having a 3.3v regulator handy, so I had to use some pre-fab supplies I had made earlier.

When funky things started happening:
Turns out some nice fellow on this board told me the reason my prop wouldn't drive the LCD was that there needed to be a shared ground, and so it was.· I ran a jumper from the ground off the 5v to the ground off the 3.3v and blammo I could drive the LCD.· This may have nothing to do with it.

I have the terminal window running on my laptop for another XBee, which is the coordinator for the PAN.· It will show any transmission it recieves, and as I was sitting here doing other things, I noticed that periodically, some data would show up.· The data itself is weird in that it is the "+++ ATGN...etc" command and shouldn't EVER be transmitting, due to it being a direct command to the module.· Associated with that strangeness is the fact that that code is run once at the very beginning of the code, and shouldn't execute again unless there is a reset.

So, why the heck would I be getting that reset?· Any thoughts?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-25 05:37
    You didn't say about what board you're running or how it's connected. A reset can be caused by electrical noise. It can also be caused by a PropPlug if it's left connected to the Prop, but disconnected from USB and the PC. This has been discussed before on this forum and has to do with a program attempting to transmit to an unpowered PropPlug, accidentally powering the PropPlug from the transmit line through a "sneak path" through the PropPlug, and causing a reset. The solution is to unplug the PropPlug. If you're using a Demo Board, it's more difficult.
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-02-25 05:41
    RICoder,

    Can you post your code and schematics?

    How many LEDs? ... Do they have·current limiting resistors on them?

    What clock frequency are you running at?· ... have you tried lowering the PLL setting?

    To determine without any doubt if you are resetting, you can place a small piece of code·at the top of your program that blinks an LED, or chirps a speaker.

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

    IC Layout Engineer
    Parallax, Inc.
  • RICoderRICoder Posts: 91
    edited 2009-02-25 06:32
    @Mike: I am using a Prop Stick USB on a breadboard.

    @Beau: There·4 LEDs and they are running 2 off the XBee and 2 off the DS1620 all with 1k resistors.

    I just reformatted my PC and didn't back up my libraries for Eagle (D'OH!) so the schematic will have to wait a bit.

    That said, there is·a USB cable dangling off the setup plugged into the propstick and not the PC...I wonder if that is the funkiness.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-02-25 06:52
    RICoder said...
    That said, there is a USB cable dangling off the setup plugged into the propstick and not the PC...I wonder if that is the funkiness.
    I'd bet money on it.

    -Phil
  • RICoderRICoder Posts: 91
    edited 2009-02-25 07:03
    Nope, I unplugged the USB cable and still happens.

    "+++ATGT 3,CN" comes over the RF every so often (no discernable pattern on time). This is bad because:
    a) that happens near the first line of the program and only once
    b) that command is being execute as serial to the XBee so it should never be transmitted as the XBee should enter command mode when it sees +++

    Hrmph...what to do.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-02-25 08:49
    RICoder said...
    Nope, I unplugged the USB cable and still happens.
    The problem isn't that there's a loose cable; it's that the other end isn't connected to a PC. If you plug in the other end, the problem should go away. By removing the cable entirely, you're still left with the same situation: an unpowered USB chip onboard. As Mike pointed out, this can sometimes cause the sporadic resets you're seeing. This is because P30 (TxD), if set as an output (high) after the Prop comes out of reset (e.g. by calling FullDuplexSerial's Start routine), will suddenly power the USB chip, causing a rising edge on DTR, which will reset the Prop again ... and again ... and again.

    -Phil
Sign In or Register to comment.