Interface Design between 80C32E MCU and TLV2548 Serial A/D

Publisher:精品古钱斋Latest update time:2010-11-19 Source: 国外电子元器件Keywords:80C32E Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

O Introduction

TLV2548 is a 12-bit, multi-channel, small size, low power consumption, high-speed serial A/D conversion chip produced by TI. It has a frame synchronization (FS) signal specifically connected to DSP, so it can be widely used in DSP high-speed data acquisition systems.

The MCS-51 series of microcontrollers have gone through many years of development, and their application technology has become very stable and reliable. TLV2548 is small in size and has a simple interface. Both chips have had experience in space flight, so they can be used in aerospace products with low cost, simple control, small data processing volume, and high reliability requirements.

Therefore, this paper will introduce the design method of the interface circuit and control program of 80C32E microcontroller and TLV2548.

1 Interface circuit design

The interface circuit between 80C32E and TLV2548 is shown in Figure 1.

The TLV2548 provides an SPI serial port. The 80C32E uses a general-purpose I/O port (P1) and generates SPI serial interface signals through software programming to control the TLV2548 and read and write data.

TLV2548 has 5 control pins , FS, SCLK, and . FS is a DSP-specific frame synchronization signal. When in microcontroller control mode, it can be connected to a high level; when it is low, the analog circuit and reference circuit in the chip enter a power-saving state. Since this article does not use the power-saving mode, it is connected to a high level. In addition, the pin is a signal for the end of conversion and requesting an interrupt to the processor . The falling edge of indicates that the converted data can be output. In this circuit, this signal is not connected because the conversion speed of TLV2548 is very fast (3.6μs), and the microcontroller interrupt and search method cannot improve the time efficiency. Therefore, software delay is used to wait for the conversion to end. This is relatively simple to program and can also save the hardware resources of 80C32E. The data lines SDI and SDO are the data transmission lines between 80C32E and TLV2548.
TLV2548 has four conversion modes: single (00), repeat (01), scan (10) and repeat scan (11). The usage of each mode is slightly different; there are two sampling modes: normal and extended. The advantage of the extended sampling method is that the sampling and conversion time of A/D is not limited by the clock signal SCLK, and its sampling and conversion are controlled by the level. The time is short and the speed is fast. This paper selects the 11-repeat scanning mode and the extended sampling method to convert the 6 channels (A0~A5) in TLV2548.

The MAX706 in Figure 1 is the watchdog reset circuit, and OSCIC is a 16 MHz crystal oscillator.



2 Control Program Design

The data and commands between 80C32E and TLV2548 are transmitted in 16-bit binary format. The command format is: high 4-bit command + low 12-bit configuration word. The configuration register (CFR) readout format is: high 4-bit ignore + low 12-bit register content. The A/D conversion value (FIFO) readout format is: high 12-bit conversion value + low 4-bit ignore.

The task of the 80C32E interface control program is to generate A/D sampling and conversion signals, as well as SPI serial port timing, and complete the conversion start of TLV2548, conversion mode setting and conversion result value reading. The program flow is shown in Figure 2.


The interface control program of TLV2548 is introduced below in conjunction with Figure 1 and Figure 2.

The first is initialization, that is, after power-on, 80C32E configures TLV2548. When configuring, first set SCLK (P1.3) to low level. Secondly, set low (P1.6) to make the signal produce a falling edge. At this time, since FS is high level. In this way, when the falling edge of comes, TLV2548 defaults to the microcontroller (μP) system, which will reset the internal counter and enable SDI and SD-O. Finally, 80C32E writes the command word A000H to TLV2548 (CFR), thereby completing the initialization of TLV2548. The program code is:

When configuring. You can choose the TLV2548 external reference voltage and internal oscillator, and select mode 11 repeated scan mode, the scan sequence is 0-1-2-3-4-5, and the scan sequence length is 3/4. The specific code is:



