Application of the hottest MSP430 single chip micr

2022-10-23
  • Detail

The application of MSP430 single chip microcomputer in testing system

1 introduction

single chip microcomputer (or microcontroller) technology has penetrated into all aspects of life and is widely used in household appliances, communications, testing and other fields. Therefore, this technology is positively affecting people's lives. This paper presents a test system design based on MSP430 single chip microcomputer. MSP430 series single chip microcomputer is an ultra-low power mixed signal controller produced by TI company. Its flexible clock source selection can maximize the battery life, and there are rich peripheral modules integrated inside. Different models of this series of single chip microcomputer are aimed at different application fields

2 system scheme design

2.1 introduction to storage test principle

storage test technology is a new test method since the 1970s. Storage test is a dynamic test technology that places a micro data acquisition and storage tester in the tested body without affecting the tested object or within the allowable range, completes the rapid collection and memory of information on site in real time, recovers the recorder afterwards, and processes and reproduces the test information by computer

2.2 system working principle

Figure 1 is the principle block diagram of the test system based on MSP430 Series MCU. The test system has programmable technical parameters of vertical sling tension testing machine (sling tension testing machine): Yes, the trigger signal starts the MCU to enter the sampling state, samples the A/D converter data at a certain sampling frequency, the sampling frequency is determined by the timer inside the MCU, and the sampling data completes the analog-to-digital conversion through the 12 bit a/D converter inside the MCU, and then stores it in the memory. When the test system is recycled, it can directly communicate with the computer through RS232 serial port, and store the data in the computer for subsequent processing. The design requirements, performance of devices used, electromagnetic compatibility, system stability, operability, working reliability and other factors shall be fully considered in the system design

3 system hardware design

the system hardware design mainly includes sensors, analog adaptation circuits, MSP430 MCU acquisition and storage units, as well as interface units. The signal from the sensor enters the A/D converter inside the single chip microcomputer for conversion after the analog adaptation circuit, and then the conversion result is stored in the memory by the I/O port of the single chip microcomputer. Serial asynchronous RS232 communication interface is used to read data. After the test, generally replace the transformer or rewind the transformer; If the voltage stabilizing circuit is abnormal, the computer can complete the functions of data communication, display, processing, etc. The power management part is controlled by single chip microcomputer to supply power to memory and analog circuit, which can prolong the service life of battery. The use of a/D converter in single chip microcomputer not only reduces the complexity of system design, but also improves the reliability of the system, so as to avoid the complexity of interface design and reduce the area of PCB

the system adopts RS232 serial port asynchronous communication with ventilation facilities and fire-fighting equipment in the computer room. The system adopts MAX232 device to realize the conversion between MCU and computer interface, in which a 0.1 f capacitor is connected at its pins c1+, c1-, c2+, c2-, v+ and v- respectively to realize charging, so as to meet the requirements of the corresponding charging pump. Pins t1out, t1in, r1out and r1in are the output and input pins of RS232 conversion transmission and reception respectively, which can realize the TTL level conversion of single chip microcomputer and the interface level conversion of upper computer. In order to reduce the input interference, a 0.1 f capacitor needs to be connected at the power input pin of the device to realize filtering. MAX232 adopts a power supply voltage of 0.3 ~ 6 V; The levels on pins r1in and t1out of the interface with the computer are 30 V and 15 V respectively, and the levels on pins t1in and r1out of the interface with the MCU are -0.3 V ~ (-0.3 V for VCC) and 0.3 V ~ (+0.3 V for VCC) respectively. The single chip microcomputer adopts 3.3 V power supply, so the power supply voltage Vcc of MAX232 adopts 3.3 building: plastic building materials, non-toxic and recyclable v. as shown in Figure 2

4 system software design

software design is also an important part of test system design. The general process of software design is: clarify the software design task; Divide the program modules according to functions and draw the flow chart; Select programming language and program; Commissioning procedures

state design is the process of determining the state organization structure of the storage test system according to the motion law of the tested object. It is the key to realize function design, the basis of hardware design, and also an effective means to establish a basic storage test system. State design can make the design idea clear throughout the design and debugging, and can simplify the original complex design process to varying degrees

state transition of the system: after the system is powered on, the single chip microcomputer is in the alarm state, waiting for the sampling start signal. At this time, the system is in the ultra-low power consumption state, and the consumed current is only about 1 A. After the trigger signal arrives, the system starts to cycle sampling. After the sampling is completed and the memory is full of data, it stops sampling and enters the low-power state of waiting for reading. When waiting for the reading state, connect the reading port. When the i/o port of the single chip microcomputer receives the rising edge sent by the computer, it starts to send data to the computer, that is, first read the data from the memory to the single chip microcomputer, and then send it to the computer through the serial port of the single chip microcomputer. After sending, it enters the low-power state again. Figure 3 is the system state diagram

5 test results

the sine wave with frequency of 1 Hz is given by the signal generator in the system test experiment. The reading condition after data collection is shown in Figure 4. The system fully realizes the triggering and sampling process. Figure 4 is the single channel test waveform obtained through the experiment. The output obtained is completely consistent with the input signal, which fully shows that this scheme is feasible

6 conclusion

the MSP430 series single chip microcomputer is used to design the test system, and the 12 bit a/D converter provided by the MSP430 series single chip microcomputer is used to collect data. This method greatly simplifies the circuit design and enables the measurement results to achieve high accuracy; Moreover, due to the ultra-low power consumption design of MSP430 series single chip microcomputer, the test system has the characteristics of small size, low power consumption, strong anti-interference ability, no lead and so on

Copyright © 2011 JIN SHI