How ti use timer in PIC16F877A

Discussion in 'Programmer's Corner' started by phyllis, Apr 25, 2015.

  1. phyllis

    Thread Starter New Member

    Apr 25, 2015
    1
    0
    I am doing noise detector project using PIC16F877A. How to turn on led if people make noise more then 1 minute?
     
  2. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,699
    912
    What programming language? At what frequency are your operating the MCU? How do you detect the noise?

    John
     
  3. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,839
    945
    Does it mean that if you detect noise for only say, 54 seconds, your count will reset to zero and no LED will be turned ON?
     
  4. Papabravo

    Expert

    Feb 24, 2006
    11,163
    2,187
    How to use the timer in PIC16F877A
    1. Download the datasheet
    2. Assume a comfortable position
    3. Study the datasheet with intense concentration
    4. When you grok the use of the timer, proceed
     
  5. MaxHeadRoom

    Expert

    Jul 18, 2013
    13,182
    3,646
    One avenue to explore is using a clock crystal (32Khz) on the T1CKI input which can be used for seconds,minutes, hours clock.
    In conjunction with a capture input using the CCP module. In your case the timer would be constantly reset if and when noise occurs, if none for 1 minute, it allows the clock to time out.
    i.e. an interrupt would occur at the 1 min mark.
    Max.
     
  6. John P

    AAC Fanatic!

    Oct 14, 2008
    1,671
    241
    Or as Bill Haley and the Comets would tell you, the objective is to "Grok around the clock".
     
Loading...