warm up / burn in time for BS2?
electromanj
Posts: 270
Hello, I have a question. I have built a custom OEM BS2 board. The first three times I ran the program, it glitched. By glitched I mean that it was suppose to count cycles and if cycles were less than x cycles then end. It did end but, when cycles continued the program continued.After these first three tries with power still connected everything worked fine. Does the interpreter or eeprom chips require a burn in or warm up time?
Thanks for any help.
·
Thanks for any help.
·
Comments
' {$STAMP BS2}
' {$PBASIC 2.5}
cycles VAR Word
Counter VAR Byte
main:
DO
COUNT 0,10000,cycles
IF cycles>2 THEN HIGH 3
IF cycles<2 THEN doublecheck:
LOOP
doublecheck:
FOR Counter = 1 TO 3
COUNT 0,10000,cycles
IF cycles>2 THEN main:
NEXT
IF cycles<2 THEN LOW 3
END
If the routine doublecheck is supposed to return to the main part of the program and usually continue, that's NOT going to happen.
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 12/16/2006 11:44:19 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Would you please explain, in a bit more detail, what you mean by the following, quoted fron your original post:
"It did end but, when cycles continued the program continued.After these first three tries with power still connected everything worked fine."
The program either ended or it didn't. there is no in between. There IS a situation where there will be certain output from the PBASIC Stamp after it hits an END statement, but I'm not sure yet if that's what you're seeing. You don't describe how you are discerning that the program may be continuing.
Just one final note. If no pulse is seen, of the specified type, during the period specified by the DURATION parameter, variable_name can and will be ZERO. I just hope you kept that in mind, and planned for it. This could also occur with a loose or intermittant external connection. You didn't specify what the source of the pulses is, so it's difficult to say much more about it.
Regards,
Bruce Bates
Post Edited (Bruce Bates) : 12/16/2006 12:01:46 PM GMT
If cycles = 2, and so long as it's 2, the routine doublecheck will NEVER be executed.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
<!--StartFragment -->
cycles VAR Word
main:
DO
COUNT 0,10000,cycles
DEBUG DEC? cycles,CR
LOOP
·When you are satisfied your frequency in is behaving as it should then design your conditional statements to catch every possibility that you require.
doublecheck is a subroutine and should be called with GOSUB doublecheck·(don't forget the RETURN at the end of the subroutine). Is there really a need for the FOR NEXT loop?
IF cycles <2 THEN GOSUB doublecheck
doublecheck:
FOR Counter = 1 TO 3
COUNT 0,10000,cycles
NEXT
IF cycles<2 THEN····· 'program ends if cycles less than 2 on the·fourth count else returns to main loop
LOW 3
END
ENDIF
RETURN
Jeff T.