Repeat MCu-set up the AVR download Environment

Source: Internet
Author: User
ArticleDirectory
    • Bus timing Calibration
    • Interface settings

2012 conmajia.

Initiated: December 27th, 2012

Preface

The single-chip microcomputer, once fascinated for a while in the university era, was dropped after graduation. After many years, the interest in electronic production began to rise again, so the MCU was replayed.

It is enough to make use of hundreds of RVs, tiny13, 2313, and ipv8. But with a single-chip microcomputer, there is no way to use it without a download line. I can't just play with simulation, can I?

When I was a student, I was playing in the lab. The teacher's download line was very valuable. I gave my equipment, and I had to weld it myself. Now I have all the equipment, so I have to do it myself.

The following content is divided into hardware and software.

Hardware: Download line Circuit Diagram

The circuit diagram uses the classic Si-Prog download line to simplify the version, for example:

Equipment

The device only needs a Hole Board (single/double-sided) and several discrete components. The list is as follows:

Resistance

4.7k Ω × 3

10k Ω × 2

Diode

1n4733 × 2

Transistor

8050 × 1

Connectors (optional)

9-core serial port plug-mother/hole) × 1

Serial Port connector protection cover × 1

10-core or 6-core double-row pin/seat × 1

All components

Finished product demonstration

Finished Product

Pay attention to the wiring sequence of the single chip microcomputer.

Software: ponyprog Introduction

After the download line is completed, all the hardware parts are OK. The next step is to install the programming software. The programming software that perfectly matches the above circuit does not belong to ponyprog.

Ponyprog is a well-established open-source programming software developed by clodidio lanconelli. The latest version is ponyprog2000 v2.07c. It supports the full range of single-chip microcomputer (the latest version) of ATMEL and PIC and the eeprom of I2C, Microwire and SPI interfaces. For more information about ponyprog and its specifications, see http://www.lancos.com/prog.html.

Generally, players call it "Pony" because its logo is a pony head. It is said that the author cldio often rode a horse named pony. to commemorate his horse, he named the software ponyprog (pony programmer ). Of course, this is just "said ".

You can download the latest version of ponyprog from the clodio personal homepage http://www.lancos.com.

Although the latest stable version is v2.06, we do not recommend that you download it because this version (and earlier versions) does not support newer AVR Microcontroller (such as tiny13 ).

Bus time series Calibration

To run ponyprog for the first time, you must first perform bus timing calibration. This is because ponyprog uses software to simulate the timing signals required for Single-Chip Microcomputer Programming. Because the CPU clock speed, bus frequency, and system performance of each computer are different, it is necessary to first calibrate the current computer.

Shut down other tasks running on the computer before calibrationProgramTo avoid affecting the calibration result.

The calibration method is as follows. Click "setup-calibration" in the menu for calibration,

A confirmation box is displayed for the software:

"Bus timing calibration" is displayed in the dialog box. You need to confirm that only ponyprog2000 is running (CPU and hard disk should be idle at this time ). Calibration takes several seconds. Do you want calibration ?".

Select "yes" and the software starts calibration. The calibration operation takes about 10 seconds. Do not perform other operations during this period.

After the calibration is completed, the software will prompt,

Interface settings

Next we need to set our Si-Prog. Open the menu "setup-interface setup ",

Call up the interface settings window,

Set the interface method "serial" and "Si prog API" according to the figure, and select the corresponding serial port on the computer. Generally, the physical serial port is "COM1", and the USB to 232 serial port is "com3 ". If you cannot determine the port, you can view it in the "Device Manager" of windows.

The Select polarity of the control lines option of the control line polarity is left empty.

After the settings are complete, click the "probe" button to test. If this window is displayed:

It indicates that the hardware works normally and you can start programming.

Program to select a device first select the corresponding microcontroller/device model. On the ponyprog main interface, you can see the device selection bar and select the corresponding model. Read data

After connecting the MCU and the download line, click the "read all" button of ponyprog to read the device content. If the hardware is normal, a read progress bar will appear. After reading is complete, the window will display the read program content in binary format.

Write Data

After connecting the single-chip microcomputer and the download line, click the ponyprog "open device file" to open the program file to be burned (such as the Intel hex format *. HEX file), the main window will show the file content for you to preview. Click "write all" to write data to the device. A prompt will be displayed after the operation is successful.

Error Handling

If "error-24" such as "unknown device" occurs during programming, it means that your connection is misplaced. It may be that the line sequence of the single-chip microcomputer is incorrect. This can be connected by referring to the single-chip datasheet. It may also be a welding error, which requires a board change.

If "error-23" of "bad device" is displayed, it indicates that the device is not correctly selected and needs to be reselected. If the corresponding device cannot be found, install the latest ponyprog.

Conclusion

With half an hour of effort, you can start endless single-chip computer games in the future.

Start happy!

(End)

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.