The most popular programmable dual 12 bit analog-t

2022-08-01
  • Detail

Programmable dual 12 bit a/D converter tlc5618 and its C51 advanced language programming

1 overview

1.1 general description

tlc5618 is a programmable dual 12 bit a/D converter with buffered reference input produced by texasinstruments of the United States. The DAC output voltage range is twice the reference voltage, and its output is monotonic. The device is simple to use, works with 5V single power supply, and includes power on reset function to ensure repeated startup

tlc5618 can be digitally controlled through CMOS compatible 3-wire serial bus. The device receives a 16 bit word for programming to generate an analog output. The software of digital input standard configuration has built-in more than 30 experimental standard terminals such as gb/t228.1 (2) 010, gb/t1040 (2) 008 and gb/t528 (1) 998. It is characterized by a Schmitt trigger, so it has high noise suppression ability

1.2 features

(1) programmable to the establishment time of 0.5lsb

(2) two 12 bit CMOS voltage output DACs

(3) single power supply operation

(4) 3-wire serial interface

(5) high impedance reference input

(6) the voltage output range is twice the reference voltage

(7) software power-off mode

(8) internal power on reset

(9) low power consumption, 3MW for slow mode and 8mW for fast mode

(10) 1.21mhz input data update rate

(11) monotonic change within the operating temperature range

1.3 pin arrangement and pin function

tlc5618 pin arrangement as shown in Figure 1. What is the significance of tensile strength to 1-like plastic materials? Although the tensile strength only represents the maximum uniform plastic deformation resistance, the functions of each pin are as follows:

(1) DIN (1): data input can make the graph display in the best scale

(2) SCLK (2): serial clock input

(3) Cs (3): chip selection, low level is valid

(4) outa (4): DACA analog output

(5) agnd (5): Analog ground

(6) refin (6): reference voltage input

(7) outb (7): dacb analog output

(8) VDD (8): positive power supply

figure 1tlc5618 pin arrangement

figure 2tlc5618 typical application circuit

2 application introduction

2.1 general functions

tlc5618 uses resistor series buffered by operational amplifier to convert 12 bit digital data into analog voltage level (see Figure 2), and its output polarity is the same as the reference voltage input (see Table 1)

Table 1 binary code table (0V to 2vrefin output, gain =2)

0v

output voltage is given by the following formula: 2 (vrefin) code/4096

the internal circuit resets the DAC register to 0 when powered on

the output buffer has an output that can reach the power supply voltage amplitude. It has short-circuit protection and can drive a 2K Ω load with a 100pF load capacitor

the reference voltage input is buffered, which makes the DAC input resistance independent of the code

The maximum serial clock rate of

tlc5618 is:

f (SCLK) max=1/[tw (CH) min + tw (CL) min]=20mhz

2.2 serial interface

when the chip selection (CS) is at the low level, the input data is timed by the clock, and the 16 bit shift register is read in the way that the most significant bit is in front, of which the first 4 bits are programming bits and the last 12 bits are data bits. The falling edge of SCLK moves the data into the input register, and then the rising edge of CS sends the data to the DAC register. All CS jumps shall occur when SCLK input is at low level. The functions of the programmable bits d15-d12 are shown in Table 2

Table 2 functions of programmable bits d15-d12

3tlc5618 and MCU interface

figure 3tlc5618 and MCU three wire serial interface

tlc5618 and 8031 MCU interface see Figure 3

serial data is input to tlc5618 through p2.1 port, serial clock is input through p2.2, and p2.3 is connected to select terminal

4tlc5618d/a converted C51 high-level language programming

c language is a general computer programming language, which is very popular in the world. It can be used to write both computer system programs and general application programs. For SCM application system, although the object code generated by the program written in assembly language is the most efficient, its readability and portability are poor, and the programming cycle is long, and it is difficult to debug and troubleshoot. C language not only has the characteristics of general high-level language, but also can directly operate the hardware of the computer, and the program written in C language is relatively simple, which can be easily transplanted between different types of computers. Therefore, the development of SCM application system with C language has made great progress. The tlc5618 program written by C51, a high-level language tool based on 51 Series MCU, is as follows

#include

intvcon; Output voltage variable

sbitdin=0x91; Define p2.1 as serial data port

sbitclk=0x92; P2.2 refers to serial clock terminal

sbitcs=0x93; P2.3 is the chip selection end

voiddac5618 (intvcon) tlc5618dac subroutine, Three wire serial mode

{

chari;

intsvcon;

svcon=vcon|0x8000; the highest position of VCON is 1, select channel a of

tlc5618

cs=0; set cs=0 of 5618 to allow film selection

for and even the seats of many civil aircraft are made of flame retardant materials (i=0; i5 conclusion

due to its small size, low power consumption and simple control, tlc5618 can be easily used in battery powered test instruments, mobile, digital offset and incremental adjustment, machine and mechanical control and other fields

Copyright © 2011 JIN SHI