Shop OBEX P1 Docs P2 Docs Learn Events
Program stops prematurely — Parallax Forums

Program stops prematurely

JoeAJoeA Posts: 33
edited 2007-08-08 20:11 in Propeller 1
HELP!· I've posted this to the PEK Labs thread but haven't received an answer.
I·recently got the ·Propeller Education Kit, and have been working through the "I/O and Timing Basics" Lab.
My programs have suddenly begun stopping prematurely.
I had called tech support, and they said try the forums.
I had completed the 12/7/6 version of the lessons up to the repeat while ...AND... case (page 16 of 29 top, just before "Some other Vocabulary").
Then it would only count to 15 (not 20) and stop (all LEDS off.)
What I had been doing is, starting with the first loop example, I just added each new example to the program at the beginning, so all examples were in the same file.
Anyway, after the AND example failed, I went back to try simpler programs, and got premature termination on those also.
For example, even the simple setup program: [noparse][[/noparse]edited 8/2/2007]

PUB LedOn                      ' Method declaration
                                             
    dira[noparse][[/noparse]4] := 1               ' Set P4 to output
    outa[noparse][[/noparse]4] := 1               ' Set P4 high
    repeat     ' Endless loop prevents program from ending

will turn on the LED but it goes back off in a few seconds or fraction of second.
(The actual time seems to vary from run to run).·
Sometimes·a program·will appear to work for the first few programs tried after being off a while, but eventually reverts to the early termination behavior.
I had rearragned some LEDs and circuit wires occasionally during the exercises,
but I've been over the board and it seems to be correctly wired.
I've tried disconnecting and reconnecting the board, and reloading the DoNothing program before trying again.· It also doesn't seem to matter whether I load the program to RAM or EEPROM; I get the same early temination (sometimes followed by restart (?) and repetition).
Is there a simple way to test the chips for damage? As you see, even the "pin test" program behaves erratically. (I don't have an oscilliscope or any test equipment beyond a VOM).

JoeA

Comments

  • CJCJ Posts: 470
    edited 2007-08-07 22:39
    have you tried a fresh battery?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Parallax Forums - If you're ready to learn, we're ready to help.
  • edited 2007-08-08 00:11
    Joe,

    The restart behavior does indicate a potentially low battery.

    Assuming the battery is new but the problem persists, you can use your voltmeter to measure the voltage at the Propeller chip's GND and 3.3 V terminals. Does it remain stable at 3.3 V when the reset occurs?

    Andy

    P.S. Please email me using the email icon to the left of this post so we can schedule a telephone trouble shooting session.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.

    Post Edited (Andy Lindsay (Parallax)) : 8/8/2007 6:18:42 AM GMT
  • JoeAJoeA Posts: 33
    edited 2007-08-08 16:33
    I tried a fresh(er) battery and the problem went away, so I guess that was it.
    When connecting the VOM with the old battery, I did notice a slight dip in voltage when all the LEDs came on at once. Come to think of it, that was a consistent symptom of "failure"--it would work with just a couple leds on but once a larger number were on, it would halt. I suppose leaving a single led on a longer time had a similar effect.
    As a programmer, I'm used to debugging software, but hardware glitches are a new experience for me!
    Thanks,
    JoeA
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-08 19:41
    JoeA said...
    but hardware glitches are a new experience for me!
    It's not exactly "glitches". You see, the Prop is not a "low power unit", it indeed needs A LOT of current (refer to the datasheet) - when all COGs are working and you run @ 80MHz this will be more than 100 mA!

    Shining an LED will need an extra of 20 mA and an outworn battery cannot deliver so much current. Even new batteries sometimes can't; especially 9 V batteries are not the best power supply for a Prop board.

    Accumulators are MUCH better with respect to current! There are a lot of ready made "packs" on the market, used for model cars (sometimes called "racing packs", 7,2 V). They are not exactly cheap, but very powerful.
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-08-08 19:49
    deSilva,

    What are you refering to when you say accumulator? This is just another word for battery as far as I am aware.

    Graham
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-08 19:49
    It's also much less expensive to use an AC power supply. Parallax sells a nice 7.5 VDC supply that provides at least an ampere (1A) and many other sources sell similar supplies. Radio Shack has a 6V 2A AC "wall wart" supply that works very nicely with various Propeller boards. You can also buy 9V "battery eliminators", but be careful that it's rated for enough current.

    Accumulator is another term for rechargable battery.
  • deSilvadeSilva Posts: 2,967
    edited 2007-08-08 20:11
    Damn, I SHOULD improve my English...
    I am not so aware of the price level in the U.S.... In Europe "rechargeable batteries" - even "clean" ones (NiMH) - have dropped considerably in price; and recharging stations are also low priced.

    There are essential differences between rechargeables and non-rechargeable batteries wrt to the max. current they deliver and the decay of voltage during discharge.

    A "wall wart" is fine, though I prefer portability and rippleless supply voltage.
Sign In or Register to comment.