Shop OBEX P1 Docs P2 Docs Learn Events
propstick cycles when started w/out plugged into usb port — Parallax Forums

propstick cycles when started w/out plugged into usb port

fishfish Posts: 55
edited 2010-03-04 05:04 in Propeller 1
First of all the prop's eeprom has been loaded with my program and it runs fine.
Power: 9vbat (also use 7v power supply when bat is dead) to 5vreg and 3vreg.
3v to propstick
5v to gps mod
common grounds between gps and prop.


Scenario I:
I have my propstick usb plugged in the pc (a laptop in this case but with a desktop PC I get the same results).
I press F10, all is good, compiles, program runs as expected.
I then disconnect from the laptop's usb port, still all is cool, all is running fine, as expected.
But if i press the reset button on the propstick, it cycles resetting every 1/8 second or so.

Scenario II:
I try again, but no F10 or anything, just connect to the laptop's usb.
I then hit the reset button (still plugged in to usb) and all runs fine no probs.
I then unplug from the laptop's port, all still good.
I hit the reset again and like before it starts to cycle resetting every 1/8 second or so.

BTW: if it matters at all , the laptop can be sitting there with it's internal caps all drained (it's a really old laptop,even clock bat is dead in it), and no battery, just a paper weight with a usb port and i get the same results. Desktop pc same results.


any ideas?

thx
fish

