capacitor for crystal

Discussion in 'Embedded Systems and Microcontrollers' started by pasha4686, Jul 26, 2008.

  1. pasha4686

    Thread Starter New Member

    Jun 22, 2008
    4
    0
    hi electronic funs i have problem about a pic project i want to measure frequency between 10-20Hz using with PIC and i use to CCP unit from PIC...CCP(capture compare pwm) uses TIMER1 and TIMER is a 16 bit counter if i use 4mhz crystal;4mhz/4=1mhz and then 1/1mhz=1us(microsecond) timer1 is maximum 65536; 1*65536us=65536us and then 1/65536=15,25 hz
    i cant measure between 10-20hz i think if i choose 2MHZ crystal i will solce this problem but if i choose 2 MHz crystal which capacitor i will use pls help me....thanks good works...
     
  2. pasha4686

    Thread Starter New Member

    Jun 22, 2008
    4
    0
    if i use between 15-33pf capacitor it will be ok?can anyone help me pls?(4 mhz-22pf)
     
  3. roddefig

    Active Member

    Apr 29, 2008
    149
    0
    The crystal datasheet will usually specify the recommended capacitors.
     
  4. nanovate

    Distinguished Member

    May 7, 2007
    665
    1
    The PIC has a prescaler that reduces the timer frequency ... read the datasheet and it'll tell you how to use it....
     
  5. pasha4686

    Thread Starter New Member

    Jun 22, 2008
    4
    0
    thanks for your reply
     
  6. bertus

    Administrator

    Apr 5, 2008
    15,649
    2,348
  7. pasha4686

    Thread Starter New Member

    Jun 22, 2008
    4
    0
    Bertus thank you very much for your help that page is very useful about crystal oscillator....Good bye....
     
Loading...