Pause command? (maximum number of seconds allowable?)


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    653

    Default Pause command? (maximum number of seconds allowable?)

    Hiya,

    I'd like to make a countdown timer for a UV lightbox I have - they were throwing out an old Eprom eraser out at work - a bit of a result *but* it's got a really bad mechanical timer on it & it's not granular enough for my needs (0-60mins...I need more like 1-10 mins)

    10 mins being 600 secs, which in picbasic equates to

    Code:
    PAUSE 600000
    Eeek!!!!

    Any issues with such a long pause command?

    To set the countdown time, I was thinking about a simple pot arrangement - ie AtoD the value between 0 & 1024, where 1024 = 10 mins.


    Also I guess it would be nice to have some adjustable 'user presets' - how do I tackle storing user input into non voltaile ram on a PIC? (if it helps, I'm using a 16f690 for no other reason than I'm sort of getting used to it)

    PS I realise when the pic is 'pausing' it's not gonna give out any countdown (time left) info, but I'm not too worried about an elegant implementation with many bells & whistles here.


    Edit: Ok, with a view to creating the most simple of programs I'd overlooked the most basic of solutions (why does that happen immediately after pressing the post button). A simple loop with a 1 second pause in it would do here - and then keeping track of the number of times the loop has run. (this will translate into an approximate time for the job in hand)
    Last edited by HankMcSpank; - 8th July 2010 at 01:01.

  2. #2
    Join Date
    Oct 2004
    Posts
    448


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by HankMcSpank View Post
    Ok, with a view to creating the most simple of programs I'd overlooked the most basic of solutions (why does that happen immediately after pressing the post button). A simple loop with a 1 second pause in it would do here - and then keeping track of the number of times the loop has run. (this will translate into an approximate time for the job in hand)
    Exactly. For a simple user interface for setting the duration, I would use a pot on an ADC pin; with 270 degrees of rotation, you could easily resolve the position into 10 total readings for setting the timer duration. Just add a dial around the pot, and you wouldnt even need a display.

    Regards,

    Anand

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts