PonyProg Tutorial

( for Version 2.06a Beta Apr 4 2003 )
Updated - 3 September, 2004 Author: Len Payne, modified by Peter Sutton


Starting PonyProg

Once the program has started, you will be looking at a screen like this:


Tick the "Disable sound" checkbox if it isn't already. It's fun, but only for the first couple of times.


The following window will only appear the first time PonyProg is run after it has been installed on the computer. Skip this section if this window did not appear.


Open the help documentation by selecting "Help" from the "?" menu. Follow the instructions provided in section 2.6.2 (Setup->Calibration).

Setting the Device Type

Set the device by selecting "AVR Micro" then "AT90S8515" from the "Device" menu.


Interface Setup

We will be using an STK200 download cable connected to the computer's printer port (LPT1) to program the AVR8515 Project Board. Open the "Interface board Setup" window by selecting "Interface Setup..." from the "Setup" menu.


"I/O port setup" should be set to "Parallel". The drop-down should be set to "Avr ISP I/O" and "LPT1" selected. Leave all "Polarity of the Control lines" checkboxes unticked.


Do not close this window just yet. We need to check that the interface will work correctly.

Now, press the "Probe" button on the "Interface board Setup" window. If all goes well, you should see the following message appear. Press "OK" and "OK" again on the "Interface board Setup" window.


If you get the following message, something is not configured correctly. Work through this section, Interface Setup, again and if the probe test still fails, consult a tutor.


Back to Contents

Programming the Project Board

This section assumes that you have just completed the AVR Studio Tutorial and the file led.hex exists in the one of your folders (e.g. H:\comp1300\pracs).

If you have just completed the GNU C Tutorial, use the file count.hex (in whichever folder it is in) instead of led.hex. In the following, replace led.hex with count.hex.

Loading the Program File

Select "Open Program (FLASH) File..." from the "File" menu.


You will then get the "Open program (FLASH) content file" dialog box. Go to the "File of type:" drop-down and select *.hex. Navigate to the folder which contains led.hex and select led.hex as the filename and press the "Open" button.


The window changes to show the contents of the led.hex program file. Displayed down the left side in red, are the address offsets of each line of data in the window. The addresses are displayed in hexadecimal. Each line contains 16 bytes of data, so the address offsets increment by 16 (10 in hex) for each line.

The data in the program file, shown in green, are displayed in hexadecimal. These are the data that will be programmed into the program memory of the AT90S8515 device.

On the right side of the window, shown in violet, are the ASCII representation of the data. Only data with values in the range of 32 (20 hex) to 127 (7E hex) will be recognisable as printable characters. Data with values that fall outside this range will still be displayed in their ASCII representation.


Programming the Device

Before the device can be programmed, it must be erased. Select "Erase" from the "Command" menu.


A status dialog will appear showing the erasing progress. You will also see the YELLOW LED on the project board come on. The erasing process only takes a second or two to complete after which you should get an "Erase Successful" message. Press the "Ok" button to continue.

The device can now be programmed. Select "Write Program (FLASH)" from the "Command" menu.


You are then asked to confirm writing to the device. Press the "Yes" button.


A status dialog will appear showing the writing and verifying progress. Again, you will see the YELLOW LED on the project board come on. The writing and verifying process takes longer to complete than the erasing process. You should finally be greeted with a "Write Successful" message. Press the "Ok" button to continue.

Running the Program

This is nothing more to do, the led program is now running on the project board. You can try probing the PORT B pins on the project board with an oscilloscope or logic probe if either of these is available. You should see the pins toggling.

Reloading the Program File

Program development can take several cycles of writing code, assembly, and device programming. It is important to Reload the program file into PonyProg before erasing and programming the device again. This is done by selecting "Reload Files" from the "File" menu.


Back to Contents