sampling rate

Discussion in 'Embedded Systems and Microcontrollers' started by Anjanav, Apr 9, 2010.

  1. Anjanav

    Thread Starter New Member

    Mar 2, 2010
    16
    0
    Hi,,,
    am using 8 channels of pic18f4550 as analog inputs. my problem was how to calculate sampling rate for eight channels and also for individual channels..
    i studied the datasheet but still i didi't get a clear understanding...

    internal osc frequency Fosc=48mhz...




    thanks
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    I have not the datasheet for your PIC. But I guess it has onboard timers. So you can use a timer for generating interrupts. In the interrupt service routine you scan your AD channels.
    How often an interrupt occurs will determine the sample rate.
     
  3. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    For 8 channels one channel at a time the 18F4550 will be around 4kHz
     
  4. Anjanav

    Thread Starter New Member

    Mar 2, 2010
    16
    0
    thanks for all of ur replies....

    i have calculated 48mhz/64=1.33us
    20Tad = 20 * 1.33us = 0.03759 like this i got is this correct method
    if correct means how to calculate for individual channels using this sampling rate...

    thanks
     
Loading...