Simple and Convenient home-made several avr/51 ISP programmers (download line)

Source: Internet
Author: User
Simple and Convenient!

The AVR Microcontroller has many advantages. I am also a loyal supporter, from 51 to AVR. I also learned PIC in the middle. I bought a learning board, LCD screen, and many other things when I was a beginner at 51. After my experience, when learning AVR, I started from the self-made download line. Note that this is just the beginning. Simple things have some limitations, but it is very useful for beginners, with it, you can start to learn the AVR single-chip microcomputer, or even some development. These programmers are spread from the Internet. Although I am not very clear about the programmer, I would like to thank the original author. here is my self-made experience.

1. due to the parallel high-voltage and serial ISP (in system program in System Programming) methods, high-voltage parallel programming can fix some wrong configuration bits, but this is not commonly used, because parallel communication requires a lot of wiring, it is difficult to reserve programming interfaces in the finished product, and it is not self-made. The serial ISP is based on the SPI (serial peripheral interface) communication method, only three data lines are required for SPI communication: sck, Miso, Mosi, and VCC, Gnd, and reset. VCC is optional and is used to power the target chip, or back-powered by the target board to the programmer.

 

When designing the target board, you only need to keep at least six lines, and then you can burn and write programs on the chip at any time. instead of removing the chip. this is the biggest feature of the ISP method. The specific six wires are connected to that pin. Different models are different. The Chip Pin definition diagram is as follows. For example, the attiny2313 pin is defined as follows:

 

As for the programming connector, use the official 10-pin interface as much as possible. You can also customize a 6-pin interface like me, because I prefer crystal headers, but they are all arranged differently, you just need to create another line for conversion.

 

2. based on the parallel ISP download line, I initially made this package, this download line can download the entire series of AVR and at89s series 51 single chip microcomputer, the cost is low, but the PC has a parallel port, many laptops are not connected now, which is troublesome. Most of the USB ports sold on the market are used for printers and cannot be used.

 

The above is the schematic diagram. 74hc244 is used for signal isolation and driving. It supplies power from the target board by 4148. Because only four ISP programmers are signal lines, I actually replaced 74hc244 with 74hc125, to reduce the volume and pin solder points. the following is my schematic and finished image:

 

The components are fully installed in the interior, and the whole is very beautiful. Note that the download line should not be too long. It is best to set it to 50cm or less. Many PC-host software can support slisp like shuanglong, ponyprog2000 (but there are very few 51 models, and there are only two in version 2.0a). All the progisps of Zhifeng have been tested and tested successfully. the disadvantage is that the write speed is slow, which is satisfactory. if it fails for the first time, it may be a software setup problem. shuanglong does not have to (or cannot) set anything. ponyprog200 and progisp may need to be set to make it better, for example, ponyprog uses the direct Io method faster than the API method, while progisp can customize its port pins. If it is different, set it to the same as the schematic. otherwise, it cannot be used.

3. serial Port-based ISP download line ., because we are still using 51 to make some boards, when we first look at this circuit, we feel that because the reset is pulled on by default, we think it is not suitable for 51 Series (51 is a high-level reset ), more importantly, the ponyprog2000 device list does not have the ike52 model, so it has never been done. however, if it is only for AVR programming, this is also very useful.

Port 6 and port 7 must be directly connected, and the ponyprog program is used to check whether this interface is inserted. After making the interface, you can try again. The speed is similar to that of the parallel port, but you must use the physical serial port on the PC, USB to serial port cannot be used. at first, I thought it might be a driver capability problem. I used 74hc125 to isolate the driver, but it took some time but failed. I used an oscilloscope to observe the timing of the four lines and found that there was a problem with the USB to serial line, its sck (7-pin) Outputs a random square wave. The sck sequence from the physical serial port has a frequency of around 20 K and is continuously stable, for example, this may be a problem with the USB-to-serial chip, which is only 20 kb in frequency. Is it filtered out by dry sound ?? If you know something, please help me analyze it, but this conversion line is good. Currently, it is used for communication for the arm system. The download is normal and the chip model has not been opened, the driver name is prolific USB-to-serial COMM port. if you have WHQL, there should be no problem. The following is my schematic diagram (I refer to the parallel drawing), physical objects, and waveforms.

 

