microcontroller problems

Discussion in 'Embedded Systems and Microcontrollers' started by mircea2012, Jul 3, 2012.

  1. mircea2012

    Thread Starter New Member

    Jul 3, 2012
    I am a beginer in microcontrollers understanding, and also I am new on this forum, so HI all. I have some questions about a few problems :

    1. A Sample and Hold circuit is connected to a signal of source resistance 2Kohms. Its outputs is connected in turn to an ADC. The Sample and Hold capacitor is 90pF.
    What aquisition time should be allowed if 10-bit resolution is required by the ADC ?

    I know that time constant is RC. For this case I obtained 0,18 microsec.

    2. A 16F873A microcontroller is operating from a supply of 4V and a clock frequency of 1MHz. The ADC is used (a 10-bit ADC module), but only 8-bit accuracy is required. The signal source resistance is 5Kohms.
    Estimate the acquisition time required.
    What is the fastest conversion time that is available, assuming each conversion is allowed to run to completion ?
    Hence estimate the maximum sampling rate possible.

    3. Given a sinusoid with 500Hz frequency, what should be the minimum sampling frequency for analog-to-digital converter if we want to faithfully reconstruct tha analog signal after the conversion ?

    Please help me.
    Thank you.
  2. MrChips


    Oct 2, 2009
    Welcome to AAC!

    I am sure you will benefit from this site. Stick around for awhile and join in the fun.

    You will generally be limited by the conversion time of the ADC (see question #2).

    Every ADC will have specifications which indicate the conversion time.
    The conversion time for the PIC16F873A is listed as 19.72μs.
    The maximum sampling rate will be the inverse of 19.72us which is about 50ksps

    The sampling or Nyquist Theorem applies.
    You must sample at least twice the maximum input signal frequency.
    Thus for 500Hz sine wave your minimum sampling rate is 1000sps.

    If you are planning on reconstructing the waveform I would go at least 10x faster, i.e. sample at 10ksps or higher.
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    I agree with the estimate from MrChips. Then it comes to sample rate. But that will bring you to another problem. You can not store much data on the chip. How will you get the data out of the chip ;)
    Last edited: Jul 4, 2012
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    These sound like homework questions to me <grin>

    The S&H is running independently from the A2D to provide it an input voltage. The intent of the question is to determine how long to let the S&H RC charge till any further charging will not change the output of following A2D stage.

    Thus, the delta V you are looking for is 1/2 LSB. If you look at any Microchip product having the A2D module the "ACQUISITION TIME EXAMPLE" will show the math behind this. Charging the external S&H cap presents the same problem an the A2D HOLD Cap. (Sorry I am on the way out the door and can't reproduce right now).
  5. BillO

    Distinguished Member

    Nov 24, 2008
    Fast EEPROM, maybe?