If the installation and configuration of PonyProg has already been done for you, you can skip directly to section 5.
PonyProg is a free open-source device programming utility written by Claudio Lanconelli. PonyProg exists in Windows and Linux versions and is capable of programming and reading a huge variety of devices including PIC, 8051, and AVR microcontrollers, serial EEPROMs, and more. PonyProg can use a standard RS-232 serial port, or a parallel (LPT) port to talk to most devices. A small amount of interface hardware is necessary to go between the serial or parallel port and your target device. See Claudio's PonyProg site for details and schematics of simple interfaces. For more information about PonyProg, see Claudio Lanconelli's PonyProg Page.
NOTE: The remainder of this document assumes you are using PonyProg to program an AVR processor using an AVRmini board (or using an AVRmini interface you've build yourself).
PonyProg is available from several sites on the web because it is a free open-source program. You can get full details about the available versions of PonyProg from Claudio Lanconelli's PonyProg Page. However, it's highly recommended you download the currently supported version of PonyProg from the RSL AVR Software Page.
Download PonyProg from:
- RSL AVR Software page (recommended)
- Claudio Lanconelli's PonyProg Page
Installing PonyProg
PonyProg is extremely easy to install. Unzipping it reveals a single setup file. Run the setup and use the default installation directory. You can delete the setup and zip files after the installation completes.
The first time you run PonyProg you will need to configure the programming interface, calibrate for the speed of your computer, and test to make sure your settings work.
- Start PonyProg
- Click "OK" at the About box
- The first time you run PonyProg, you will be warned that you need to run the calibration and configure the programming interface.
- Run the calibration by going to Setup | Calibration
- Open the Interface Setup dialog window by going to Setup | Interface Setup...
- Make sure your settings are as shown
- Serial Programming
- SI Prog API access method
- Select the COM port you will use for programming which may be different from COM1 as shown.
- No Control line inverting
- Click "OK" to accept the configuration and close the Interface Setup dialog window.
NOTE: You will need a working AVRmini board with AVR processor to perform the testing and optimization.
Connect the COM port you specified in the configuration above to the AVRmini Programming Connector as shown. You must use a full 9-wire serial cable. Thinner 3-wire cables will cause programming to fail.
- Connect power to the AVRmini board and turn the power switch on. Verify that the power LED on the board is illuminated.
- Open the Interface Setup dialog window by going to Setup | Interface Setup..., and click Probe to verify that your cabling is properly connected. PonyProg should respond with Test OK. If you get Test Failed, check your serial cable and connections. NOTE: a Test OK result only indicates that you are connected to the proper COM port and that your cabling is probably good. It does not necessarily mean that your AVRmini is working properly.
- Click "OK" to close the Interface Setup dialog window.
- Select your AVR processor from the Device | AVR micro menu.
- From the Command menu, select Read Program (FLASH) to test reading your processor's FLASH program menory.
Successful Read
Problem with AVRmini board, AVR processor, or processor clock source
If you got a successful read, you can now go back to the Interface Setup dialog window and try using the SI Prog I/O access method instead of SI Prog API. Retry the Read Program (FLASH) command. If the SI Prog I/O access method works, it probably operates faster than the API method. The SI Prog I/O method may not work on some computers or operating systems.- Testing and optimization is complete!
The following is a quick reference on how to load a program into an AVR processor using PonyProg.
Connect the programming COM port on your computer to the AVRmini Programming Connector as shown. You must use a full 9-wire serial cable. Thinner 3-wire cables will cause programming to fail.
- Connect power to the AVRmini board and turn the power switch on. Verify that the power LED on the board is illuminated.
- Click on File | Open Program (FLASH) File...
- Change the Files of type: drop-down list to *.hex files
- Locate your program *.hex file and open it. (the *.hex file is the machine language output of a C compiler or assembler)
- You should now see you file open in hex format in the main window. If you scroll through it, you may even recognize some of your program's text or printf output in the right-hand ASCII display.
- Click on Command | Erase to erase your processor's memory and prepare it for programming
- Click on Command | Write Program (FLASH) to write your program into the processor
- After writing completes, PonyProg will automatically read back and verify your program
- When the verify step completes, PonyProg will release your processor and your program will immediately begin executing.
Once you have opened your *.hex file for the first time, you can automate the above process by doing the following:
- Click on Command | Program Options...
- In the Program Options window, select all the operations you would like to happen automatically when you run a program cycle. The recommended selections are:
- Reload Files (this will automatically load any recent changes to your *.hex file)
- Erase
- Write Program memory (FLASH)
- Click "OK" to accept the selections
- Now, when choose Command | Program or you click the
icon, all of your chosen operations will happen automatically.