Professional Documents
Culture Documents
Interfacing With Adc and Dac
Interfacing With Adc and Dac
• featuring a full scale output current settling time of 150 ns while dissipating only 33
mW with ±5V supplies.
• No reference current (IREF) trimming is required for most applications since the full
scale output current is typically ±1 LSB of 255 IREF/256.
• Relative accuracies of better than ±0.19% assure 8-bit monotonicity and linearity while
zero level output current of less than 4 µA provides 8-bit zero accuracy for IREF≥2 mA.
• The power supply currents of the DAC0808 is independent of bit codes, and exhibits
essentially constant device characteristics over the entire supply voltage range.
Features
Relative accuracy: ±0.19% error maximum
• In the DAC0808, the digital inputs are converted to current (Iout), and by connecting a
resistor to the Iout pin, we convert the result to voltage.
• The total current provided by the Iout pin is a function of the binary numbers at the DO
– D7 inputs of the DAC0808 and the reference current (Iref), and is as follows:
Features of ADC
The PIC18f458 has a 10-bit 8 channel A/D converter.
The number of analog inputs varies among difference PIC18 devices. The
A/D converter has the following registers:
•A/D Result High Register (ADRESH)
•A/D Result Low Register (ADRESL)
•A/D Control Register 0 (ADCON0)
•A/D Control Register 1 (ADCON1)
ADRESH and ADRESL registers hold the result of the A/D conversion and
gives 16 bit output.
ADCON0 is Control Register used for setting conversion time as well as used
to select the input channels.
ADCON0 register.
7 6 5 4 3 2 1 0
ADCS1 ADCS0 CHS2 CHS1 CHS0 GO/DONE# -- ADON
0 01 FOSC/8
0 10 FOSC/32
1 01 FOSC/16
1 10 FOSC/64
Bit 1: Unimplemented