Shop OBEX P1 Docs P2 Docs Learn Events
operator selection--- timing interval — Parallax Forums

operator selection--- timing interval

StevezilaStevezila Posts: 35
edited 2010-07-30 03:59 in BASIC Stamp
Can someone suggest the best way to setup my BS2 inputs to allow an operator with no knowledge of stamps to enter a number that will allow them to change the amount of time of a given event. I need to, or rather the operators need to control two events. The first timer runs for a given time and the 2nd timer controls the time until the first timer does it's thing again. Pretty sure I can do the code but wondering how best to get operator info into the stamp and give operators control to within a second or two on the first and a minute or two on the second. The range on the first timer--1-15 seconds· and on the second timer--5-15 minutes. I have some push btn's configured in BCD and thought maybe an·RC array would work for both. I just want a second opinion.

Thanks in advance for your replies

Comments

  • FranklinFranklin Posts: 4,747
    edited 2010-07-27 21:00
    You would be better off building your timing circuits outside the stamp. 555 timer chips or decade counters would be what I would look at.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • LloydsLloyds Posts: 75
    edited 2010-07-30 03:59
    I've done exactly what you are talking about with the RC command with a rotary switch and also with a rotary pot. They both had 270deg of rotation so with a big dial, the resolution was pretty good, and I think a dial is about as user friendly as you can get.

    I used a 100k pot and set up a debug program to return the raw RC value. I installed the pot in a little box with the stem sticking out and put the dial on it. Drew 12 divisions through the full sweep of the dial. I then wrote down the RC values for each section of rotation. My values ran from zero up to about 7,000. I used the SELECT, CASE command and started with, CASE <36, CASE<93, CASE<216, etc, through all 12 sections. It works just like a series of IF <, GOTO statements but is a lot easier to use.

    I needed exact break points, and the pot was kind of fuzzy at the transitons, so I ended up using a 12 position switch and wiring it to a resistor network and still using the SELECT, CASE command.

    It's really just making a mechanical A-D convertor, but it works nicely.
    Lloyd
Sign In or Register to comment.