Slow speed tachometer


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,690


    Did you find this post helpful? Yes | No

    Default Re: Slow speed tachometer

    a few thoughts :-
    1, INTCON.7 "GIE" and INTCON.6 "PEIE" probably need to be set

    2, this piece of code can never execute because its orphaned

    RESUME ' Return to main program
    ENABLE ' Enable interrupts


    TMPlowbyte = 0 ' Variable reset
    PIR1.0=0 ' Reset TMR1's Interupt Flag
    TMR1Overflow = 0 ' Reset TMR1 Overflow counter



    END ' End of program


    3, the " on interrupt " latency is variable and unpredictable and is unlikey to give accurate results.
    dt interrupts is vastly better.

    4, for your purposes rpm measurement using "pulsin" is far simpler to do and a lot easier to get working.

  2. #2
    Join Date
    Mar 2014
    Location
    Alhandra, Vila Franca de Xira, Portugal
    Posts
    5


    Did you find this post helpful? Yes | No

    Default Slow speed tachometer

    Thanks Richard

    I'm going to explain myself better.

    My goal is to use timer0 to refresh the 7 segment displays, and use timer1 free running so i can count the pulses from portb.7 so i think setting interrupts for timer1 won't be nedded. The part that captures TMR1L and calculates RPM, is the one that is giving me problems.

    Can you explain me better the part of tho orphaned code?

    From what i have read, and correct me if i'm wrong, since i'm trying to aquire a signal near 0.625hz, those command won't serve my purposes.

    There is one thing that i'm going to try is to use a 32.768 Khz crystal, my doubt is can i use as a primary crystal or do i have to connect it to RB6 and RB7?

    Because i'm running out os pins, i'm setting on another breadboard the same schematic, but with a 16f877a.

    Thanks.

Similar Threads

  1. Tachometer with DT Interrupts?
    By DanPBP in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 17th November 2009, 20:51
  2. Tachometer with Interrupts
    By serkanc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 28th August 2009, 09:10
  3. tachometer
    By aztaig in forum mel PIC BASIC
    Replies: 5
    Last Post: - 11th August 2008, 14:54
  4. Tachometer code problems.
    By PICy in forum mel PIC BASIC
    Replies: 3
    Last Post: - 28th January 2005, 16:29
  5. Tachometer code problems.
    By PICy in forum General
    Replies: 6
    Last Post: - 31st October 2004, 12:47

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