“This article mainly introduces the structure design of the space orientation tester based on MSP430 single-chip microcomputer, and carries out detailed analysis and research on its hardware structure design and software structure design, so as to meet the practical application of the performance and reliability of the space orientation tester based on MSP430 single-chip microcomputer. The demand for sex provides a broader space for the future development of the space-oriented tester based on the MSP430 single-chip microcomputer.
Introduction: This article mainly introduces the structure design of the space orientation tester based on MSP430 single-chip microcomputer, and conducts detailed analysis and research on its hardware structure design and software structure design, so as to meet the practical application of the space orientation tester based on MSP430 single-chip microcomputer. As well as the reliability requirements, it provides a broader space for the future development of the space-oriented tester based on the MSP430 single-chip microcomputer.
The space orientation tester is an Electronic measurement instrument with a very wide range of applications. Especially with the development of microelectronics technology, the space orientation tester is becoming more and more mature in the navigation fields of vehicles, ships, and aircrafts. The space-oriented test technology studied in this article is mainly based on the MSP430 microcontroller. Because the MSP430 series single-chip microcomputer is a 16-bit ultra-low power consumption and reduced instruction set (RISC) mixed signal processor, it can integrate multiple analog circuits, digital circuit modules and microprocessors with different functions in response to actual application requirements. Integrated on a chip. Therefore, the author studied how to use MSP430 single chip microcomputer to control the interface circuit of each module, and it can be well used in actual measurement.
1 The design of each hardware interface of the space-oriented test
This article mainly studies the spatial orientation tester based on the MSP430 single-chip microcomputer. The working principle of this instrument is to transmit the data received by the position information receiver to the readable memory of the MSP430 single-chip microcomputer, and then Display it on the LCD screen through the output terminal. In this process, we need to design a hardware interface circuit to connect the information receiver and the liquid crystal display, and the read-write control of the MSP430 single-chip microcomputer needs to be completed through language programming.
The basic idea of the design of the space orientation tester based on the MSP430 single-chip microcomputer is to use the advantages of the MSP430 single-chip microcomputer, such as convenient operation, simple interface, small size, low energy consumption and low cost, as an embedded system to expand the function of the space orientation tester. Since the information receiving module interface circuit of the spatial orientation tester is less, but the application range is very wide, it is necessary to design a multi-interface circuit to connect the display, the single-chip computer, etc. In addition, in order to improve the data processing and application capabilities of the space orientation tester, it is necessary to realize the serial communication between the PC and the space orientation tester. Realize good man-machine dialogue, simple operation and friendly interface, humanized input ability and display ability. Therefore, the hardware interface module design is shown in Figure 1.
Figure 1 Hardware interface module
The MSP430 single-chip microcomputer is the core part of the space orientation tester. It can not only coordinate the internal software modules of the entire instrument, but also sort and sort the collected data and calculate the corresponding values. The acceleration sensor mainly uses ADXL203. ADXL203 is a complete high-precision, low-power, single-axis / dual-axis accelerometer, which provides a signal-conditioned voltage output. All functions are integrated in a single-chip IC. The full-scale acceleration measurement range of these devices is ±1.7 g, which can measure both dynamic acceleration and static acceleration. The entire signal circuit of the spatial orientation tester based on the MSP430 single-chip microcomputer is to amplify and filter the output signal of the sensor. The crystal frequency of the circuit is 411.0592MHz and the baud rate is 4800. At this time, set the initial value of the baud rate to FFFAH. The database is mainly composed of AT24C16 memory, its low voltage and standard voltage is Vcc=1.8V-5.5V, with 2048×8 (4k) storage space, 2-wire serial bus, Schmitt trigger, and noise suppression filter input. Bi direction transmission protocol, 100kHz (1.8V, 2.5V, 2.7V) and 400kHz (5V) compatible transmission rate. Hardware data write protection pin, 8-bit page write mode, partial page write operation is allowed, the maximum internal write cycle of the device is 10ms, high reliability, 10,000 write cycles, and 100-year storage time. The LCD screen is mainly based on the serial/parallel data receiving mode of the LCD. If it is low level, the serial mode is adopted, and if it is high level, the parallel mode is adopted. In addition, the LCD screen is designed to be centered symmetrical and can be positive and negative. Display, easy to read the value. The keyboard part uses 16 keyboards, 4×4 array, the column lines are drawn from the lower 4 bits of the PB port, and the row lines are drawn from the lower 4 bits of the PC, and then the +5V voltage is connected through a resistor. The power key of the keyboard is responsible for the control of the switch, the display mode selection key is to control the spatial orientation information of the tester, and the measurement mode selection key is used to switch between the lower position measurements in different situations. The hold button is to keep the measurement results on the display for reading. In order to reduce the power consumption of the spatial orientation tester, the MSP430 single-chip microcomputer can increase the high level according to the actual situation and send out the keyboard scan signal. In other cases, the low level with lower energy consumption can be adopted.
The serial input port and serial output port of the space orientation tester based on MSP430 single-chip microcomputer are respectively connected with MSP430 single-chip microcomputer, and are mainly responsible for receiving various information transmitted by the position information receiver. The power supply voltage range of the space orientation tester based on the MSP430 single-chip microcomputer is 1.8 ~ 3.0V. The hardware platform of the tester needs to use three voltages. The operating voltage of the core is 1.8V, and the operating voltage of the memory and external I/O devices is 3.3V. , The operating voltage of the system platform is 4.2V. The instrument uses a wide-level output, multi-level output through the converter, and a stable voltage can be obtained through the LM317 regulator. In addition, the design of the reset circuit is also a very important link. The reset circuit mainly completes the power-on reset of the tester and the user’s key reset function during the running of the tester. The reset circuit is mainly composed of a simple RC reset circuit, which has a reliable logic reset function. In order to ensure that the tester can be reset effectively, it is necessary to select appropriate parameters and adjust the time of the reset state. For S3C2410X, the nRESET terminal must remain low for at least 4 MCLK cycles after the tester is powered on. The two-stage NOT circuit is used for button debounce and waveform shaping; the output state of the nRESET terminal is opposite to the Reset terminal, which is used for high voltage Ping reset.
2 Software design of each interface of space directional test
The software working platform of the space-oriented tester based on MSP430 single-chip microcomputer mainly includes embedded editor, compiler, assembler, linker, debugger and function library manager. The programming of the space orientation tester based on MSP430 single-chip microcomputer can be divided into three parts: the traditional communication program design of the data input of the position information receiver, the program design of the LCD data display output, and the serial communication module program of the lower computer.
2.1 Process design of receiving location information
The process of receiving location information is shown in Figure 2 below. First, you need to set a serial port interrupt. The serial control register RI represents the flag bit of the receive interrupt. When RI=1, it means that the space orientation tester has received data. Then set RI to zero to judge the information status of the next set of data. Enter the path letter into the buffer, and judge whether the sentence is A (current data), if it is judged as A, output the required sentence on the LCD display, if it is V (voltage data), it will not be displayed.
2.2 Liquid crystal display process design
The MSP430 MCU receives the data from the main communication controller through interruption, and sends the received data to the LCD for display. The communication parameters are set to the baud rate of 1200bps, 8 data bits, and CRC check. Use 16*16 dot matrix for the received data Chinese characters, and 8*16 dot matrix display for letters and numbers. Since the Chinese characters, letters and numbers that need to be displayed are fixed, the method of directly solidifying the display fonts into FLASH is adopted. This method occupies less space, the program is simple to implement, and the display speed is fast. It is suitable for situations where the font database is not large. The liquid crystal display program flow is shown in Figure 4.
2.3 Design of serial communication process of lower computer
First call the initialization function to initialize the system, the serial communication structure diagram is shown in Figure 5. After initialization, the program enters the main loop. In each cycle, the program first calls DoUart to process the data in the serial communication receiving buffer. After processing, if there is data that needs to be sent to the PC, the SendUart function is called to send the data. If the serial communication module receives data, the CPU exits the low power consumption mode and enters the serial receiving interrupt program. After exiting the interrupt program, the CPU no longer enters the low-power mode, and executes the jump statement, proceeds to the next cycle, and calls the DoUart and SendUart functions again. If no data is received, the CPU will always be in low power consumption mode.
The IAR C-SPY advanced debugger and IAR Embedded Workbench can match the working links very well, and can form a high-level language interactive debugger with strong functions, and can learn and debug assembly language or C language. It can set breakpoints, learn single-step operation, and support multiple single-step operation methods such as Stepin, Step over, etc. You can observe the values of registers and memory, and view variables.
Here, I use hardware emulation to debug Flash EmulationTool mode. Mainly connect with the hardware system of the MSP430 microcontroller through the JTAG interface, and then download the program. The MSP430 single-chip microcomputer connects the peripheral circuit and simulates the real environment of the hardware system for debugging, verifies whether there are errors in the application program, and at the same time verifies whether the hardware design of the target system is sufficiently complete.
In summary, the single-chip microcomputer is a high-tech that integrates computers, microelectronics and modern communications, and is widely used in industrial control and measurement fields. The main characteristics of the MSP430 MCU studied in this paper are high reliability, simple operation and convenient maintenance. The space orientation tester based on MSP430 single-chip microcomputer has ultra-low power consumption, and has its own uniqueness in reducing the power supply voltage of the chip and flexible and controllable operating clock. Therefore, it has a very wide range of development and application prospects in navigation fields such as vehicles, ships, and aircrafts. This article mainly introduces the structure design of the space orientation tester based on MSP430 single-chip microcomputer, and carries out detailed analysis and research on its hardware structure design and software structure design, so as to meet the practical application of the performance and reliability of the space orientation tester based on MSP430 single-chip microcomputer. The demand for sex provides a broader space for the future development of the space-oriented tester based on the MSP430 single-chip microcomputer.
The Links: 6MBI30L-060 LQ10D36C IGBT-MODULE