Shop OBEX P1 Docs P2 Docs Learn Events
PE board resets without usb connected to PC — Parallax Forums

PE board resets without usb connected to PC

joeldjoeld Posts: 49
edited 2008-02-27 01:16 in Propeller 1
I wonder if anyone has seen this? I have an experiment set up that has an sht1x and xbee module on the breadboard. The program is setup to initialize all the modules then enter into a loop where it reads the sensirion converts all the values then transmit them via the xbee to another xbee hooked up to the pc via usb.

Everything works fine with the power supply and usb connected to the PE board. The program is written to eeprom. If you remove the usb and reset, the program will run one iteration then reset and run the program again each time with just one pass through before resetting.

I'm out on the road and don't have anyway to read the voltages. I've tried to power the PE board with 2 different wall warts. Could it be that the power from the usb is just enough to stabilize the voltage.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-26 21:16
    USB power is used only for the USB interface.

    Do you remove the PropPlug along with the USB connection? There was a problem noted occasionally where a "sneak" path through the unpowered PropPlug occasionally caused a reset. I believe the fix was to add a pullup to the RESET line. Best thing is to unplug the PropPlug.
  • joeldjoeld Posts: 49
    edited 2008-02-26 21:24
    This in on the propeller demo board with the built in usb port. You can tell from the xbee terminal that it's not resetting at the same line of code each time.
  • joeldjoeld Posts: 49
    edited 2008-02-26 22:58
    In the code, I had a call to Full_Duplex_Serial to use the onboard usb port to debug back to hyperterminal on the pc. I took that code out and now it seems to be working without the usb plugged in. Could Full_Duplex_Serial have been causing some sort of buffer overflow since there was no connection to transmit on?

    Another thing I notice is that during eeprom programming propeller pins P3 and P4. I'm using those to pins for Rx and Tx on the xbee. During eeprom programming the Rx and Tx leds on the xbee board light and it causes the xbee module to lock up and requires removing power from the xbee to clear. Doesn't seem to be a problem on propeller resets.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-02-26 23:05
    I can't answer your question without more information like your program source.

    The xBee behavior is not right. Again, you'd need to post a schematic or a thorough description of the wiring connections.
  • joeldjoeld Posts: 49
    edited 2008-02-26 23:23
    I've attached a copy of my top file.

    The xbee is on the Appbee Mod carrier board and is recieving power from the 5V pin on the Propeller board and is also grounded to the Propeller board. The Appbee-Mod carrier is the only board I had with me on this trip. I'll switch to the carrier without all the 5V buffering when I get back home. That could be part of the problem. Rx on the xbee is connected to P3 and Tx to P4 on the propeller.

    The lines of code that I took out of this code that seemed to allow it to function without the usb plugged in was:

    Obj
    · · debug········ : "FullDuplexSerial"

    Pub main
    · · debug.start(31, 30, 0, 57600)························ ' start serial port for hyperterminal'

    PUB displayString(row, col, s) | Index
    ··· debug.str(s)

    The only parts of the program that currently aren't working are reading and displaying gps time and satellites. The xbee isn't very consistent and locks up during resets and eeprom loads. Any program critiques would be welcome as I'm new to Spin.

    Thanks Joel
  • KeithEKeithE Posts: 957
    edited 2008-02-27 00:56
    joeld said...
    In the code, I had a call to Full_Duplex_Serial to use the onboard usb port to debug back to
    hyperterminal on the pc. I took that code out and now it seems to be working without the
    usb plugged in. Could Full_Duplex_Serial have been causing some sort of buffer overflow
    since there was no connection to transmit on?

    I think that a couple of us just ran into a similar problem when using PropDos on the demo board.

    See http://forums.parallax.com/showthread.php?p=708789
  • joeldjoeld Posts: 49
    edited 2008-02-27 01:16
    Keith

    Definitely looks like the same problem. Removing the serial calls also fixed the reset problem in my case too. This issue would be a good note to add into the latest "PE Kit Lab - Fundamentals: Objects" That Andy just put out. It was kind of an insidious bug to find, at least for me.
Sign In or Register to comment.