|
PIC16C781 Datasheet, PDF (81/186 Pages) Microchip Technology – 8-Bit CMOS Microcontrollers with A/D, D/A, OPAMP, Comparators and PSMC | |||
|
◁ |
PIC16C781/782
10.0 DIGITAL-TO-ANALOG
CONVERTER (DAC) MODULE
The Digital-to-Analog Converter (DAC) module gener-
ates an output voltage proportional to the value in the
8-bit DAC register (see Figure 10-1).
The output of the DAC module can be configured to
drive:
⢠The reference input to the ADC module
⢠The reference input to Comparators C1 and C2
⢠An analog output on pin RB1/AN5/VDAC
The voltage reference input to the DAC can be
selected from:
⢠Analog supply AVDD
⢠Comparator C1 VREF1
⢠Voltage reference VR
10.1 Control Registers
The DAC module is controlled via two special function
registers: DACON0 and DAC. The DACON0 register,
shown in Register 10-1:
⢠Enables DAC
⢠Enables output on RB1/AN5/VDAC
⢠Selects reference voltage
The DAC register, shown in Register 10-2, sets the out-
put of the DAC.
REGISTER 10-1: DIGITAL-TO-ANALOG CONVERTER CONTROL REGISTER0 (DACON0: 11Fh)
R/W-0 R/W-0
U-0
U-0
DAON DAOE
â
â
bit 7
U-0
U-0 R/W-0 R/W-0
â
â
DARS1 DARS0
bit 0
bit 7
bit 6
bit 5-2
bit 1-0
DAON: Digital-to-Analog Converter Enable bit
1 = DAC enabled
0 = DAC disabled
DAOE: Digital-to-Analog Converter Output Enable bit
1 = Output on the VDAC pin
0 = Output is not available for external use
Unimplemented: Read as â0â
DARS<1:0>: Digital-to-Analog Converter Voltage Reference Select bits, DACREF
00 = Analog supply, AVDD
01 = Comparator reference, VREF1 pin
10 = Voltage reference, VR
11 = Reserved, do not use
Legend:
R = Readable bit
- n = Value at POR
W = Writable bit
â1â = Bit is set
U = Unimplemented bit, read as â0â
â0â = Bit is cleared x = Bit is unknown
REGISTER 10-2: DIGITAL-TO-ANALOG CONVERTER REGISTER (DAC: 11Eh)
R/W-0
DA7
bit 7
R/W-0
DA6
R/W-0
DA5
R/W-0
DA4
R/W-0
DA3
R/W-0
DA2
R/W-0
DA1
R/W-0
DA0
bit 0
bit 7-0
DA<7:0>: Digital-to-Analog Converter Digital Input bits
Legend:
R = Readable bit
- n = Value at POR
W = Writable bit
â1â = Bit is set
â0â = Bit is cleared
 2001 Microchip Technology Inc.
Preliminary
DS41171A-page 79
|
▷ |