Design of Serial Server Based on MSP430F149

Abstract: MSP430 microprocessor has the characteristics of low power consumption and rich functional modules. The MSP430F149 is used as the main controller and the Ethernet control chip CS8900A to design a serial server , and the simplified TCP / IP protocol is embedded. The process control equipment is used as the target for debugging, and the conversion between the RS-232 serial port and the network interface RJ45 is realized. Connect serial devices to Ethernet to realize remote network control.

This article uses the 16-bit ultra-low power mixed signal processor produced by TI and the highly integrated Ethernet controller CS8900A produced by Cirrus to fully support the IEEE802.3 standard to design an embedded serial server The terminal provides software design with a modular design idea. In view of the limited memory of the embedded system, TCP / IP has been streamlined and debugged.

1 Hardware circuit design

The main controller MSP430 [1] is an ultra-low power microprocessor that the American Texas Instruments (TI) company began to market in 1996. It has five low power modes to meet different needs. The CPU is woken up from the low-power mode, this process only takes up to 6 μs. Flexible clock usage is also a major feature of MSP430. In addition to an on-chip crystal oscillator, it can also be connected to 1 to 2 crystal oscillators. Different internal function modules can use different crystal oscillators as needed, and can be turned off by setting registers when not needed to reduce power consumption. MSP430 uses a 16-bit RISC architecture, has a 125 ns instruction cycle, and has a wealth of functional modules inside, integrated multi-channel 10--14 bit A / D converter, dual 12-bit D / A converter, comparison Function module, such as device, power supply voltage detection, serial port USART (UART / SPI), hardware multiplier, flash memory, watchdog timer and multiple 16-bit and 8-bit timers. These structures make the MSP430 microprocessor applicable to more occasions and have a wider range of applications, and also make the design of serial server more simple.

The Ethernet control chip CS8900A [2] is a low-power, high-performance 16-bit Ethernet controller produced by Cirrus Logic. Its outstanding feature is the flexibility of use, the physical layer interface, data transmission mode and working mode can be dynamically adjusted according to the needs, through the internal register settings to adapt to different application environments.

The hardware block diagram of the system is shown in Figure 1.

Figure 1 hardware block diagram of the system

Figure 1 hardware block diagram of the system

The power supply is converted into a 3.3 V regulated power supply by the LD1117 chip through a 5 V power adapter to supply power to the main controller MSP430, Ethernet chip CS8900A and SP3223. MSP430 connects to 8 MHz crystal oscillator, and connects a JTAG port at the same time, connects MSP430 emulator through JTAG port for program debugging between the system and MSP430 development software IAR.

The main controller is responsible for controlling the Ethernet interface to complete the sending and receiving of network data packets, as well as the corresponding packaging and unpacking work, complete the corresponding data collection and processing according to the instructions of the host computer, and detect whether there is an event in the serial communication module and then make Corresponding response; responsible for completing functions such as system power-on reset, initialization and low voltage detection. The 802.3 media access control [4] inside the CS8900A is responsible for handling the transmission and reception of Ethernet data frames, including: data detection, frame header generation and detection, and CRC check code generation and verification. The Ethernet module is used to complete the link layer function in the TCP / IP protocol stack. When sending, the network layer data packet is converted into an Ethernet physical frame format for transmission on the physical channel; when receiving, the physical channel is received The signal is converted into a network layer packet.

2 Software programming

The software part adopts the modular design idea to simplify the program, which is convenient for the design, debugging and maintenance of the program. The whole part includes the initialization module, serial data collection and processing module, network data collection and processing module and TCP / IP module, in addition to timer interrupt for TCP retransmission mechanism timing and data collection timing, serial port interrupt for forwarding serial port data.

The program workflow is shown in Figure 2.

Figure 2 program workflow

Figure 2 program workflow

1.High model conversion efficiency,more than 19%,reducing installation costs and maximizing the kwh output per unit area.                                         2.power tolerance of -3% to +3%minimizes PV systems mismatch losses.                                   

3.Excellent performance under low light environments.                    

4.High transparent,low-iron,tempered glass,and antireflective coating.  

5.Five years warranty,25 year using life,good quality.

Mono Panel

Mono Panel,Mono Solar Panels,Monocrystalline Solar Panels

Yangzhou Beyond Solar Energy Co.,Ltd. , https://www.ckbsolar.com