Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 10 A/D and D/A converter for Digital Filter 2007. 11. 23 Prof. C.M Kyung.

Similar presentations


Presentation on theme: "Lecture 10 A/D and D/A converter for Digital Filter 2007. 11. 23 Prof. C.M Kyung."— Presentation transcript:

1 Lecture 10 A/D and D/A converter for Digital Filter 2007. 11. 23 Prof. C.M Kyung

2 Experimental Goal o GOAL is to get familiar with.. l A/D converter (ADC0804) l A/D – D/C converting l Simple FIR filter design

3 A/D converter o A/D converter l 직류 또는 교류의 아날로그 신호를 마이크로프로세서에서 인식할 수 있도록 디지털 값으로 변환해 주는 소자 o ADC0804 l l Easy interface to all microprocessors l l Differential analog voltage inputs l l 0V to 5V analog input voltage range with single 5V supply l l Works with 2.5V voltage reference l l Resolution : 8 bits l l Conversion time : 100 ㎲

4 Usage of ADC0804 o Pin usage Pin nameFunction /CS 칩 선택 (active low) /RD ADC 변환 값 읽을 때 (low) /WR ADC 변환 (low) CLK IN ADC 변환 clock 입력 /INTR ADC 변환 끝났을 때 low 출력 V IN (+) 차동 입력의 + V IN (–) 차동 입력의 – A GND 아날로그 접지 V REF /2 기준 전압의 ½ (2.5V) D GND 디지털 접지 DB0 ~ DB7 변환된 디지털 출력 CLK R ADC 변환 clock 출력 V CC (or V REF ) 전원 (5V)

5 Usage of ADC0804 o Typical Application

6 Usage of ADC0804 o Timing diagram Write operation Read operation /CS /WR Internal state of converter /INTR Not Busy Busy /INTR /CS /RD Out put Data TRI-STATE

7 A/D – D/C converting MicroprocessorADC DAC Function generator Oscilloscope 입력 출력 일정 지연 시간 ( 대기시간 ) = ADC conversion time + processing time of microprocessor ADC conversion time + processing time of microprocessor

8 A/D – D/C converting o 대기시간 구현 방식 l Delay function: Source code 의 main 함수에서 delay function 을 구현하여 일정 시간을 기다림 l Interrupt: microprocessor 의 interrupt pin 을 이용하여 구현 o Delay function vs. interrupt 구현 방식내용장점단점 Delay function 입력을 기다 리는 방식 구현이 용이 입력을 기다리는 중 다른 연산 수행 불가능 Interrupt 입력을 기다리는 중 다른 연산 수행 가능 이벤트 발생시 미리 정해 진 루틴을 따라야 함

9 A/D – D/C converting o 대기시간 구현 방식 예 – Delay function void delay(unsigned char time){ while(time--){ while(time--){ time++; time++; time--; time--; } } void main (void) { ADC 변환 시작 ADC 변환 시작 delay(100); delay(100); ADC 변환 값 read ADC 변환 값 read } Delay function 구현 Delay function 이용

10 A/D – D/C converting MicroprocessorADC DAC Function generator Oscilloscope 입력 출력 Maximum sampling rate = 1 / 대기시간 [Hz] Maximum frequency = Maximum sampling rate / 2 [Hz]

11 FIR filter design o Decimal calculation in FIR filter design l 8051 microprocessor does not have floating point operation unit. l Decimal calculation is very slow in 8051 microprocessor. o Modifying decimal calculation to integer calculation l Providing significantly higher performance while maintaining fidelity accuracy of FIR filter l How to do? Pre-report!

12 Experiment Requirements o COMPACT51 board o KEIL uVisionII program o PC o UART cable o Oscilloscope o Function Generator

13 References & Contact o Textbook l 8051 user’s manual l 8051 & C Programming, 문왕환, 도서출판 세화 l ADC 0804 manual o 10 th Week T.A. E-mail kskang@vslab.kaist.ac.kr jmkim@vslab.kaist.ac.kr o Lecture Homepage http://wink.kaist.ac.kr/course/ee306/


Download ppt "Lecture 10 A/D and D/A converter for Digital Filter 2007. 11. 23 Prof. C.M Kyung."

Similar presentations


Ads by Google