Shop OBEX P1 Docs P2 Docs Learn Events
Coffee Roaster Stopwatch Timer Display — Parallax Forums

Coffee Roaster Stopwatch Timer Display

allenballenb Posts: 2
edited 2006-02-09 03:30 in BASIC Stamp
I'm somewhat new to microcontrollers and am trying to put together a BS-2 with #27977 LCD display to display elapsed time (minutes/seconds) on my coffee roaster.

I have it working fine using the pause function for approximating a seconds count but need better accuracy.

It was suggested I use the DS-1302 time keeping chip for getting a real seconds count but I am having difficulty finding examples of a BS-2/DS-1302 being used as a stopwatch for displaying elapsed time.

I would appreciate any help from someone who knows how I should wire these two together and where to find examples of code to make them work together as a stopwatch count-up timer.

Question:

Is it overkill to use the timing chip/is there another way to gain accuracy over the "pause" function within the stamp without resorting to an external oscillator/counter? I need to be·(+ -) 1/2·second during a 1 hour time span.

2nd question:

Is it possible to perform the stopwatch action and read a pot using "RCtime" and display both on the same LCD at the same time·using one stamp and one LCD? I've heard that without being able to use interupts that this would not be feasible.

Allen Bartee



·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-28 23:27
    Allen,

    ·· In the Projects Forum alone there are a few examples of using the DS1302.· Basically it would involve you resetting the time to 00:00 (minutes = $00 and seconds = $00).· The DS1302 would start counting up.· When you reach the end of the cycle you can always reset the values back to zero and start over again.· It seems this information was requested via e-mail as well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-31 20:31
    Allen,

    ·· Using the demo code I referred to above, I was able to hammer out the following code in about 3 minutes.· All I did was deleted everything from the demo code except the 4 main subroutines.· Then just a few lines of code does what you ask.· I then added a line to check and see if 3 minutes and 15 seconds has passed, and then it stops.· But this gives you an idea how to do what you need to.· I could've just as easily toggled an I/O lin or something.· Or in the loop I could've waited for an input to stop counting.· Anything is possible.· I hope this helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • allenballenb Posts: 2
    edited 2006-02-09 03:30
    Chris,

    Thanks for the help with the code example. This has been a tremendous help and I am able to experiment with different means of triggering the stopwatch on and off during the count.

    After I've completed the LCD/stopwatch·project, I'll post it in the "projects" forum in case anyone else has a need for a count-up stopwatch.

    Allen
Sign In or Register to comment.