Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 8 Digital waveform generator using u-controller 2007/11/09 Prof. C.M. Kyung.

Similar presentations


Presentation on theme: "Lecture 8 Digital waveform generator using u-controller 2007/11/09 Prof. C.M. Kyung."— Presentation transcript:

1 Lecture 8 Digital waveform generator using u-controller 2007/11/09 Prof. C.M. Kyung

2 Experimental Goal o GOAL is to get familiar with.. l Intel 8051 microcontroller l The concept of D/A converter l The concept of Timer l Function generator n Sine wave, square wave

3 D/A Converter : DAC0800 o Fast settling output current: 100 ns o Full scale error: ±1 LSB o Nonlinearity over temperature: ±0.1% o Full scale current drift: ±10 ppm/°C o High output compliance: −10V to +18V o Complementary current outputs o Interface directly with TTL, CMOS, PMOS and others o 2 quadrant wide range multiplying capability o Wide power supply range: ±4.5V to ±18V o Low power consumption: 33 mW at ±5V o Low cost

4 o Top Architecture of DAC D/A Converter : DAC0800

5 DAC Interface Circuit Digital ValueLatched Digital Value Analog Output DAC0800 DAC 74F573 Flip-Flop 8051 MCU Oscilloscope 0101100

6 DAC Interface Circuit

7 o C100H mapping l cmpact51.h 참조 l unsigned char xdata DAC_0800 _at_ 0xC100; o 수학함수 library 이용 l Sine function 이용 @ l Floating point 연산  속도 느림 l Specification 에 알맞은 방법 찾아보기

8 Timer / Counter o Count the machine cycle (1/12 of internal system cycle) or external clock / event o When the 8bit or 16bit timer overflows, timer interrupt occurs o 8051 has 2 timers – Timer0, Timer1 o Timers are controlled by TMOD, TCON registers o 4 modes are available

9 Timer Module o Timer Interface Circuit

10 Timer Mode o Mode0 l 8bit TH0 / lower 5bit TL0 o Mode1 l 16bit timer TH0/TL0 o Mode2 l 8bit timer with auto reload o Mode3 l Separated 8bit TH0 / 8bit TL0

11 Timer Mode

12 o Mode2 l TL 8bit counter 사용 l Auto reload 지원 n Overflow bit setting  – 사용자가 TF clear –TH 에 저장되어 있는 값이 TL 로 auto reload n Auto reload 는 수동 reload 보다 정확하다. l Timer 주기가 짧은 경우에만 사용 가능

13 Timer Registers

14 Problem State 1 o Sine wave generation l 한 주기 내에 샘플의 개수 선택, 또는 타이머 인터럽트 주기 결정 l COMPACT51 보드로 만들 수 있는 정현파의 최대주파수 l 버튼을 누를 때마다 주파수가 바뀌는 정현파 발생기 만들어보기

15 Problem State 2 o Square wave generation l 한 주기 내에 샘플의 개수 선택, 또는 타이머 인터럽트 주기 결정 l COMPACT51 보드로 만들 수 있는 구형파의 최대주파수 l 버튼을 누를 때마다 주파수가 바뀌는 구형파 발생기 만들어보기

16 Experiment Requirements o COMPACT51 보드 o KEIL uVisionII 프로그램 o PC o PC 와 COMPACT51 보드를 연결하기 위한 UART cable o Oscilloscope

17 References & Contact o Textbook l 8051 user’s manual l 8255 user’s manual l 8051 & C Programming, 문왕환, 도서출판 세화 l DAC0800/DAC0804 manual l COMPACT51 실험보드 회로도 l cmpt51.h 헤더파일 l KEIL uVisionIII 매뉴얼 (HELP) o 7th Week T.A. E-mail o Lecture Homepage l http://wink.kaist.ac.kr/course/ee306/


Download ppt "Lecture 8 Digital waveform generator using u-controller 2007/11/09 Prof. C.M. Kyung."

Similar presentations


Ads by Google