Timer Function? Not sure what I need here.


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    262


    Did you find this post helpful? Yes | No

    Default Re: Timer Function? Not sure what I need here.

    yea thats a thought, I didnt think of useing darrels INT's, I havent messed with them yet. I was waiting till I had a few days to play with them and other bits of his code.

    right now I need to use a internal timer INT? I think. Using a 18F4550 chip. so something like timer1 set for every 30 minutes using DT's INT's
    I might need a second timer to run a second sub to flash a led, not sure if this can be done so that they dont conflict. will post some code in a bit as example.
    Do you think thats the best way though to do the 30 minute timer INT using DT_INTS? trying to KISS! "keep it simple stupid" want program small but stable.
    Chris


    Any man who has accomplished anything in electronics at one time or another has said... " STOP! WAIT! NOOO! Dangit.... Oh Well, Time to start over..."

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


    Did you find this post helpful? Yes | No

    Default Re: Timer Function? Not sure what I need here.

    Hi,
    You probably won't be able to set up any hardware timer to interrupt at a rate as low once every 30 minutes - if you don't run the PIC REALLY slow that is.
    What you usually do is set it up to interrupt at something like 10Hz or whatever and then keep track of the number of interrupts in order to get a total of 30 minutes (18000 interrupts in this case). That way you can use the same timer and interrupt for the LED flashing and any other timing tasks you might need.

    Darrels DT-Ints are a great way to this.

    /Henrik.

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Timer Function? Not sure what I need here.

    Personally, I'd check if 30 minutes elapsed; as KISS as you get.

    Check DT's thread and link to his site for details.

    Robert

Similar Threads

  1. ARCSIN function
    By mjphillips1981 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 5th March 2009, 21:19
  2. Hash function
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 7th September 2007, 11:09
  3. Need help with write function
    By Christopher4187 in forum General
    Replies: 10
    Last Post: - 12th July 2006, 05:12
  4. COUNT Function
    By Toley00 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th June 2006, 07:26
  5. log10 function
    By dampf in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 15th October 2004, 18:54

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