Comments

  • Robert KubichekRobert Kubichek Posts: 343
    edited 2007-05-23 01:32
    It sounds like to much of a current draw on the battery, it's pulling the voltage down, and causing a
    reset.. can you measure the draw???, or try 6x1.5 D/C cells instead???


    Bob
  • fishfish Posts: 55
    edited 2007-05-23 01:50
    hmm, well, I get the same results with the 7v 400ma power supply,
    and why would it matter if I were plugged in the usb port or not at startup?



    fish
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-05-23 01:54
    You keep mentioning F10, you're aware F11 is what programs the EEPROM? Perhaps you are experiencing "old program" vs "new program" issues.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • fishfish Posts: 55
    edited 2007-05-23 02:05
    Paul,
    I·hear ya,smile.gif but the program that's on the eeprom is the right one.
    so thats not the problem.

    thx

    <edit> also tried without the gps hooked up. same prob.

    Post Edited (fish) : 5/23/2007 2:23:25 AM GMT
  • fishfish Posts: 55
    edited 2007-05-23 18:53
    So, here·I am puzzled and thinking.."I have a host usb controller device (VDIP1) laying around not attached to anything, just the module sitting there. I wonder if·it will work·being plugged into it?". ·and so I connected it's usb port to my·propstick's usb and·wouldn't you know it, the propstick stops cycling and works dandy, unplug it and it starts cycling again.
    Ah ha! ok, so·is it the impedance between pins? Something grounded when connected? WTHeck?
    Well at first·glance of the vdip1 schematic it looked to me like pin1 (vcc)·is basically grounded when the vdip is not·powered up.
    So I grounded pin 1·on the usb cable that is connected to my probstick it stopped cycling and works perfectly.
    Hooray!...umm. But now I am not clear on how to handle this from this point on.
    So what is the best solution for grounding pin1 on the usb port when not connected to the pc?
    Something hopefully more elegant than a jumper. Is there something else going on?
    Any thoughts?


    4 Pin USB Pinout
    attachment.php?attachmentid=73725

    Post Edited (fish) : 5/24/2007 3:58:01 AM GMT
    150 x 101 - 6K
    935 x 805 - 71K
    254 x 162 - 4K
  • cocokiwicocokiwi Posts: 75
    edited 2007-05-25 10:31
    ·floating GND on the propstick ?



    ·Methinks the gnd is getting a sort of stablity Via the added device! I,m thinking the joint of the GND is floating somewhere(bad solder joint!)

    or the prop USB connector·




    ·······cheers·· Dennis idea.gif·just a thought

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://people.delphiforums.com/cocokiwi/Image/picture.jpg
  • Don DDon D Posts: 27
    edited 2007-05-25 13:49
    If I had to guess, I would first look at the resistor and capacitor at the base of the transistor connected to the prop reset line for some defect in soldering or value.

    If all that's ok, try loading a simpler program that doesn't turn on too many things (eg: just flash one LED). On one bs2 stamp circuit I set up, I've run into a cycling reset when peripherals drew too much transient current for the regulator and dropped the voltage available to the stamp. This should help locate your reset (or at least eliminate a possible cause).
  • fishfish Posts: 55
    edited 2007-05-25 16:16
    I have tried·another propstick and i get the same results.
    I ground the vcc pin on the usb port of the propstick (when its not connected to the pc for programming obviously) and it stops the cycling.
    Remember that it ONLY does this cycling trip when I reset or start cold whilst not connected to another usb port and that other port doesn't even have to be powered up (example: vdip1 module).
    Attached is the schematic of the port (assuming it's the same or close enough to that of the demo board's)
    So really? No one else who has a propstickusb has had this problem? I feel kind of lame for bringing it up. Geeze.. Well eventually·I will figure out what the heck I am doing wrong.·Also attached is my setup.·

    argg
    fish
    301 x 359 - 22K
    175 x 359 - 20K
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-05-25 18:34
    Here's what I think might be happening: Without a USB connection, and with power applied to the Propeller, the FT232R is being powered through its RxD pin. If the Propeller sends data to this pin shortly after reset, the FT232R will be alternately powering on and off. When this happens, it's likely that DTR is getting toggled, which causes the Propeller to reset, repeating this sequence ad infinitum.

    -Phil

    Update: Looking at the PropSTICK-USB schematic, I see there's no pullup on A30. This may cause the FT232R to power cycle when the Propeller is reset, even in the absence of serial data on this pin. You might try attaching a fairly stiff (~1K) pullup here to ensure that the FT232R stays powered through this pin during a reset. It's not a very pretty workaround; but short of cutting traces, it may be the only option — assuming my original diagnosis is correct.

    Post Edited (Phil Pilgrim (PhiPi)) : 5/25/2007 7:14:13 PM GMT
  • Don DDon D Posts: 27
    edited 2007-05-25 19:14
    Theory: lcd carrier board DC-DC supply start up sends back a voltage transient that allow a short spike to trigger the reset transistor through the usb chip. With USB Vcc floating, dragging Vss down even for a very short time could cause temper tantrums.

    Feeding the lcd with an independent regulator instead of the propstick's would be a good experiment.
    I am also assuming you are following mfr's recommended caps for your 7v regulator.
  • fishfish Posts: 55
    edited 2007-05-25 19:44
    Hi Don,

    Good thinking. Yes, alas I have tried with its own·3vreg before and various power sources as well. Yes to caps too.·BTW I have the same results using·the ezlcd002 instead of the spark fun breakout board/nokia lcd.·Interesting idea though, you·might be onto something.

    thx fish
  • fishfish Posts: 55
    edited 2007-05-26 20:19
    Ok good people,

    I have narrowed the cycling problem·down to·ExtendedRxSerial.spin code (as least at the high level).
    I have yet to dig deeper to find the root cause. I was just happy to have an example to show you.

    Here is how to create a cycling PropStickUSB:

    I used the·Ch3-Ex10)-Blinker2.spin example (see below) it should cycle with any program:
    1) Fire the PropellerTool.exe
    2) Plug the propstickusb·into usb for progamming.
    3) Load the·(Ch3-Ex10)-Blinker2.spin example.
    4) Add·to the OBJ·area ->·······EXRxSerial : "Extended_RXSerial"
    5) Add·in the·main method·->·· EXRxSerial.start(15,30,4800). (pick an RX pin, i used 15)
    6) Press F10·to compile and load the program·in RAM and run: Verify everything is working.
    ··· If all is well, proceed to step 5.
    7) Press F11 to burn the program to the eeprom and run: Verify everything is working.
    8) Unplug usb cable from propstick (cable is still connected to PC).
    9) Press reset button on propstick.
    10) You should now see·that·it is·NOT working correctly.
    ···· ·It should now be cycling. You should see the little red LED on the propstick now·blinking (faintly).
    11) Reconnect usb cable to propstick (cable is still connected to PC).
    12) Press reset button on propstick.
    13) You should now see the propstick working normally,·as programmed.


    Code example (Ch3-Ex10)-Blinker2.spin with added Extended_RXSerial:
     
    {{ Blinker2.spin }}
    CON
      _CLKMODE = XTAL1 + PLL4X     'Set to ext low-speed crystal, 4x PLL
      _XINFREQ = 5_000_000         'Frequency on XIN pin is 5 MHz
      MAXLEDS = 6                  'Number of LED objects to use
    
    OBJ
      LED[noparse][[/noparse]6] : "(Ch3-Ex10)-Output"
      
      EXRxSerial : "Extended_RXSerial" '<------------ Added for cycling test
     
    PUB Main
    {Toggle pins at different rates, simultaneously}
     
      EXRxSerial.start(15,30,4800)     '<------------ Added for cycling test
     
    
      dira[noparse][[/noparse]16..23]~~                                 'Set pins to outputs
      LED[noparse][[/noparse]NextObject].Start(16, 250,   0)            'Blink LEDs
      LED[noparse][[/noparse]NextObject].Start(17, 100,   0)
      LED[noparse][[/noparse]NextObject].Start(18,  50, 300)
      LED[noparse][[/noparse]NextObject].Start(19, 500,  40)
      LED[noparse][[/noparse]NextObject].Start(20,  29, 300)
      LED[noparse][[/noparse]NextObject].Start(21, 104, 250)
      LED[noparse][[/noparse]NextObject].Start(22,  63, 200)            '<-Postponed
      LED[noparse][[/noparse]NextObject].Start(23,  33, 160)            '<-Postponed
      LED[noparse][[/noparse]0].Start(20, 1000, 0)                      'Restart object 0
      repeat                                         'Loop endlessly
    PUB NextObject : Index
    {Scan LED objects and return index of next available LED object.
     Scanning continues until one is available.}
      repeat
        repeat Index from 0 to MAXLEDS-1
          if not LED[noparse][[/noparse]Index].Active
            quit
      while Index == MAXLEDS
    


    enjoy
    fish

    ·
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-05-26 21:06
    Fish,

    As I suggested above, put a stiff pullup on pin A30, and I'll bet the problem goes away. The "root cause" is pin A30 rising to a "mark" state after reset, powering up the FT232R through its gate protection diode, and sending a glitch through DTR, thus causing another reset. The pullup, assuming it's stiff enough, will keep the FTDI chip powered up all the time and eliminate the DTR glitch. Another option that might also work is to change the "30" in your call to EXRxSerial.start to another pin when you're not using your PC.

    -Phil
  • fishfish Posts: 55
    edited 2007-05-26 23:47
    Brilliant Phil!
    That did it. You've hit the mark. 1k pullup on pin30 or p31 does the trick.
    Big thanks!
    Cheers!!
    fish


    <edit: so as not to bump;·there are more important·threads than this one·rolleyes.gif >
    Phil Pilgrim (PhiPi) said...
    ...
    ·Another option that might also work is to change the "30" in your call to EXRxSerial.start to another pin when you're not using your PC.
    ...
    Just a note:·the rx pin in the example given is 15 not 30. 30 is the mode.
    Extended_RXSerial.start·(RXpin, Mode,Baud)
    And pin 15·was arbitrarily chosen from one of the remaining pins not used in example.


    Post Edited (fish) : 5/28/2007 4:22:52 PM GMT
  • Kevin HinesKevin Hines Posts: 8
    edited 2008-06-28 00:58
    Hi Fish & Phil,

    Help!· I'm a newbie to the Propeller, so please explain the fix in a way I can understand.

    I apologize if my questions are obvious to the veterans out there.

    I have spent the past day struggling with this exact problem, i.e., the reset works just fine while the USB cable is connected to my PropStickUSB, but once I disonnect the USB cable from the PropStickUSB and press reset then the PropStickUSB simply recycles and doesn't ever finish rebooting (and all I'm having the PropStickUSB do is power one blinking LED in series with a 100 ohm resistor, on P4, so I don't think it's drawing too much current).

    A couple of questions, to both of you and to the Parallax Tech Support Folks:

    1. What is "A30"?· Does this mean "P30"?· Or does this mean pin location # 30, which is also marked as "XI"?

    2. Do I need to add a "pull up" resistor to Pin P30?· If so, why isn't this taken care of by the PropStickUSB itself?

    3. Is the addition of the pullup resistor intended by Parallax, and if so, why don't the instructions for wiring the PropStickUSB mention this need for the pullup resistor?·

    4. Or is this a design flaw which has been corrected in a new version of the PropStick?· (Since I just received this PropStickUSB from Parallax one week ago, I'd expect it to be the current version).

    Thanks in advance!

    Kevin

    Newbie to the Prop



    PS - This is my·third PropStickUSB in the past·month.· The first one I got didn't work when used with "PLL16X", so I called tech support and they sent me a replacement; the second one·became·very hot (painfully hot) when plugged into the USB line, so I called tech support and they sent me a replacement ... I'm hoping that·this third·PropStickUSB will work properly.


    fish said...
    Brilliant Phil!
    That did it. You've hit the mark. 1k pullup on pin30 or p31 does the trick.
    Big thanks!
    Cheers!!
    fish


    <edit: so as not to bump;·there are more important·threads than this one·rolleyes.gif >
    Phil Pilgrim (PhiPi) said...
    ...
    ·Another option that might also work is to change the "30" in your call to EXRxSerial.start to another pin when you're not using your PC.
    ...
    Just a note:·the rx pin in the example given is 15 not 30. 30 is the mode.
    Extended_RXSerial.start·(RXpin, Mode,Baud)
    And pin 15·was arbitrarily chosen from one of the remaining pins not used in example.
    Post Edited (Kevin Hines) : 6/28/2008 1:10:04 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-28 01:15
    1) and 2)
    This is a problem with the FTDI USB to serial chip when it's unpowered by USB. It only occurs with some PropClip/PropPlug devices, not all. The best solution is to unplug the PropClip/PropPlug, but a pullup resistor on I/O pin 30 will also work.
    3) Again, this doesn't affect all devices, only some. It's not clear what the "best" solution is other than some specific documentation outlining the choices and advantages / disadvantages of each.
    4) I'm not aware of any design changes to address this.

    I have both a PropClip and a PropPlug as well as several Protoboards and a SpinStamp (and a Demo Board and a Hydra with their built-in USB interfaces). I've not experienced this problem with any of them. There's still the unanswered question of why some people have a problem and others do not. It's not clear what fix is needed.
  • Kevin HinesKevin Hines Posts: 8
    edited 2008-06-28 02:12
    Mike,

    Thanks for your reply.

    Re: "The best solution is to unplug the PropClip/PropPlug...", I can't unplug the PropClip/PropPlug, as I am using a PropStickUSB, and the USB device is integral to the PropStickUSB and can't be removed.· I will, however, keep this in mind, for when I use a Prop which can be unplugged from·its Clip/Plug.



    Okay, I just tried a few different pull up resistor combinations, with my PropStickUSB :

    1. a 10,000 Ohm resistor between·pin location #30 (aka "XI")·and the 3.3V VDD: Did not work; i.e., kept reseting repeatedly.

    2. a 10,000 Ohm resistor between P30 (aka pin location #39) and the 3.3V VDD: Did not work; i.e., kept reseting repeatedly.

    3. a 100 Ohm resistor between·pin location #30 (aka "XI")·and the 3.3V VDD: Did not work; i.e., kept reseting repeatedly.

    4. a 100 Ohm resistor between P30 (aka pin location #39) and the 3.3V VDD: This·worked, sort of.· I.e., when I hit the reset button, the LED blinks the specified numnber of times, so it appears to reset just once, and to work properly.· However, when I disconnect & reconnect the battery, then the PropStickUSB·appears to reset twice, i.e., it starts to blink the LED, then stops, and then appears to restart and·after the 2nd reset it blinks the LED the correct # of times.

    5. [noparse][[/noparse]Edit:] a 10,000 Ohm resistor between P30 (aka pin location #39) and the 5V from the linear regulator:·This worked the best.· This seems to work every time the reset button is pressed, and every time the battery is discinnected & reconnected.

    This is·much better than the situation I was in earlier today ... thanks.



    A couple of follow up questions:

    A. What is the best resistor value to use for the pull up?

    B.·Will it cause any damage to anything, for the·pullup resistor to·be between P30 and the 5.0V output from the 5V linear regulator?·

    Thanks,

    Kevin
    Mike Green said...
    1) and 2)
    This is a problem with the FTDI USB to serial chip when it's unpowered by USB. It only occurs with some PropClip/PropPlug devices, not all. The best solution is to unplug the PropClip/PropPlug, but a pullup resistor on I/O pin 30 will also work.
    3) Again, this doesn't affect all devices, only some. It's not clear what the "best" solution is other than some specific documentation outlining the choices and advantages / disadvantages of each.
    4) I'm not aware of any design changes to address this.

    I have both a PropClip and a PropPlug as well as several Protoboards and a SpinStamp (and a Demo Board and a Hydra with their built-in USB interfaces). I've not experienced this problem with any of them. There's still the unanswered question of why some people have a problem and others do not. It's not clear what fix is needed.

    Post Edited (Kevin Hines) : 6/28/2008 3:26:40 AM GMT
  • Sabre00Sabre00 Posts: 30
    edited 2008-10-05 03:46
    Hey all,

    I am just commenting on this thread so I can find it on Monday morning when I am at my desk trying to solve my reset problem.
  • Michael O'BrienMichael O'Brien Posts: 55
    edited 2009-03-07 23:21
    I only get this reset behavior on my own breadboards when running the dip40, spinstamp or propstick usb chips running serial data back to the pc.
    I don't see any problems when leaving the usb port unconnected on the commercial PPDB or the prop proto board usb.

    It looks like it may be power supply (i use the same 7.5 to 3.3v conversion circuit as the education kit) or breadboard capacitance related

    Thank you all for the P30 pullup fix - I thought it was just me having deja vu.

    /michael
    .

    Post Edited (Michael O'Brien) : 3/7/2009 11:27:55 PM GMT
  • nohabnohab Posts: 96
    edited 2009-05-14 07:37
    Mike Green said...
    1) and 2)
    This is a problem with the FTDI USB to serial chip when it's unpowered by USB. It only occurs with some PropClip/PropPlug devices, not all. The best solution is to unplug the PropClip/PropPlug, but a pullup resistor on I/O pin 30 will also work.
    3) Again, this doesn't affect all devices, only some. It's not clear what the "best" solution is other than some specific documentation outlining the choices and advantages / disadvantages of each.
    4) I'm not aware of any design changes to address this.

    I have both a PropClip and a PropPlug as well as several Protoboards and a SpinStamp (and a Demo Board and a Hydra with their built-in USB interfaces). I've not experienced this problem with any of them. There's still the unanswered question of why some people have a problem and others do not. It's not clear what fix is needed.
    Well, for me it was the combination of protoboard-USB and sending debug information serially with no PC connected. It works on regular protoboards but not the new ones with USB-chip onboard.· At program start I put in a check if pin 30-31 are high, and only then start the serial communication.


    /Niclas
  • RaymanRayman Posts: 14,073
    edited 2009-05-14 12:17
    I was speculating yesterday that checking the serial input pin on the Prop for a high before enabling the serial driver might work... Glad to hear it does.

    But, I don't know why there should be a high on both pins 30 and 31. I would think that only one of them is driven high by the USB chip... The other one is driven high by the Prop once the serial driver is enabled (which can give power to the USB chip, causing the issue).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-05-14 15:46
    I'm not sure that checking for a high would be reliable, unless there's a pull-down resistor on that pin. Otherwise, with the Prop Plug disconnected, the pin simply floats and could take either state when read. Also, if the PC is connected and happens to be sending data when th pin is read, the Prop could still see a low.

    -Phil
  • RaymanRayman Posts: 14,073
    edited 2009-05-14 15:59
    That's a good point! I wonder why it works... I just measured the impedance of the FTDI chips RX &TX pins when unpowered, and it's very high...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • nohabnohab Posts: 96
    edited 2009-05-14 18:34
    Well, I skipped the theory and attached a LED bargraph (a tool I have to check 8 pins in a row) to pin 8-15. Then I defined: OUTA[noparse][[/noparse]8..9] := ina[noparse][[/noparse]30..31] and started the prop several times with and without the programming cable to check the result, which was quite clear: with programming cable connected both 30 and 31 were hi, otherwise both were low, that's it.

    /Niclas
  • RumpleRumple Posts: 38
    edited 2009-09-02 14:40
    Update: Looking at the PropSTICK-USB schematic, I see there's no pullup on A30.
    I've been looking for the Propstick-USB schematic for awhile.· Where is it available?

    Thanx.
  • hover1hover1 Posts: 1,929
    edited 2009-09-02 15:09
    It's on the Propstick Product Page down on the right.

    http://www.parallax.com/Portals/0/Downloads/docs/prod/prop/32210-PropStickUSB-1.2.pdf

    Jim
    Rumple said...
    Update: Looking at the PropSTICK-USB schematic, I see there's no pullup on A30.
    I've been looking for the Propstick-USB schematic for awhile.· Where is it available?

    Thanx.
  • TankTank Posts: 1
    edited 2010-03-04 05:04
    This had me baffled for a couple of days until I found this thread.···· It would seem·that if you do a·.start on the FullDuplexSerialPlus object on a PropStick USB·when the USB cable is not connected, it will reset over and over.· I changed my app to check 30 and 31 before starting the serial io cog, and everything is fine now.·· Thanks guys.



    Post Edited (Tank) : 3/5/2010 3:58:07 AM GMT
Sign In or Register to comment.