RPM counter


Closed Thread
Results 1 to 9 of 9

Thread: RPM counter

Hybrid View

  1. #1
    RUBiksCUbe's Avatar
    RUBiksCUbe Guest


    Did you find this post helpful? Yes | No

    Question

    Its a PC cooling fan so I was expecting it to be sort of high. How do I set up one of the hardware timers as a counter? I've never done anything with them before.

  2. #2
    Join Date
    Sep 2005
    Location
    Dayton, Ohio
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    1. What chip are you using?

    2. Read the datasheet. It will have a section on each Timer/Counter available on your particular PIC. It tells you exactly what values to write to each register to set up the timer as a counter and how to read/write the current value of the counter. You will also be able to set up one of the I/O pins as a trigger for the counter and select rising/falling edge for triggering. Read up on the prescaler, you may need to set that up too.
    Jim Robertson
    "MilesTag" DIY Lasertag
    www.lasertagparts.com/mtdesign.htm
    Dayton, Ohio

  3. #3
    RUBiksCUbe's Avatar
    RUBiksCUbe Guest


    Did you find this post helpful? Yes | No

    Default

    Im using an 18F252. Im looking through the datasheet and I found that Timer0 uses the T0CON register and on the pin diagram it says that T0CKI is pin 6 (PortA.4). How to the timers work? I've never done anything with them before and I'm not even sure what they do.

Similar Threads

  1. Interrupt RPM and Taylors Elapsed time on 18F4620
    By Tobias in forum mel PIC BASIC Pro
    Replies: 70
    Last Post: - 3rd February 2010, 17:12
  2. Pulsin vs. Interrupt RPM measurement
    By Tobias in forum General
    Replies: 1
    Last Post: - 31st December 2009, 02:29
  3. 16f877A and tmr1 external crystal question
    By comwarrior in forum General
    Replies: 3
    Last Post: - 13th July 2009, 01:40
  4. RPM - DIV32 Problem
    By davewanna in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 11th April 2008, 05:33
  5. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 18:27

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