PW www.ti.com TLV5633C TLV5633I DW SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 2.7 V TO 5.5 V LOW POWER 12-BIT DIGITAL-TO-ANALOG CONVERTERS WITH INTERNAL REFERENCE AND POWER DOWN FEATURES • • • • • • • DW OR PW PACKAGE (TOP VIEW) 12-Bit Voltage Output DAC Programmable Internal Reference Programmable Settling Time vs Power Consumption – 1 µs in Fast Mode – 3.5 µs in Slow Mode 8-Bit µController Compatible Interface Differential Nonlinearity . . . <0.5 LSB Typ Voltage Output Range . . . 2x the Reference Voltage Monotonic Over Temperature D2 D3 D4 D5 D6 D7 A1 A0 SPD DVDD 1 20 2 19 3 18 4 17 5 16 6 15 7 14 8 13 9 12 10 11 D1 D0 CS WE LDAC PWR AGND OUT REF AVDD APPLICATIONS • • • • • Digital Servo Control Loops Digital Offset and Gain Adjustment Industrial Process Control Machine and Motion Control Devices Mass Storage Devices DESCRIPTION The TLV5633 is a 12-bit voltage output digital- to-analog converter (DAC) with an 8-bit microcontroller compatible parallel interface. The 8 LSBs, the 4 MSBs, and 5 control bits are written using three different addresses. Developed for a wide range of supply voltages, the TLV5633 can be operated from 2.7 V to 5.5 V. The resistor string output voltage is buffered by a x2 gain rail-to-rail output buffer. The buffer features a Class A (slow mode: AB) output stage to improve stability and reduce settling time. The programmable settling time of the DAC allows the designer to optimize speed versus power dissipation. With its on-chip programmable precision voltage reference, the TLV5633 simplifies overall system design. Because of its ability to source up to 1 mA, the internal reference can also be used as a system reference. The settling time and the reference voltage can be chosen by a control register. Implemented with a CMOS process, the device is designed for single supply operation from 2.7 V to 5.5 V. It is available in 20-pin SOIC and TSSOP packages in standard commercial and industrial temperature ranges. AVAILABLE OPTIONS TA (1) PACKAGE (1) SOIC (DW) TSSOP (PW) 0°C to 70°C TLV5633CDW TLV5633CPW -40°C to 85°C TLV5633IDW TLV5633IPW For the most current package and ordering information, see the Package Option Addendum at the end of this document, or see the TI Web site at www.ti.com. Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of Texas Instruments semiconductor products and disclaimers thereto appears at the end of this data sheet. MCS is a registered trademark of Intel Corporation . PRODUCTION DATA information is current as of publication date. Products conform to specifications per the terms of the Texas Instruments standard warranty. Production processing does not necessarily include testing of all parameters. Copyright © 1999–2006, Texas Instruments Incorporated TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 These devices have limited built-in ESD protection. The leads should be shorted together or the device placed in conductive foam during storage or handling to prevent electrostatic damage to the MOS gates. FUNCTIONAL BLOCK DIAGRAM REF AGND DVDD AVDD PGA With Output Enable Voltage Bandgap SPD PWR Powerdown and Speed Control Power-On Reset 5 2 5-Bit Control Latch A(0,1) Interface Control CS WE x2 2 4 4-Bit DAC MSW Holding Latch 4 8 8-Bit DAC LSW Holding Latch 8 12 12-Bit DAC Register 12 D(0-7) LDAC Terminal Functions TERMINAL NAME I/O/P DESCRIPTION A1, A0 7, 8 I Address input AGND 14 P Ground AVDD 11 P Positive power supply (analog part) CS 2 NO. 18 I Chip select. Digital input active low, used to enable/disable inputs D0-D1 19, 20 I Data input D2-D7 1-6 I Data input DVDD 10 P Positive power supply (digital part) LDAC 16 I Load DAC. Digital input active low, used to load DAC output OUT 13 O DAC analog voltage output PWR 15 I Power down. Digital input active low REF 12 I/O SPD 9 I Speed select. Digital input WE 17 I Write enable. Digital input active low, used to latch data Analog reference voltage input/output Submit Documentation Feedback OUT TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 ABSOLUTE MAXIMUM RATINGS over operating free-air temperature range (unless otherwise noted) (1) UNIT Supply voltage (DVDD, AVDD to AGND) 7V Supply voltage difference range, AVDD - DVDD -2.8 V to 2.8 V Reference input voltage range -0.3 V to VDD + 0.3 V Digital input voltage range Operating free-air temperature range, TA -0.3 V to VDD + 0.3 V TLV5633C 0°C to 70°C TLV5633I -40°C to 85°C Storage temperature range, Tstg (1) -65°C to 150°C Stresses beyond those listed under "absolute maximum ratings" may cause permanent damage to the device. These are stress ratings only, and functional operation of the device at these or any other conditions beyond those indicated under "recommended operating conditions" is not implied. Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability. RECOMMENDED OPERATING CONDITIONS Supply voltage, DVDD, AVDD MIN NOM MAX 5-V operation 4.5 5 5.5 V 3-V operation 2.7 3 3.3 V 0 0 0 V 2 V Supply voltage difference, ∆ VDD = AVDD - DVDD Power on reset voltage, POR High-level digital input voltage, VIH Low-level digital input voltage, VIL 0.55 DVDD = 2.7 V 2 DVDD = 5.5 V 2.4 UNIT V DVDD = 2.7 V 0.6 DVDD = 5.5 V 1 V Reference voltage, Vref to REF terminal (5-V supply) (1) AGND 2.048 AVDD-1.5 V Reference voltage, Vref to REF terminal (3-V supply) (1) AGND 1.024 AVDD-1.5 V Load resistance, RL 2 Load capacitance, CL Operating free-air temperature, TA (1) kΩ 100 TLV5633C TLV5633I 0 70 -40 85 pF °C Due to the x2 output buffer, a reference input voltage ≥ AVDD/2 causes clipping of the transfer function. The output buffer of the internal reference must be disabled, if an external reference is used. Submit Documentation Feedback 3 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 ELECTRICAL CHARACTERISTICS over recommended operating free-air temperature range, Vref = 2.048 V, Vref = 1.024 V (unless otherwise noted) POWER SUPPLY PARAMETER TEST CONDITIONS AVDD = 5 V, DVDD = 5 V IDD Power supply current No load, All inputs = AGND or DVDD, DAC latch = 0x800 AVDD = 3 V, DVDD = 3 V Power down supply current PSRR Power supply rejection ratio Zero scale, external reference (1) Full scale, external reference (2) TYP MAX REF Fast on Slow MIN 2.3 2.8 mA 1.3 1.6 mA REF Fast off Slow 1.9 2.4 mA 0.9 1.2 mA REF Fast on Slow 2.1 2.6 mA 1.2 1.5 mA REF Fast off Slow 1.8 2.3 mA 0.9 1.1 mA 0.01 1 µA -60 UNIT dB -60 STATIC DAC SPECIFICATIONS Resolution 12 bits INL Integral nonlinearity, end point adjusted RL = 10 kΩ, CL = 100 pF (3) ±1.2 ±3 LSB DNL Differential nonlinearity RL = 10 kΩ, CL = 100 pF (4) ±0.3 ±0.5 LSB EZS Zero-scale error (offset error at zero scale) (5) 20 mV EZSTC Zero-scale-error temperature coefficient (6) 20 ppm/°C EG Gain error (7) ±0.3 % full scale V EG TC Gain error temperature coefficient (8) 20 ppm/°C OUTPUT SPECIFICATIONS VO Output voltage RL = 10 kΩ Output load regulation accuracy VO = 4.096 V, 2.048 V, RL= 2 kΩ (1) (2) (3) (4) (5) (6) (7) (8) 4 AVDD-0.4 ±0.29 V % full scale V Power supply rejection ratio at zero scale is measured by varying AVDD and is given by: PSRR = 20 log [(EZS(AVDDmax) EZS(AVDDmin))/AVDDmax] Power supply rejection ratio at full scale is measured by varying AVDD and is given by: PSRR = 20 log [(EG(AVDDmax) EG(AVDDmin))/AVDDmax] The relative accuracy or integral nonlinearity (INL) sometimes referred to as linearity error, is the maximum deviation of the output from the line between zero and full scale excluding the effects of zero code and full-scale errors (see text). The differential nonlinearity (DNL) sometimes referred to as differential error, is the difference between the measured and ideal 1 LSB amplitude change of any two adjacent codes. Monotonic means the output voltage changes in the same direction (or remains constant) as a change in the digital input code. Zero-scale error is the deviation from zero voltage output when the digital input code is zero (see text). Zero-scale-error temperature coefficient is given by: EZS TC = [EZS (Tmax) - EZS (Tmin)]/2Vref× 106/(Tmax - Tmin). Gain error is the deviation from the ideal output (2Vref - 1 LSB) with an output load of 10 kΩ excluding the effects of the zero-error. Gain temperature coefficient is given by: EG TC = [EG(Tmax) - EG (Tmin)]/2Vref× 106/(Tmax - Tmin). Submit Documentation Feedback TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 ELECTRICAL CHARACTERISTICS (continued) over recommended operating free-air temperature range, Vref = 2.048 V, Vref = 1.024 V (unless otherwise noted) REFERENCE PIN CONFIGURED AS OUTPUT (REF) PARAMETER Vref(OUTL) Low reference voltage Vref(OUTH) High reference voltage Iref(source) Output source current Iref(sink) Output sink current PSRR Power supply rejection ratio TEST CONDITIONS AVDD = DVDD > 4.75 V MIN TYP MAX UNIT 1.003 1.024 1.045 V 2.027 2.048 2.069 1 -1 V mA mA -48 dB REFERENCE PIN CONFIGURED AS INPUT (REF) PARAMETER VI Input voltage RI Input resistance CI Input capacitance Reference input bandwidth TEST CONDITIONS REF = 0.2 Vpp + 1.024 V dc REF = 1 Vpp + 2.048 V dc, AVDD = 5 V 50 kHz 100 kHz Reference feedthrough TYP MAX 0 10 kHz Harmonic distortion, reference input MIN REF = 1 Vpp at 1 kHz + 1.024 V dc UNIT AVDD-1.5 V 10 MΩ 5 pF Fast 900 Slow 500 Fast -87 Slow -77 Fast -74 Slow -61 Fast -66 dB -80 dB (1) kHz dB dB DIGITAL INPUTS IIH High-level digital input current VI = DVDD IIL Low-level digital input current VI = 0 V CI Input capacitance (1) 1 -1 µA µA 8 pF Reference feedthrough is measured at the DAC output with an input code = 0x000. OPERATING CHARACTERISTICS over recommended operating free-air temperature range, Vref = 2.048 V, and Vref = 1.024 V, (unless otherwise noted) ANALOG OUTPUT DYNAMIC PERFORMANCE PARAMETER TEST CONDITIONS ts(FS) Output settling time, full scale RL = 10 kΩ, CL = 100 pF (1) ts(CC) Output settling time, code to code RL = 10 kΩ, CL = 100 pF (2) SR Slew rate RL = 10 kΩ, CL = 100 pF (3) Glitch energy DIN = 0 to 1, fCLK = 100 kHz, CS = VDD SNR Signal-to-noise ratio SINAD Signal-to-noise + distortion THD Total harmonic distortion SFDR Spurious free dynamic range (1) (2) (3) fs = 480 kSPS, fB = 20 kHz, fout = 1 kHz, RL = 10 kΩ, CL = 100 pF TYP MAX Fast MIN 1 3 Slow 3.5 7 Fast 0.5 1.5 Slow 1 2 Fast 6 10 Slow 1.2 1.7 73 78 61 67 63 µs µs V/µs 5 -69 UNIT nV-S -62 dB 74 Settling time is the time for the output signal to remain within ±0.5 LSB of the final measured value for a digital input code change of 0x020 to 0xFDF or 0xFDF to 0x020 respectively. Settling time is the time for the output signal to remain within ±0.5 LSB of the final measured value for a digital input code change of one count. Slew rate determines the time it takes for a change of the DAC output from 10% to 90% full-scale voltage. Submit Documentation Feedback 5 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 DIGITAL INPUT TIMING REQUIREMENTS MIN NOM MAX tsu(CS-WE) Setup time, CS low before negative WE edge 15 ns tsu(D) Setup time, data ready before positive WE edge 10 ns tsu(A) Setup time, addresses ready before positive WE edge 20 ns th(DA) Hold time, data and addresses held valid after positive WE edge 5 ns tsu(WE-LD) Setup time, positive WE edge before LDAC low 5 ns twH(WE) Pulse duration, WE high 20 ns tw(LD) Pulse duration, LDAC low 23 ns PARAMETER MEASUREMENT INFORMATION D(0-7) X A(0,1) X Data X Address X tsu(D) tsu(A) CS th(DA) twH(WE) tsu(CS-WE) WE tsu(WE-LD) tw(LD) LDAC Figure 1. Timing Diagram D(0-7) X LSW A(0,1) X 0 X X MSW X 1 X CS WE LDAC Figure 2. Example of a Complete Write Cycle (MSW, LSW) Using LDAC for Update 6 UNIT Submit Documentation Feedback TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 PARAMETER MEASUREMENT INFORMATION (continued) D(0−7) X LSW X MSW X Control X A(0−1) X 0 X 1 X 3 X CS WE LDAC Figure 3. Example of a Complete Write Cycle (MSW, LSW, Control) Submit Documentation Feedback 7 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 TYPICAL CHARACTERISTICS DNL - Differential Nonlinearity - LSB DIFFERENTIAL NONLINEARY ERROR 1 0.8 0.6 0.4 0.2 0 -0.2 -0.4 -0.6 -0.8 -1 0 512 1024 1536 2048 2560 3072 3584 4096 3072 3584 4096 Digital Code Figure 4. INTEGRAL NONLINEARTIY ERROR INL - Intergral Nonlinearity - LSB 3 2 1 0 -1 -2 -3 0 512 1024 1536 2048 2560 Digital Code Figure 5. MAXIMUM OUTPUT VOLTAGE vs LOAD CURRENT MAXIMUM OUTPUT VOLTAGE vs LOAD CURRENT 2.04 4.08 AVDD = 3 V, Vref = Int. 1 V, Input Code = 0xFFF 2.0395 4.079 VO - Output Voltage - V VO - Output Voltage - V 2.039 Fast Mode, Source 2.0385 Fast Mode, Source 4.0785 2.038 2.0375 4.078 4.0775 2.037 Slow Mode, Source 4.077 Slow Mode, Source 2.0365 4.0765 2.036 4.076 2.0355 4.0755 0 8 AVDD = 5 V, Vref = Int. 2 V, Input Code = 0xFFF 4.0795 0.5 1 1.5 2 2.5 3 3.5 4 4.5 Load Current - mA 0 1.5 2 2.5 3 Load Current - mA Figure 6. Figure 7. Submit Documentation Feedback 0.5 1 3.5 4 4.5 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 TYPICAL CHARACTERISTICS (continued) MINIMUM OUTPUT VOLTAGE vs LOAD CURRENT MINIMUM OUTPUT VOLTAGE vs LOAD CURRENT 0.25 0.25 Fast Mode, Sink Fast Mode, Sink VO - Output Voltage - V 0.2 0.15 0.1 Slow Mode, Sink 0.05 0 0 0.5 1 1.5 2 2.5 3 Load Current - mA 3.5 4 THD - Total Harmonic Distortion - dB Slow Mode, Sink 0 AVDD = 3 V, Vref = Int. 1 V, Input Code = 0x000 0 0.5 1 1.5 2 2.5 3 Load Current - mA 3.5 4 4.5 Figure 8. Figure 9. TOTAL HARMONIC DISTORTION vs FREQUENCY TOTAL HARMONIC DISTORTION AND NOISE vs FREQUENCY AVDD = 5 V, REF = 1 V dc + 1 V pp Sinewave, Output Full Scale -20 -30 -40 -50 -60 Slow Mode -70 -80 Fast Mode -90 -100 100 0.1 4.5 0 -10 0.15 0.05 AVDD = 5 V, Vref = Int. 2 V, Input Code = 0x000 1000 10000 100000 THD+N - Total Harmonic Distortion and Noise - dB VO - Output Voltage - V 0.2 0 -10 AVDD = 5 V, REF = 1 V dc + 1 V pp Sinewave, Output Full Scale -20 -30 -40 -50 -60 Slow Mode -70 -80 Fast Mode -90 -100 100 1000 10000 100000 f - Frequency - Hz f - Frequency - Hz Figure 10. Figure 11. Submit Documentation Feedback 9 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 TYPICAL CHARACTERISTICS (continued) POWER DOWN SUPPLY CURRENT vs TIME 1 0.9 I DD - Supply Current - mA 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 10 20 30 40 50 60 t - Time - µs Figure 12. 10 Submit Documentation Feedback 70 80 90 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 APPLICATION INFORMATION GENERAL FUNCTION The TLV5633 is a 12-bit, single supply DAC, based on a resistor string architecture. It consists of a parallel interface, a speed and power down control logic, a programmable internal reference, a resistor string, and a rail-to-rail output buffer. The output voltage (full scale determined by reference) is given by: 2 REF CODE [V] 0 1000 Where REF is the reference voltage and CODE is the digital input value in the range 0x000 to 0xFFF. A power on reset initially puts the internal latches to a defined state (all bits zero). PARALLEL INTERFACE The device latches data on the positive edge of WE. It must be enabled with CS low. Whether the data is written to one of the DAC holding latches (MSW, LSW) or the control register depends on the address bits A1 and A0. LDAC low updates the DAC with the value in the holding latch. LDAC is an asynchronous input and can be held low, if a separate update is not necessary. However, to control the DAC using the load feature, there should be approximately a 5 ns delay after the positive WE edge before driving LDAC low. Two more asynchronous inputs, SPD and PWR control the settling times and the power-down mode: SPD: Speed control 1 → fast mode 0 → slow mode PWR: Power control 1 → normal operation 0 → power down It is also possible to program the different modes (fast, slow, power down) and the DAC update latch using the control register. The following tables list the possible combinations of control signals and control bits. PIN BIT SPD SPD 0 0 Slow 0 1 Fast 1 0 Fast 1 1 Fast PIN BIT PWR PWD 0 0 Down 0 1 Down 1 0 Normal 1 1 Down PIN BIT LDAC RLDAC 0 0 Transparent 0 1 Transparent 1 0 Hold 1 1 Transparent Submit Documentation Feedback MODE POWER LATCH 11 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 DATA FORMAT The TLV5633 writes data either to one of the DAC holding latches or to the control register depending on the address bits A1 and A0. ADDRESS BITS A1 A0 REGISTER 0 0 DAC LSW holding 0 1 DAC MSW holding 1 0 Reserved 1 1 Control The following table lists the meaning of the bits within the control register. D7 X X (1) (1) D6 X X (1) D5 X X (1) D4 REF1 0 (1) D3 REF0 0 (1) D2 RLDAC 0 (1) D1 PWR 0 (1) D0 SPD 0 (1) Default values: X = Don't Care SPD: Speed control bit 1 → fast mode 0 → slow mode PWR: Power control bit 1 → power down 0 → normal operation RLDAC: Load DAC latch 1 → latch transparent 0 → DAC latch controlled by LDAC pin REF1 and REF0 determine the reference source and the reference voltage. REFERENCE BITS REF1 REF0 REFERENCE 0 0 External 0 1 1.024 V 1 0 2.048 V 1 1 External If an external reference voltage is applied to the REF pin, external reference must be selected. LAYOUT CONSIDERATIONS To achieve the best performance, it is recommended to have separate power planes for GND, AVDD, and DVDD. Figure 13 shows how to lay out the power planes for the TLV5633. As a general rule, digital and analog signals should be separated as wide as possible. To avoid crosstalk, analog and digital traces must not be routed in parallel. The two positive power planes (AVDD and DVDD) should be connected together at one point with a ferrite bead. A 100-nF ceramic low series inductance capacitor between DVDD and GND and a 1-µF tantalum capacitor between AVDD and GND placed as close as possible to the supply pins are recommended for optimal performance. 12 Submit Documentation Feedback TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 DVDD AVDD Figure 13. TLV5633 Board Layout LINEARITY, OFFSET, AND AGAIN ERROR USING SINGLE END SUPPLIES When an amplifier is operated from a single supply, the voltage offset can still be either positive or negative. With a positive offset, the output voltage changes on the first code change. With a negative offset the output voltage may not change with the first code, depending on the magnitude of the offset voltage. The output amplifier attempts to drive the output to a negative voltage. However, because the most negative supply rail is ground, the output cannot drive below ground and clamps the output at 0 V. The output voltage remains at zero until the input code value produces a sufficient positive output voltage to overcome the negative offset voltage, resulting in the transfer function shown in Figure 14. Output Voltage 0V Negative Offset DAC Code Figure 14. Effect of Negative Offset (Single Supply) The offset error, not the linearity error, produces this breakpoint. The transfer function would have followed the dotted line if the output buffer could drive below the ground rail. For a DAC, linearity is measured between zero input code (all inputs 0) and full scale code (all inputs 1) after offset and full scale are adjusted out or accounted for in some way. However, single supply operation does not allow for adjustment when the offset is negative due to the breakpoint in the transfer function. So the linearity is measured between full scale code and the lowest code that produces a positive output voltage. Submit Documentation Feedback 13 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 TLV5633 INTERFACED to an Intel MCS®51 Controller The circuit in Figure 15 shows how to interface the TLV5633 to an Intel MCS®51 microcontroller. The address bus and the data bus of the controller are multiplexed on port 0 (non page mode) to save port pins. To separate the address bits and the data bits, the controller provides a dedicated signal, address latch enable (ALE), which is connected to a latch at port 0. An address decoder is required to generate the chip select signal for the TLV5633. In this example, a simple 3-to-8 decoder (74AC138) is used for the interface as shown in Figure 15. The DAC is memory mapped at addresses 0x8000/1/2/3 within the data memory address space and mirrored every 32 address locations (0x8020/1/2/3, 0x8040/1/2/3, etc.). In a typical microcontroller system, programmable logic should be used to generate the chip select signals for the entire system. The data pins and the WE pin of the TLV5633 can be connected directly to the multiplexed address and data bus and the WR signal of the controller. The application uses the TLV5633 device's internal reference at 2.048 V. The LDAC pin is connected to P3.5 and is used to update the DAC after both data bytes have been written. 8xC51 8 P2 A(15-8) 16 8 8 P0 AD(7-0) D(7-0) AD(7-0) 74AC138 74AC373 8 Q(7-0) A2 A3 A4 A 8 Y(7-0) CS(7-0) B C DVDD TLV5633 ALE LE OE A15 DVDD G1 G2A G2B 2 G2A A(1-0) SPD D(7-0) PWR CS OUT WE WR P3.5 LDAC To Other Devices Requiring Voltage Reference REF Figure 15. TLV5633 Interfaced to an Intel MCS®51 Controller 14 A(15-0) Submit Documentation Feedback RL TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 SOFTWARE In the following example, the code generates a waveform at 20 KSPS with 32 samples stored in a table within the program memory space of the microcontroller. The waveform data is located in the program memory space at segment SINTBL beginning with the MSW of the first 16-bit word (the 4 MSBs are ignored), followed by the LSW. Two bytes are required for each DAC word (the table is not shown in the code example). The program consists of two parts: • A main routine, which is executed after reset and which initializes the timer and the interrupt system of the microcontroller. • An interrupt service routine, which reads a new value from the waveform table and writes it to the DAC. ;-------------------------------------------------------------------------------------; File: WAVE.A51 ; Function: wave generation with TLV5633 ; Processors: 80C51 family (running at 12 MHz) ; Software: ASM51 assembler, Keil BL51 code-banking linker ;(C) 1999 Texas Instruments ;-------------------------------------------------------------------------------------;-------------------------------------------------------------------------------------; Program function declaration ;-------------------------------------------------------------------------------------NAME WAVE MAIN SEGMENT CODE ISR SEGMENT CODE WAVTBL SEGMENT CODE VAR1 SEGMENT DATA STACK SEGMENT IDATA ;-------------------------------------------------------------------------------------; Code start at address 0, jump to start ;-------------------------------------------------------------------------------------CSEG AT 0 LJMP start ; Execution starts at address 0 on power-up. ;-------------------------------------------------------------------------------------; Code in the timer0 interrupt vector ;-------------------------------------------------------------------------------------CSEG AT 0BH LJMP timer0isr ; Jump vector for timer 0 interrupt is 000Bh ;-------------------------------------------------------------------------------------; Define program variables ;-------------------------------------------------------------------------------------RSEG VAR1 rolling_ptr: DS 1 ;-------------------------------------------------------------------------------------; Interrupt service routine for timer 0 interrupts ;-------------------------------------------------------------------------------------RSEG ISR TIMER0ISR: PUSH PSW PUSH ACC ; The signal to be output on the dac is stored in a table ; as 32 samples of msb, lsb pairs (64 bytes). ; The pointer, rolling_ptr, rolls round the table of samples ; incrementing by 2 bytes (1 sample) on each interrupt ; (at the end of this routine). MOV DPTR, #wavetable ; set DPTR to the start of the table MOV R0, #001H ; R0 selects DAC MSW MOV A,rolling_ptr ; ACC loaded with the pointer into the wave table MOVC A,@A+DPTR ; get msb from the table MOVX @R0, A ; write DAC MSW MOV R0, #000H ; R0 selects DAC LSW MOV A,rolling_ptr ; move rolling pointer back in to ACC INC A ; increment ACC holding the rolling pointer MOVC A,@A+DPTR ; which is the lsb of this sample, now in ACC MOVX @R0, A ; write DAC LSW MOV A,rolling_ptr ; load ACC with rolling pointer again INC A ; increment the ACC twice, to get next sample INC A ANL A,#003FH ; wrap back round to 0 if >64 MOV rolling_ptr,A ; move value held in ACC back to the rolling pointer Submit Documentation Feedback 15 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 CLR T1 ; set LDACB = 0 (update DAC) SETB T1 ; set LDACB = 1 POP ACC POP PSW RETI ;-------------------------------------------------------------------------------------; Set up stack ;-------------------------------------------------------------------------------------RSEG STACK DS 10h ; 16 Byte Stack! ;-------------------------------------------------------------------------------------; Main Program ;-------------------------------------------------------------------------------------RSEG MAIN start: MOV SP,#STACK-1 ; first set Stack Pointer CLR A MOV rolling_ptr,A ; set rolling pointer to 0 MOV TMOD,#002H ; set timer 0 to mode 2 - auto-reload MOV TH0,#0CEH ; set timer 2 re-load value for 20 kHz interrupts MOV P2, #080H ; set A15 of address bus high to 'memory map' ; device up beyond used address space SETB T1 ; set LDACB = 1 (on P3.5) ; TLV5633 setup MOV R0, #003H ; R0 selects control register MOV A, #011H ; LOAD ACC with control register value: ; REF1=1, REF0=0 -> 2.048V internal reference ; RLDAC=0 -> use LDACB pin to control DAC ; PD=0 -> DAC enabled ; SPD=1 -> FAST mode ; write control word: MOVX @R0, A ; write DAC control word SETB ET0 ; enable timer 0 interrupts SETB EA ; enable all interrupts SETB TR0 ; start timer 0 always: SJMP always RET ;-------------------------------------------------------------------------------------; Table of 32 wave samples used as DAC data ;-------------------------------------------------------------------------------------RSEG WAVTBL wavetable: ;...insert 32 samples here... .END 16 Submit Documentation Feedback TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 DEFINITIONS OF SPECIFICATIONS AND TERMINOLOGY Integral Nonlinearity (INL) The relative accuracy or integral nonlinearity (INL), sometimes referred to as linearity error, is the maximum deviation of the output from the line between zero and full scale excluding the effects of zero code and full-scale errors. Differential Nonlinearity (DNL) The differential nonlinearity (DNL), sometimes referred to as differential error, is the difference between the measured and ideal 1-LSB amplitude change of any two adjacent codes. Monotonic means the output voltage changes in the same direction (or remains constant) as a change in the digital input code. Zero-Scale Error (EZS) Zero-scale error is defined as the deviation of the output from 0 V at a digital input value of 0. Gain Error (EG) Gain error is the error in slope of the DAC transfer function. Signal-To-Noise Ratio + Distortion (SINAD) Signal-to-noise ratio + distortion is the ratio of the rms value of the output signal to the rms sum of all other spectral components below the Nyquist frequency, including harmonics but excluding dc. The value for SINAD is expressed in decibels. Spurious Free Dynamic Range (SFDR) Spurious free dynamic range is the difference between the rms value of the output signal and the rms value of the spurious signal within a specified bandwidth. The value for SFDR is expressed in decibels. Total Harmonic Distortion (THD) Total harmonic distortion is the ratio of the rms sum of the first six harmonic components to the rms value of the fundamental signal and is expressed in decibels. Submit Documentation Feedback 17 TLV5633C TLV5633I www.ti.com SLAS190C – MARCH 1999 – REVISED SEPTEMBER 2006 Revision history 18 Revision Date Description A 01/2001 Minor typographical changes. B 08/2003 Changed the High-level and Low-level digital input voltage in the Recommended Operating Conditins table. C 09/2006 Changed the positions of LSW and MSW in Figure 2 and Figure 3. Submit Documentation Feedback PACKAGE OPTION ADDENDUM www.ti.com 17-Aug-2012 PACKAGING INFORMATION Orderable Device Status (1) Package Type Package Drawing Pins Package Qty Eco Plan (2) Lead/ Ball Finish MSL Peak Temp ACTIVE SOIC DW 20 25 Green (RoHS & no Sb/Br) CU NIPDAU Level-1-260C-UNLIM TLV5633CDWG4 ACTIVE SOIC DW 20 25 Green (RoHS & no Sb/Br) CU NIPDAU Level-1-260C-UNLIM TLV5633CPW ACTIVE TSSOP PW 20 70 Green (RoHS & no Sb/Br) CU NIPDAU Level-1-260C-UNLIM TLV5633CPWG4 ACTIVE TSSOP PW 20 70 Green (RoHS & no Sb/Br) CU NIPDAU Level-1-260C-UNLIM TLV5633CPWR ACTIVE TSSOP PW 20 TLV5633CPWRG4 ACTIVE TSSOP PW 20 TLV5633IDW ACTIVE SOIC DW 20 25 Green (RoHS & no Sb/Br) CU NIPDAU Level-1-260C-UNLIM TLV5633IDWG4 ACTIVE SOIC DW 20 25 Green (RoHS & no Sb/Br) CU NIPDAU Level-1-260C-UNLIM TLV5633IPW ACTIVE TSSOP PW 20 70 Green (RoHS & no Sb/Br) CU NIPDAU Level-1-260C-UNLIM TLV5633IPWG4 ACTIVE TSSOP PW 20 70 Green (RoHS & no Sb/Br) CU NIPDAU Level-1-260C-UNLIM TBD Samples (Requires Login) TLV5633CDW TBD (3) Call TI Call TI Call TI Call TI (1) The marketing status values are defined as follows: ACTIVE: Product device recommended for new designs. LIFEBUY: TI has announced that the device will be discontinued, and a lifetime-buy period is in effect. NRND: Not recommended for new designs. Device is in production to support existing customers, but TI does not recommend using this part in a new design. PREVIEW: Device has been announced but is not in production. Samples may or may not be available. OBSOLETE: TI has discontinued the production of the device. (2) Eco Plan - The planned eco-friendly classification: Pb-Free (RoHS), Pb-Free (RoHS Exempt), or Green (RoHS & no Sb/Br) - please check http://www.ti.com/productcontent for the latest availability information and additional product content details. TBD: The Pb-Free/Green conversion plan has not been defined. Pb-Free (RoHS): TI's terms "Lead-Free" or "Pb-Free" mean semiconductor products that are compatible with the current RoHS requirements for all 6 substances, including the requirement that lead not exceed 0.1% by weight in homogeneous materials. Where designed to be soldered at high temperatures, TI Pb-Free products are suitable for use in specified lead-free processes. Pb-Free (RoHS Exempt): This component has a RoHS exemption for either 1) lead-based flip-chip solder bumps used between the die and package, or 2) lead-based die adhesive used between the die and leadframe. The component is otherwise considered Pb-Free (RoHS compatible) as defined above. Green (RoHS & no Sb/Br): TI defines "Green" to mean Pb-Free (RoHS compatible), and free of Bromine (Br) and Antimony (Sb) based flame retardants (Br or Sb do not exceed 0.1% by weight in homogeneous material) Addendum-Page 1 PACKAGE OPTION ADDENDUM www.ti.com (3) 17-Aug-2012 MSL, Peak Temp. -- The Moisture Sensitivity Level rating according to the JEDEC industry standard classifications, and peak solder temperature. Important Information and Disclaimer:The information provided on this page represents TI's knowledge and belief as of the date that it is provided. TI bases its knowledge and belief on information provided by third parties, and makes no representation or warranty as to the accuracy of such information. Efforts are underway to better integrate information from third parties. TI has taken and continues to take reasonable steps to provide representative and accurate information but may not have conducted destructive testing or chemical analysis on incoming materials and chemicals. TI and TI suppliers consider certain information to be proprietary, and thus CAS numbers and other limited information may not be available for release. In no event shall TI's liability arising out of such information exceed the total purchase price of the TI part(s) at issue in this document sold by TI to Customer on an annual basis. Addendum-Page 2 IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other changes to its semiconductor products and services per JESD46C and to discontinue any product or service per JESD48B. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily performed. TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions. Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use of any TI components in safety-critical applications. In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and requirements. Nonetheless, such components are subject to these terms. No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties have executed a special agreement specifically governing such use. Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI has specifically designated certain components which meet ISO/TS16949 requirements, mainly for automotive use. Components which have not been so designated are neither designed nor intended for automotive use; and TI will not be responsible for any failure of such components to meet such requirements. Products Applications Audio www.ti.com/audio Automotive and Transportation www.ti.com/automotive Amplifiers amplifier.ti.com Communications and Telecom www.ti.com/communications Data Converters dataconverter.ti.com Computers and Peripherals www.ti.com/computers DLP® Products www.dlp.com Consumer Electronics www.ti.com/consumer-apps DSP dsp.ti.com Energy and Lighting www.ti.com/energy Clocks and Timers www.ti.com/clocks Industrial www.ti.com/industrial Interface interface.ti.com Medical www.ti.com/medical Logic logic.ti.com Security www.ti.com/security Power Mgmt power.ti.com Space, Avionics and Defense www.ti.com/space-avionics-defense Microcontrollers microcontroller.ti.com Video and Imaging www.ti.com/video RFID www.ti-rfid.com OMAP Mobile Processors www.ti.com/omap TI E2E Community e2e.ti.com Wireless Connectivity www.ti.com/wirelessconnectivity Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright © 2012, Texas Instruments Incorporated