1 Introduction
STC (Chengjing Technology) company launched STC 89C/S 51XX/52XX series of single-chip microcomputers, which have the advantages of low price, unresolvable, low power consumption, high speed, high reliability, strong anti-static, strong anti-interference, etc. Compatible with traditional 8051 microcontrollers, the on-chip resources are very rich, and both have built-in flash memory that can be repeatedly erased and written, and provide ISP (In-System Programming) programming mode. The STC89C52RC is a typical representative of the STC 89C/S51XX/52XX series of single-piece machines. It features 8K bytes of programmable flash memory, 1000 write/erase cycle life, 10 years of data retention time, and 3 levels of program memory lock. 512 Internal RAM, 32 Programmable I/O Lines, Two 16-Bit Timer/Counters, Five Interrupt Sources, Programmable Serial Channel, Low-Power Idle and Power-Down Mode, and On-Chip Oscillator and Clock Circuitry Wait. Therefore, this powerful and ultra-high cost performance single-chip microcomputer is widely used in China.
ISP online programming is a technology that completely overturns the traditional programming mode. It does not damage the pins of the chip, and the download speed is fast, which shortens the design time, reduces the development cost, accelerates the market launch, and greatly improves the product. Work efficiency. The general programmer adopts the main control chip such as PL2303, CP2102, FT232, etc., but the cost is high, and some chips have poor stability. Very few chip firmware versions have bugs. In view of this, this paper proposes the domestic CH340T chip as The design of the main ISP programmer is repeatedly tested by STC89C52RC and other functions, and the function is stable and the performance is excellent.
2 system hardware design
2.1 Overall structure of the system
The overall structure of the system is shown in Figure 1. The USB power supply and data transmission module is mainly responsible for powering the modules such as the MCU and the CH340T, and converting the USB serial data from the computer to the serial port data through the CH340T and communicating with the MCU, providing a data channel for the MCU programming.
2.2 Core Chip CH340T Introduction
CH340T is an interface conversion and single-chip peripheral chip designed and manufactured by Nanjing Yuheng Electronics Co., Ltd. It supports USB2.0. It can realize functions such as USB to serial port, extended computer asynchronous serial port and USB to IrDA infrared. This design is only used for USB to serial port. The converted serial port is full-duplex serial port, built-in receiving and sending buffer, supporting communication baud rate from 50bps to 2Mbps, sending allowable baud rate error "0.3%, receiving allowable baud The rate error is 2%. The method of use is relatively simple, and the peripheral components only need crystals, resistors and capacitors.
The CH340T has 20 standard pin interfaces. There are mainly 1, UD+ and UD- pins, which have built-in USB pull-up resistors that can be directly connected to the USB bus. 2. GND and VCC, ground and power pins, support 5V or 3.3V supply voltage. 3. Data transmission pins TXD and RXD are the serial data transmission and reception pins respectively. When the input is idle, the general RXD is high. However, if the R232 pin is high and the auxiliary RS232 function is enabled, an inverter is automatically inserted into the RXD pin, and the default is low. When the output is idle, Generally TXD is high. 4. Other pins. Includes MODEM contact signal pins and auxiliary pins.
2.3 System schematic
The schematic is shown in Figure 2.
In the figure, the USB interface P1 is used for power transmission. It is also regulated by the LM7805 to supply power to the CH340T chip and the microcontroller and other components. When using the 5V operating voltage, the VCC pin of the CH340 chip is input to the external 5V power supply, and the V3 is referenced. The pin should be connected to a power supply decoupling capacitor with a capacity of 4700pF or 0.01uF. The CH340T adapter chip converts UD1+ and UD1- into serial port signal serial data and microcontroller serial port for communication. It should be noted that the serial receiving port CRXD of the CH340T chip needs to be connected to the P3.1 transistor Q1 of the MCU through the PNP transistor Q1 to form the emitter generator to achieve the buffering and isolation of the data.
The MCU subsystem uses a 40-pin test socket. For normal programming, the external MCU reset circuit and crystal oscillator circuit are externally connected. In particular, in order to improve the applicability of the programmer, the crystal oscillator circuit uses the jumper switch J1 to provide two operating frequencies of 12MHz and 11.0592M for the microcontroller.
3 system test
The software involved in ISP programming mainly consists of three parts: USB driver, microcontroller firmware program and computer application. The MCU firmware program is used to implement the computer to read and program the E2PROM (data flash) inside the STC MCU, which has been solidified in the MCU.
Before testing, you must first install the USB driver software USB DriverInstaller.exe, which can map the programming of the USB interface of the access computer to a virtual serial port, usually COM3 or COM4. Then install the STC MCU online programming software STC-ISP.STC -ISP is software designed for STC series microcontrollers. It can download STC microcontrollers such as STC89 series, 12C2052 series and 12C5410 series. It is powerful and easy to use. This programmer requires a version above V3.0.
The test procedure is to insert the microcontroller STC89C52RC into the programmer socket and insert it into the computer USB interface (or connect the programmer to the computer with a USB cable). Then open the STC-ISP software, select the MCU MCU model (MCUTYPE) in the main interface, import the Hex file (Open File), and select the serial port (COM:
COM3 or COM4, ​​etc.) and baud rate, and finally click the download button. The main interface of the successful download is shown in Figure 3.
After repeated tests on the programmer designed by this scheme, the function is normal and the performance is reliable.
4 Conclusion
This article describes a simple, practical, and inexpensive ISP programmer design. After repeated testing, the programmer designed by this scheme has the advantages of stable function, fast speed, low price and easy to use, and is suitable for program burning of STC 89C/S51XX/52XX series single-chip microcomputers. In addition, the system has better scalability, and the schematic diagram is slightly modified. By means of the SPI interface, the ISP programming download of more single-chip microcomputers such as Atmega8515/Atmega162 (AVR chip) is realized.
The main function of the MPPT Solar Controller is to realize maximum power point tracking (MPPT) in the solar power generation system to improve the energy utilization efficiency of solar panels. It is an advanced charge controller that can adjust the output voltage and current of the Solar Panel in real-time to keep the solar panel operating at the maximum power output point.
Main effect:
Maximum power point tracking: MPPT Solar Controller can accurately calculate the maximum power output point of the solar panel by monitoring the voltage and current of the solar panel in real-time and according to the characteristics of the solar panel. It then adjusts the panel's output voltage and current to keep it operating at its maximum power output point, maximizing the solar panel's energy conversion efficiency.
High energy utilization rate: MPPT Solar Controller's maximum power point tracking function can ensure that the solar panel is always operating in the best working condition, making full use of solar energy, thereby improving the energy utilization rate of the photovoltaic power generation system.
Charge control: In addition to achieving maximum power point tracking, MPPT Solar Controller also has a charge control function to protect the battery from overcharge and over-discharge damage.
Differences from other charge controllers:
Maximum power point tracking function: MPPT Solar Controller is a charge controller specially used in solar power generation systems. The biggest difference is that it has a maximum power point tracking function, which is used to improve the energy conversion efficiency of solar panels. Other charge controllers may not have this unique feature.
Energy efficiency: MPPT Solar Controller can improve the energy efficiency of solar panels through maximum power point tracking technology. Other charge controllers may only be able to charge in a fixed manner and cannot achieve maximum power point tracking.
Application scenarios: MPPT Solar Controller is mainly used in solar power generation systems, while other charge controllers may be suitable for different types of energy generation systems, such as wind power, hydropower, etc.
Overall, the main role of the MPPT Solar Controller is to achieve maximum power point tracking, improve the energy conversion efficiency of the solar panel, and protect the battery from overcharge and over-discharge damage. Compared with other charge controllers, it has unique advantages in energy utilization efficiency and maximum power point tracking and is suitable for applications in solar power generation systems.
10 amp mppt solar charge controller, solar charge controller 10 amp, 36v mppt solar charge controller, dc dc mppt charger, lithium ion solar charge controller
Ningbo Autrends International Trade Co., Ltd. , https://www.china-energystorage.com