Shop OBEX P1 Docs P2 Docs Learn Events
pressure sensor fun! - cheap timer — Parallax Forums

pressure sensor fun! - cheap timer

ArchiverArchiver Posts: 46,084
edited 2003-11-01 22:27 in General Discussion
> The length of operation isn't critical, so is the "counting program
loops" the best idea for the timer portion of my project or is there
a simpler way(I'm going to play with this option when I get my BS2
setup, up and running again) ?
>


Counting loops for timing is not really accurate, but very easy.

just add 1 to your number each loop.
after some number of loops, 10,000 or so, you reset your timer and do
what you want to do each time period.

obviously this is program speed dependant so the higher the number,
the more innaccuracies. Program changes will change the timer.

if you are going for a product, you could use a real time counter to
set this up. That would be part of your bend instruments. as a
final program would be fixed and varying speeds as program changes
would not be a problem.

Dave
Sign In or Register to comment.