pic with countdown timer register?


Closed Thread
Results 1 to 12 of 12

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: pic with countdown timer register?

    Being a non wonderful programmer myself I wonder why you'd need a countdown timer? At the maximum of .8 seconds you'd never be able to display the countdown sequence.

    Why can't you use a chip that has an Interrupt on Change pin? Use the IOC event, calculate the delay and use a pause command?

  2. #2


    Did you find this post helpful? Yes | No

    Default Re: pic with countdown timer register?

    @AvionicsMaster1. Not wanting to be rude but that is a terrible idea, you will tie up the PIC doing nothing but pausing. The countdowntimer is so much better, little or no cpu time used for little or no programming effort.

    George

  3. #3
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: pic with countdown timer register?

    I got the idea the event wouldn't happen all time and wouldn't require a pause every second of .8 second.

    Even if there was only .2 seconds couldn't he do like 200 commands doing something else?

    Just to me, a pause for an intermittent event would make more sense.

    PS Maybe ifn I knew all of what he was trying to do I wouldn't make a poor suggestion like that. You'd also have to work harder than that to be rude. Teach on.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: pic with countdown timer register?

    Hi,
    As far as I know there no count down timers in any PIC but I don't really see the need for one.
    As have been said before, instead of counting from 100 to 0 you count from 156 to 0 (with an 8-bit timer). There's really no difference. What you need to do (which pedja089 also covered) is to set the timer up so you have enough "range" then simply calculate at what value you need to start in order to have it overflow after 0.8 seconds or whatever. Depending on the PIC and timer used you may not be able to get long enough time in "one" go. In that case you could, for example, set it up to give you "ticks" of 0.1s (or whatever) and count 8 of them.

    /Henrik.

Similar Threads

  1. pic+shift register+lcd
    By eworld in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd October 2012, 06:11
  2. long countdown timer, how to save power?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 15th November 2008, 06:15
  3. help: countdown with timer0 interrupt
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th August 2008, 15:12
  4. Replacing shift register with PIC
    By TonyA in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 7th April 2008, 19:31
  5. dual 7-segment countdown timer code
    By dr.ragh in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 30th April 2007, 14:19

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