| Electronic Components Datasheet Search |
|
PIC16C781 Datasheet(PDF) 83 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16C781 Datasheet(HTML) 83 Page - Microchip Technology |
|
83 / 186 page ![]() 2001 Microchip Technology Inc. Preliminary DS41171A-page 81 PIC16C781/782 10.3 DAC Configuration Example 10-1 shows a sample configuration for the DAC module. The port pin is configured, AVDD is selected for the voltage reference, and the DAC output is enabled. EXAMPLE 10-1: DAC CONFIGURATION ;* This code block will configure the DAC ;* for AVDD Voltage Ref, and RB1/AN5/VDAC as ;* output. BANKSEL TRISB ; Select bank 1 BSF TRISB,1 ; Set RB1 input BSF ANSEL,1 ; Set RB1 as analog BANKSEL DACON0 ; Select Bank 2 CLRF DAC ; DAC to 00 MOVLW B’11000000’ ; Enable DAC output MOVWF DACON0 ; Set REF = VDD MOVLW DAC_VALUE MOVWF DAC ; Set DAC output 10.4 Effects of RESET A device RESET forces all registers to their RESET state. This forces the following conditions: • DAC module is off • Reference input to AVDD • Output disabled • DAC register is cleared 10.5 DAC Module Accuracy/Error The accuracy/error specified for the DAC includes: • Integral non-linearity error • Differential non-linearity error • Gain error • Offset error • Monotonicity FIGURE 10-2: DAC TRANSFER FUNCTION Offset error measures the first actual transition of a code versus the first ideal transition of a code. Offset error shifts the entire transfer function. Offset error can be calibrated out of a system or introduced into a sys- tem through the interaction of the output drive capabil- ity with the load impedance. Gain error measures the maximum deviation of the last actual transition and the last ideal transition adjusted for offset error. This error appears as a change in slope of the transfer function. The difference in gain error to full scale error is that full scale does not take offset error into account. Gain error can be cali- brated out by adjusting the reference voltage. Linearity error refers to the uniformity of the voltage change with code change. Linearity errors cannot be cal- ibrated out of the system. Integral non-linearity error measures the actual voltage output versus the ideal volt- age output adjusted by the gain error for each code. Differential non-linearity error measures the maxi- mum actual voltage step versus the ideal voltage step. This measure is unadjusted. TABLE 10-1: REGISTERS/BITS ASSOCIATED WITH DAC FFh FEh 04h 03h 02h 01h 00h Analog Output Voltage Address Name Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Value on: POR, BOR Value on All Other RESETS 11Fh DACON0 DAON DAOE — — — — DARS1 DARS0 00-- --00 00-- --00 11Eh DAC DA7 DA6 DA5 DA4 DA3 DA2 DA1 DA0 0000 0000 0000 0000 86h TRISB RB7 RB6 RB5 RB4 RB3 RB2 RB1 RB0 1111 1111 1111 1111 9Dh ANSEL AN7 AN6 AN5 AN4 AN3 AN2 AN1 AN0 1111 1111 1111 1111 Legend: x = unknown, u = unchanged, - = unimplemented, read as '0'. Shaded cells are not used for DAC conversion. |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |