1 Introduction
ISP (In-System Programming) is to program the device installed on the user's target board directly through the download cable, which has brought many revolutionary changes to the design and production of electronic products. At present, most of the more mature ISP downloaders are based on serial or parallel port communication, but there are also the following problems:
(1) The main frequency, hardware and operating system of the user's PC are different, which may cause control signal errors; www.51kaifa.com
(2) Different manufacturers provide different ISP downloaders, which are incompatible with each other, bringing inconvenience to embedded development;
(3) Limited to serial and parallel port communication protocols, the ISP data transmission rate is low, which affects the development of embedded products.
Based on the above reasons, this paper proposes a method of combining the microcontroller and the USB bus for ISP downloading. After practical application, good results have been achieved.
2 System Design
This system consists of two parts: hardware and software. The hardware platform is mainly composed of a USB interface and a single-chip microcomputer control module, which completes the communication with the PC and the ISP programming of the target chip. The software is designed for users. Users select the code file to be downloaded and compiled into the Hex file format, and then download the program code to the target chip. At the same time, it can detect the target chip model, erase the target chip, read the program code from the target chip, etc. The overall framework is shown in Figure 1. www.51kaifa.com
Figure 1 System framework diagram
2.1 Hardware System Design
Hardware is the foundation of the entire system and the physical platform for completing various functions. The hardware part mainly completes USB communication and ISP download. The USB interface chip is combined with a single-chip microcomputer. The USB interface chip has encapsulated the USB1.1 protocol. The single-chip microcomputer is used to control the ISP download operation of the target chip. The relationship between the hardware modules is shown in Figure 2.
Figure 2 Hardware module relationship diagram
This design communicates with the PC through the USB interface. After the microcontroller receives the data, it uses the ISP method to download it to the target chip. Therefore, in terms of hardware, ATMEL's 51 series microcontroller AT89S52 is used as the embedded microcontroller of this design, and PHILIP's PDIUSB12 is used as the USB device interface device.
2.1.1 P DIUSB12 Design
PDIUSBD12 PDIUSB12 is a USB interface chip produced by PHILIPS. It fully encapsulates the USB1.1 protocol and is a very cost-effective USB device. It is usually used as a high-speed universal parallel interface in a microcontroller system to communicate with the microcontroller and supports local DMA transmission. PDIUSBD12 fully complies with the USB1.1 specification. The low suspend power consumption of PDIUSBD12, together with the LazyClock output, can meet the requirements of using ACPI, OnNOW and USB power management. Its low operating power consumption can be applied to peripherals using bus power. The circuit design schematic is shown in Figure 3.
Figure 3 PDIUSB12 circuit
The circuit design analysis is as follows:
(1) The clock source frequency of PDIUSB12 is 6MHz;
(2) D0~D7 are connected to P0.0~P0.7 of MCU respectively;
(3) The A0 pin of D12 is connected to the ground through a 10K resistor;
(4) The ALE pin of D12 is connected to the ALE pin of the MCU;
(5) GL_N is connected in series to VCC through a resistor and a red LED; www.51kaifa.com
(6) DMACK_N and EOT_N are pulled up to VCC through resistors.
2.1.2 MCU Design
The MCU in this design uses the AT89S52 microcontroller from ATMEL, which is mainly used for USB communication and ISP download. Its hardware schematic diagram is shown in Figure 4.
Figure 4 MCU hardware schematic
In the figure above, the circuit configuration is described as follows:
(1) MCU uses 24MHz crystal oscillator;
(2) The data bus P0 port is connected to a pull-up resistor, and P0.0~P0.7 are connected to D0~D7 of the PDIUSB12 chip. MCU
The address latch pin ALE is connected to the ALE pin of PDIUSB12, and port P0 is used as address/data bus multiplexing;
(3) Function pins P3.6 and P3.7 are connected to WR_N and RD_N of PDIUSB12 to control the read
Write signal;
(4) The P2.1 pin, P2.2 pin and P2.3 pin of the MCU are respectively connected to the chip select pin CS_N, the suspend state pin SUSPEND and the reset pin RESET_N of the PDIUSB12 as corresponding function controls.
2.2 Software Design
The software of this design is mainly divided into two parts: the control system design on the MCU and the application design on the PC. The MCU control system is responsible for communicating with the PC and programming the target chip ISP. The application on the PC includes the USB driver and ISP download control software. www.
Previous article:Design of Economical High-precision Transmitter Based on 51 Single-chip Microcomputer
Next article:Design of a Single-Chip Microcomputer Multi-Machine Communication System
Recommended ReadingLatest update time:2024-11-16 22:22
- Popular Resources
- Popular amplifiers
- Virtualization Technology Practice Guide - High-efficiency and low-cost solutions for small and medium-sized enterprises (Wang Chunhai)
- usb_host_device_code
- Image acquisition and processing system for panoramic map applications
- Multi-port and shared memory architecture for high-performance ADAS SoCs
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- FAQ_How to determine the phase of the output PWM signal in BlueNRG-12
- Why is the ADS of some MCU's display-related pins analog and DIR input?
- Open source Tinygo releases version 0.70
- Find a high quality coulomb counter
- The wide temperature version of RK3399K core board is now online
- First look at TMS320C5410
- [Mill MYB-YT507 development board trial experience] + build QT development environment and test, the most detailed steps to solve all troubles
- [Repost] Advantages and process of dry etching
- Microphone noise problem
- How to ensure IoT security