RCTIME does not appear to work for me
ChuckC
Posts: 3
RCTIME does not appear to work for me. I have the "What's a microcontroller student guide" and have been having a great learning experience. I have hit nearly a dead end on Chapter 5, "Measuring Rotation". I successfully completed PolledRCTimer.bs2. It worked but using the ReadPotWithRcTime.bs2 does not - it just sits there, green light on. I tried looking for RCTIME in Help,copied the program and pasted it into mine, it does not work. This is the program:
' {$STAMP BS2}
' {$PBASIC 2.5}
result VAR Word
HIGH 7 ' charge the cap
PAUSE 1 ' for 1 ms
RCTIME 7, 1, result ' measure RC discharge time
DEBUG DEC ? result ' display result
END
That's it - does nothing - seems caught in a loop (activity LED stays on). I can use the same RC combo in my original, but not in this program with RCTIME.
Any comments. This is really bothering me. Direct cut and paste.
Thanks.
' {$STAMP BS2}
' {$PBASIC 2.5}
result VAR Word
HIGH 7 ' charge the cap
PAUSE 1 ' for 1 ms
RCTIME 7, 1, result ' measure RC discharge time
DEBUG DEC ? result ' display result
END
That's it - does nothing - seems caught in a loop (activity LED stays on). I can use the same RC combo in my original, but not in this program with RCTIME.
Any comments. This is really bothering me. Direct cut and paste.
Thanks.
Comments
Now i have another question.