“MSP430 is a 16-bit series of single-chip microcomputers introduced by TI in recent years. It was originally designed for driving LED Display applications. Due to its excellent application effect and great market potential, TI quickly developed it into a general-purpose single-chip microcomputer. Now there are several series of X1XX, X3XX, X4XX, and are still developing. MSP430, as a new type of single-chip microcomputer, adopts the latest low-power consumption technology of TI Company, which makes it unique among many single-chip microcomputers.
1. Introduction to MSP430 microcontroller
MSP430 is a 16-bit series of single-chip microcomputers introduced by TI in recent years. It was originally designed for driving LED display applications. Due to its excellent application effect and great market potential, TI quickly developed it into a general-purpose single-chip microcomputer. Now there are several series of X1XX, X3XX, X4XX, and are still developing. MSP430, as a new type of single-chip microcomputer, adopts the latest low-power consumption technology of TI Company, which makes it unique among many single-chip microcomputers. MSP430 works under the voltage of 1.8~3.6V, and has normal working mode (AM) and 4 low-power working modes (LPM1, LPM2, LPM3, LPM4). When the power supply voltage is 3V, the working current of each mode is AM: 340uA, LPM1: 70uA, LPM2: 17uA, LPM3: 2uA, LPM4: 0.1uA. The microcontroller can easily switch between various operating modes. The ultra-low power consumption of the MSP430 makes it ideal for battery-powered, portable device applications. MSP430 also has a very high level of integration, a single chip integrates multi-channel 12bit A/D conversion, on-chip precision comparators, multiple timers with PWM function, sloped-edge A/D conversion, on-chip USART, gatekeeper Dog timer, on-chip numerically controlled oscillator (DCO), a large number of I/O ports and large-capacity on-chip memory, a single chip can meet the needs of most applications. This high level of integration of MSP430 makes it unnecessary for the application personnel to spend too much energy on the interface, external I/O and memory, and can easily design a real single-chip system. The on-chip memory of MSP430 has 4 types: ROM (C type), OTP (P type), EPROM (E type), Flash Memory (F type), and adopts von Neumann structure. Therefore, RAM, ROM and all Peripheral modules are all located in the same address space.
2 Hardware design of data acquisition system
The data acquisition system required in this design is the downhole part of the oil well measurement equipment, which is installed at the bottom of the oil pipe several kilometers deep. Launched to the ground to complete the monitoring of oil wells. The data acquisition part is powered by battery, and requires working in the well for half a year to a year. Therefore, low power consumption is the primary working condition of the whole system. In addition, due to the limitation of the available space of the oil pipe, the entire circuit area is also required to be as small as possible. Based on the above two points, it is a good choice to use MSP430 microcontroller to design the data acquisition part. MSP430F149 is the product with the highest hardware integration in the x1xx series. Compared with other products, it has a hardware multiplier, 48 I/O ports, more timers (10), and more USART ports (2 ) and up to 60KB of Flash, 2KB of RAM, the first choice in the MSP430 series. MSP430 provides a variety of crystal oscillator solutions. The design uses two clock inputs. The 4MHz high-frequency crystal oscillator is configured as the CPU main system operating clock, and the 32.768KHz watchdog is the peripheral system operating clock. The input channels are two-way instrumentation amplifier channels, and the output channels are two-way SPI driven A/D conversion chips. At the same time, the I/O ports provide level control. The area of the double-sided PCB board is 6.5cm×4.5cm. The following is the schematic diagram:
Figure 1 Circuit Schematic
3 Software Design
The core CPU structure of MSP430 is designed according to the tenet of reduced instruction set and highly transparent instruction. MSP430F149 has only 27 kernel instructions, which is very convenient to use. The following is an example of the program to initialize and trigger the I/O port level:
The software completes the functions of data sampling and encoding transmission. Because of the complexity of the tubing sound channel, the data is kept at a low transmission rate. The program flow is as follows:
Figure 2 Software flow chart