ee3954_fall13_10_adc

52 nyquist criterion why is this sample frequency

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: TEMPL bcf STATUS,RP0 nop nop goto MAIN ; 20 ;1 ; ~12 Tad = 24 ; ;1 ;1 ;1 ;1 ;1 ;1 ;1 ;1 ;2 Sample Period = Ts ≈ 20 + 1 + 24 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 2 = 55TCY= 55μsec Sample Frequency = 1/Ts ≈ 1/55μsec = 18,182Hz ≈ 18kHz ADC.52 Nyquist Criterion Why is this Sample Frequency Important? The Nyquist criterion states that, in order to prevent undesired aliasing, one must sample a signal at a rate equal to at least twice its bandwidth. fs > 2 B Sample frequency Signal bandwidth ADC.53 Nyquist Criterion Example RA1/AN1 PIC16F877 Range of human hearing: 20 to 20,000 Hz Must sample at fs > 2*(20,000 – 20) = 39,960Hz ≈ 40kHz For example: CD – 44.1kHz sampling rate DVD – up to 96 kHz And CD – 16 bits per sample ADC.54 ADC Example … Using Interrupts ADCON0 equ ADCON1 equ INIT_ADC: INIT_IRQ: 0x1F 0x1F org goto org goto movlw movwf bsf movlw movwf bcf bcf bsf bsf bcf bsf bsf … … … 0x000 INIT_ADC 0x004 AD_ISR B’01001001’ ADCON0 ; Configure ADC via ADCON0 STATUS, RP0 ; Access bank 1 B’1000000...
View Full Document

Ask a homework question - tutors are online