3 Experimental results
When 80C32 successfully performs initialization configuration, it can send 6 pulses to TLV2548 by clearing and setting to start A/D sampling and conversion. The falling edge of A/D output indicates that the conversion is completed and the result data can be output. The subsequent falling edge will make the signal high, select TLV2548 and make SDI and SDO valid. Finally, 80C32 sends out the serial clock signal SCLK (P1.3) and shifts out commands and reads in data through SDI and SDO. Figure 3 shows the TLV2548 control timing diagram after running the above program.



4 Conclusion

At present, the scheme has been applied to a certain space mission. Practice has proved that the system has good performance and has passed the electrical, identification, and sample acceptance. In view of the compatibility of the microcontroller, the interface circuit and program introduced in this article can also be applied to other models of MCS-51 series microcontrollers.

Keywords:80C32E Reference address:Interface Design between 80C32E MCU and TLV2548 Serial A/D

Previous article:Capture and storage of transient signals based on AT90S8515 single chip microcomputer
Next article:Detection and design of solar power generation based on single chip microcomputer

Recommended ReadingLatest update time:2024-11-16 16:46

Application of USART in PIC microcontroller
//★★★★★★★★★★Application of PIC microcontroller USART (serial communication)★★★★★★★★★★★\ //Single-signal machine model: PIC16F877A //Function description: Application of PIC microcontroller USART, the serial debugging assistant sends data to 877, and 877 forwards it back to the serial assistant after receiving it //Ass
[Microcontroller]
AVR MCU I2C bus program
#include "iom16v.h" /*I2C bus master mode error handling*/ void error(unsigned char type) {         switch (type & 0xF8) {                 case 0x20: /*Address write failed*/                         /*stop*/                         TWCR = (1 TWINT) | (1 TWEN) | (1 TWSTO);                         break;        
[Microcontroller]
A brief analysis of embedded MCU hardware design solutions
1 Introduction At present, the embedded technology of integrated circuits is developing faster and faster, and various embedded products are becoming more and more popular, especially large-screen multi-functional mobile phones and tablet computers, where the high-performance, low-power microcontroller (MCU) as the co
[Microcontroller]
A brief analysis of embedded MCU hardware design solutions
51 MCU drives dot matrix 16*16 left shift
This dot matrix shift left, once let me......Now under the guidance of my friend............The main part is in the red part, please understand it! It's nothing if you understand it! Hardware: 74HC154 + S8550 for rows and 74HC595 for columns! #include reg52.h #define uchar unsigned char #define uint unsigned in
[Microcontroller]
51 MCU drives dot matrix 16*16 left shift
MCU restart caused by ATMega328P's MOSI pin
During this period, a new problem occurred. The quadcopter would freeze and restart when it was unlocking and taking off, and even the burned code was lost. I changed the MPU and the field control unit, but nothing worked. Later, with the help of a friend, I found the problem. The reason is that the structure of the m
[Microcontroller]
MCU restart caused by ATMega328P's MOSI pin
Introduction to MCU EEPROM
In actual applications, the data stored in the MCU RAM is lost after power failure, and the data stored in the MCU FLASH cannot be changed at will, that is, it cannot be used to record the changed value. However, in some cases, we do need to record certain data, and they often need to be changed or updated, and the da
[Microcontroller]
A brief analysis of the difference between single-chip microcomputer and embedded system
I always remember that in the first class of single-chip microcomputer, when the teacher introduced the single-chip microcomputer, he said: "The single-chip microcomputer is named single." Why do we emphasize this point? For those who are easy to confuse, think about this sentence every time you want to ask this questi
[Microcontroller]
Design of paper jam detection system for folding machine based on single chip microcomputer
1. Introduction A folding machine is a post-press equipment that folds each large printed paper into a size suitable for daily binding and commonly seen by people. There are many types. It can fold the paper into four, eight, sixteen, and thirty-two folds. When a paper jam occurs during the folding process,
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号