When the oscilloscope is used for measurement, it is a direct measurement transfer interface without a download line. Channel 1 (green) is the physical serial port, Channel 2 (yellow) is the USB to serial port, and 9 feet have been used for the oscilloscope, no error. As we are currently working on the arm9-system, we have already lowered these questions. If you have any research on it, please tell your younger brother to solve this problem, you can use it as a USB programmer! This line is directly inserted into the physical serial port and is still available.

4. after making such a simple programmer, you can start to learn the AVR or 8051 microcontroller. After you are familiar with it, you can create a USB interface programmer, usbasp, it uses a single-chip microcomputer, such as the USB sequence, to make it at least requires a programmer, such as the above, to write the program into the single-chip microcomputer. this is best made when you are familiar with AVR. I drew the schematic diagram based on the public board diagram on the Internet to facilitate my own production.

 

The crystal oscillator must be 12 MHz, otherwise it is impossible to complete the USB sequence pattern. The single-chip microcomputer can use the low-voltage version of The atmega8l 8 Pu overclock, the voltage on the USB data line is 3.3 V, if the maximum voltage is 3.6 V, the two voltage control tubes must be 3.6 V. For other components, the value of the jp1 jumper is forced to work at low speed, for example, if a single-chip computer with internal RC oscillator is burned, the low-speed mode may be used for the first time, because the internal oscillation of 1 MB is used by default. because the USB power supply is sufficient, jp5 can be normally disconnected. jp3 is only used when writing or updating the firmware of the programmer. It must be disconnected at ordinary times. The entire circuit is actually very rare, when connecting the USB cable with JP2 or the USB public header, make sure that the sequence is correct,

The PCB above is designed for all-purpose boards, some people call it Dongdong boards, and the four led positions are solder pins, used to bring out the shell, this single-chip microcomputer is directly inserted, It is recommended not to weld up, instead, the IC outlet is used. After the circuit is completed, the USB port is inserted after the table is confirmed correct. At this time, the PC end should prompt that it is an unrecognized USB device, so ignore it, then start to burn the firmware, connect the jp3 first, and then use another programmer to write the program into the ipv8 microcontroller through the programming port. this process is the same as that of the time burning target board. after confirming that the data is successfully burned and verified, then burn the fuse bit. This step is mainly to set the microcontroller to the external crystal oscillator mode. Be careful when setting the fuse. If you click an error, first restore the default value, modify it again. otherwise, the consequences are unpredictable. the following are the fuse setting interfaces of ponyprog, progisp, and slisp respectively:

Do not set an error. Remove jp3, unplug and re-insert the USB. If there is no accident, you will see a prompt like the new hardware, and then install the USB driver, even if it is done. as for the software, Zhifeng's progisp currently supports well. because it is often used, it is best to build a shell to protect it. I bought a small box in the shell store. In short, it is a small problem. I used another 8-pin microcontroller for the low-speed switch. this is a self-locking switch that implements button detection, level inversion output, and saves the status to the in-chip EEPROM for memory implementation. This is because I expanded it later and used the PIC 12f629 microcontroller, the implementation with the AVR Microcontroller (such as tiny13) is very simple, so I won't say much, but it takes some time to think about it, or directly implement it with a mechanical self-locking switch.

Now, you can enjoy the pleasure of your achievements.

Usbasp production materials have been packaged. If you are interested, you can download and study: (open in a browser and download in a single thread)

Http://cid-73a00b0e388ba946.skydrive.live.com/self.aspx/.Public/MCU/usbasp.rar

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.