Atmel and STC 51 MCU Universal ISP Download Cable Production

Publisher:数据迷航者Latest update time:2015-07-15 Source: 51heiKeywords:Atmel Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
       When I was preparing for a competition at school during the summer vacation, I couldn't download the program to the AT microcontroller because I didn't have an ISP download cable. STC is more convenient. You can download the program via the serial port by connecting a level conversion chip MAX232. I won't go into details about the working principle here. The following mainly talks about the production of the serial port ISP download cable for the AT microcontroller.

Let's first talk about the pins used for downloading programs to two types of microcontrollers:

The download pins of STC are P3.0 and P3.1, which are RXD and TXD;

Atmel's download pins are P1.5, P1.6 and P1.7. Secondly, after power-on, the level of the RST pin must be pulled high before downloading can be performed.

        In order to be compatible with the download of two brands of microcontrollers on one board, the consequences of pin multiplexing must be considered during the design. I originally wanted to use the CD40xx series analog switch to automatically switch the download line, but the laboratory only had 4051, which is an eight-choose-one analog switch. I don’t need eight channels, but a two-channel, three-way parallel 4053. In the end, I had to use the most primitive dip switch to manually switch the download.

Here is the schematic diagram of the download board (partial):

 

  As can be seen from the schematic diagram above, two five-position dip switches are used, one to control the communication connection between the RS232 serial port and the MAX232 chip, and the other to control the connection between the MAX232 and the microcontroller. In addition, a self-locking switch is connected in parallel to the reset switch, so that the RST pin can be locked to a level state when downloading the AT microcontroller to ensure normal downloading of the program.

      When using, if you are downloading STC series microcontrollers, just turn the first and second channels of the two dials to on, and the third, fourth, and fifth channels to off. If it is an AT series microcontroller, just turn it the other way around. The download tool for STC is STC-ISP, and the download tool for AT is Atmel ISP2. Both download tools are the most commonly used and can be easily downloaded online.

  One more thing to point out here is that this circuit is based on the RS232 serial port directly connected to the level conversion chip for downloading. If you use those cheap USB to serial port cables on the market to connect to this circuit, the speed of downloading Atmel's microcontroller will be very slow, or even unable to download (STC's microcontroller does not have this problem). This is determined by the conversion chip inside the USB to serial port cable. If the conversion cable is of good quality, the above problem will not occur. Students whose computers do not have serial ports need to pay attention when making this download cable.

PCB diagram:


 

The serial port socket in this PCB diagram is a male port, and the line sequence is relatively special; while the serial port in the schematic diagram above is a universal female port, and common cables can be used directly. Please pay attention to the difference.

An eight-position dip switch is also added to the resistor array position because I sometimes need to use the high-impedance state of the P0 pin.

Here is the finished board:       This board was designed more than two months ago. At that time, I was learning Altium Designer, 51 MCU, analog electronics, etc. I had just started learning everything, so there were many deficiencies in the design. I posted it here mainly to explain that AT MCU also downloads programs directly through the serial port. Many people on the Internet say that programs can only be downloaded through a special download cable. I am refuting the rumor now~·Hehe. I believe that students with a certain foundation should be able to see that the circuit of the two dip switches above can be simplified. Hehe~~ I have been seen through~~~


  That's all about the production of this download line. I will post my provincial competition works and recent new works when I have time. For another download line, please refer to: http://www.51hei.com/mcu/585.html  . I no longer use 51 microcontrollers, but STM32 based on ARM Cortex-M3 core. I will not spend time to optimize the above circuit. If you are interested in this download line, please discuss with me. If you have any better ideas, please remember to share them with me.

Keywords:Atmel Reference address:Atmel and STC 51 MCU Universal ISP Download Cable Production

Previous article:PWM Speed ​​Control of High-Power Brushless DC Motor Based on 51 Single-Chip Microcomputer
Next article:An infrared transmitter + decoding program + simulation file

Recommended ReadingLatest update time:2024-11-16 13:27

Diode (STC89C52): Write a program to implement a traffic light
1. Hardware Design   2. Software Design 1. Program Features Write a program to implement a traffic light:  the east-west green light is on for a few seconds, the yellow light flashes 5 times and then the red light is on. After the red light is on, the north-south light changes from red to green. After a few
[Microcontroller]
Diode (STC89C52): Write a program to implement a traffic light
51 single chip photoelectric control computer communication system
Recently, a photoelectric control computer communication system based on STC89C52RC single-chip microcomputer was made for the project. Its basic appearance is shown in Figure 1.         Although the photo shows that my stuff is relatively rough, it can basically be used. Maybe if the boss (teacher) provides some
[Microcontroller]
51 MCU 315M transmitter sending assembly program
;Anti-theft device host program           FSDD EQU P1.7       ; Transmitter control D terminal, high level control is effective           FSCC EQU P1.6       ; Transmitter control C terminal, high level control is effective           FSBB EQU P1.5       ; Transmitter control B terminal, high level control is ef
[Microcontroller]
Application of EEPROM inside STC microcontroller
   The data of the microcontroller when it is running is stored in RAM (Random Access Memory). The data in RAM cannot be retained after power failure. So how to prevent the data from being lost after power failure? This requires the use of memory such as EEPROM or FLASHROM. In traditional microcontroller systems, the m
[Microcontroller]
30-Taxi meter based on 51 single chip microcomputer (Hall speed measurement)
Specific implementation functions The system consists of AT89C52 single chip microcomputer + Hall sensor module + LCD1602 liquid crystal screen + DS1302 clock module + AT24C02 power-off storage module + DC motor + button module + power supply. Specific functions: 1. No passenger mode: display the current time; 2
[Microcontroller]
30-Taxi meter based on 51 single chip microcomputer (Hall speed measurement)
51 MCU timer 0 interrupt to achieve 1 second LED running light
Use timer 0 interrupt to realize LED 1 second running light #include reg52.h typedef unsigned int u16; typedef unsigned char u8; u8 code LED ={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f}; u16 time,i;   void timer0init() { TMOD=0x01; ET0=1; EA=1; TR0=1; TH0=(65536-50000)/256; TL0=(65536-50000)%256; }   void
[Microcontroller]
51 single chip microcomputer to realize the water lamp
  Before implementing the running light, we need to mention that before writing the C51 code, you need to refer to the circuit diagram. Take the running light as an example. Let's look at Figure 2. The positive poles of the eight LEDs are connected to the +5V voltage through a bus. Looking at Figure 1 again, we can
[Microcontroller]
51 single chip microcomputer to realize the water lamp
The extended design of DPTR in 8051 single chip microcomputer
Abstract Firstly, the difference in data transfer execution efficiency between the traditional 8051 microcontroller and the 8051 microcontroller after DPTR extension is compared and analyzed when performing large-scale data transfer. By analyzing the factors involved in DPTR operation in detail, the expansion
[Industrial Control]
The extended design of DPTR in 8051 single chip microcomputer
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号