Upload
others
View
17
Download
0
Embed Size (px)
Citation preview
Mikroişlemci Sistemleri
Dr. Öğr. Üyesi Hamza Osman İLHAN
2019/1-Ders 10
Ders-10 Konular• DAC (digital to analog
converter)
– Binary weighted DAC
– R/2R ladder DAC
– DAC entegresi : DAC0830
– DAC örneği
• ADC (analog to digitalconverter)
– Parallel ADC
– Ramp converter ADC
– ADC entegresi : ADC0804
– ADC örneği
DAC – digital to analog converterADC – analog to digital converter
• P dijital değerlerle çalışır, ama fiziki dünya analogtur.
• Sıcaklık, basınç, nem, hız, ses … : analog değerlerdir.
• Fiziki dünya ile P arasında etkileşim için Analog↔Dijital dönüştürücü gerekli.
DAC – digital to analog converterADC – analog to digital converter
FizikiDünya
Transducer ADC
P
FizikiDünya
Transducer DAC
Sıcaklık(analog)
Elektriksel(analog)
Elektriksel(dijital)
İşlenmiş Veri(elektriksel-dijital)
Elektriksel(analog)
Fan Hızı(analog)
Analog-Dijital SinyalZamanda Sürekli Sinyal Zamanda Ayrık Sinyal
Ge
nliğ
i Sü
rekl
i Si
nya
lG
en
liğiA
yrık
Si
nya
l
DAC (digital to analog converter)
R
2R
4R
Vout
MSB
LSB
Bin
ary
In
pu
t
4R/7
Binary weighted DAC
DAC (digital to analog converter)R/2R ladder DAC
2R
2R
2R
Vout
MSB
LSB
Bin
ary
In
pu
t
2R
2R R R
DAC0830
AD0AD7AD6
AD5
AD4
AD1
AD2
AD3
VREF8
GND3
VCC20
CS1
WR12
DI34
DI25
DI16
DI07
RFB9
GND10
IOUT111
IOUT212
DI713
DI614
DI515
DI416
XFER17
WR218
ILE(BY1/BY2)19
U11
DAC0830
U13
OP1P
-5
U13(OP)
AD[0..7]
WR
IO8
DAC0830𝑪𝑺: Chip Select (active low). The CS in combination with ILE will enable WR1.ILE: Input Latch Enable (active high). The ILE in combination with CS enables WR1.WR1: Write 1. The active low WR1 is used to load the digital input data bits (DI) into the input latch. The data in the input latch is latched when WR1 is high. To update the input latch–CS and WR1 must be low while ILE is high.WR2: Write 2 (active low). This signal, in combination with XFER, causes the 8-bit data which is available in the input latch to transfer to the DAC register.𝑿𝑭𝑬𝑹: Transfer control signal (active low). The XFER will enable WR2.𝑫𝑰𝟎-𝑫𝑰𝟕: Digital Inputs. IOUT1: DAC Current Output 1 - IOUT2: DAC Current Output 2 : to OPAMPRfb: Feedback Resistor for R-2R VREF: Reference Voltage Input. This input connects an external precision voltage source to the internal R-2R ladder. VCC - GND
DAC0830
ÖrnekMOV DX, 1000H MOV AL, 00HTEKRAR:OUT DX, ALCALL DELAYINC ALJMP TEKRAR
ADC (analog digital converter)
• Parallel ADC
ADC (analog digital converter)
• Ramp converter
ADC0804
AD7
AD0
AD1
AD2
AD3
AD4
AD5
AD6
AD7
VIN+6
VIN-7
VREF/29
CLK IN4
A GND8
RD2
WR3
INTR5
CS1
D GND10
DB7(MSB)11
DB612
DB513
DB414
DB315
DB216
DB117
DB0(LSB)18
CLK R19
VCC20
U111
ADC0804
U111(CLK IN)
12%
RV1
1k
AD[0..7]RD
WR
2 3
1
U4:A74125
IO1
IO2
ADC0804
ADC0804
ÖrnekTEKRAR:MOV DX, 0200H MOV AL, 00HOUT DX, ALMOV DX, 0400HINTR_KONTROL:IN AL, DX
TEST AL, 80HJNZ INTR_KONTROLMOV DX, 0200HIN AL, DXCALL DELAYJMP TEKRAR