Friday, September 16, 2011

Tutorial 3 : Getting started with PonyProg.

Name : Getting started with PonyProg (parallel and serial port programmer)

: How to configure the PonyProg to make it work with parallel port programmer.( illustrated in tutorial 1.)

Requirements and components :
  1. x86 based PC with suitable o/s  (I use windows XP SP 3)
  2. Software : PonyProg 2000 (Free to download Click here)
    (As I use windows XP SP 3, so I used to download suitable version)
  3. Refer this tutorial to generate .hex file which is to be burned in uC.
Installing the  PonyProg2000 :
  • Download the suitable version click here .
  • PonyProg2000 setup file.
  •  Double click on the setup.exe
    (This will open the installation wizard)
  • Click next .
    (This will open the licenses agreement window, accept the licenses and click next)
  • Select installation directory, by default it is C:\Program Files\PonyProg2000.
    (To change the installation directory click on Browse option)
    Click Next .
  • Click Next : This will create the start menu shortcut .
  • Click on the Install to install PonyProg2000
  • This will install the PonyProg2000 on your system.
    Un-check  the View README.TXT check box.
    Then Click on the Finish .

This will complete the installation on your system.

Configuring PonyProg2000 :
  • Now right click on My Computer .
    Then click on Manage
  • This  will start Computer Management wizard
    In the console tree (on left hand side) click on Device Manager

  • Now expand Port (COM & LPT ) menu.
    Note down the Printer Port.
    Here, I'm having LPT1. 
We need all this stuff for configuring the PonyProg2000
  • Turn on your speakers to enjoy special sound effect !!
    Click on start -> All Programs -> PonyProg -> PonyProg2000

    (This will start the PonyProg2000)

  • Now click on OK.
  • This will open a pop-up window asking you to run the calibration
  • Click on OK.
  • This will open one more pop-up saying "Initial setup is require".
  • Click on OK.
    (Now PonyProg2000 is ready for configuration.)
 Above fig shows the default view of PonyProg2000
STEP 1: Interface setup...
In menu bar click on the Setup and then click on the Interface Setup.. 
This will open up the I/O Port Setup window.
STEP 2 :
Click on Parallel (radio button) to select the Parallel programming mode.
From drop-down menu below Parallel (radio button)
select the Avr ISP I/O .
Then click on LPT1 (radio button).
(as shown below)
Now click on OK, to complete the I/O Port Setup
NOTE : Do not disturb the other settings .

STEP 3 : Calibration
In menu bar click on Setup and then click on Calibration .
This will open the window asking for your conformation.
Note : Remove all the connection from LPT1 (if there are any)
Click on Yes button.
This will calibrate the bus timing.

Another pop-up window will come up saying that, Calibration OK.
Click on OK.
Now we are done with initial setup !!!
It's time to select the Micro-controller.......

STEP 4 : Device selection
In menu bar click on device button, this will open a drop down menu.
Move the mouse pointer to AVR micro, this will open a drop down list of the AVR micro-controllers those can be programmed using PonyProg2000
Select the appropriate one by clicking on the option,
(Here I'm selecting ATmega16)

STEP 5 :
Once we change the device to ATmega16 one can notice the two changes
1.  In navigation tool bar you will find AVR micro and Atmega16 on left hand side.
2.  status bar will also display the same settings.(at bottom)

STEP 6 : Loading the .hex file in PonyProg2000
To find how to locate the .hex file after successful compilation (using CodeVisionAVR) refer this tutorial (click here)
(path will be ##/cvavr2>Bin>Exe)
Now we can locate the Hello_embedded.hex file.
To load file ->
1.  In menu bar click on the File and select Open Device File ... option

2.  This will open the "Open device content file" window.
3.  Change the "File of type" option to .hex (as shown below)
4.  Navigate to proper folder in order to find the .hex file using look in drop-down menu.
5.  Now select the  Hello_embedded.hex and then click open button
6. This will load the Hello_embedded.hex in PonyProg2000 (see fig bellow)

STEP 6 : Programming the micro-controller
(some people also refer it is as Burning uC or writing uC

1.  Connect the Parallel port programmer to Parallel port (PC) and programming pins of development board (micro-controller).
2.  In menu bar click on the command and then click on Write All option.

3.  PonyProg will ask for your permission .
4.  Click on the Yes button.
5.  Now PonyProg will write and verify the code, it will take 1-2 minutes
6.  After the successful write operation PonyProg says "Write successful".
Click OK button to complete the procedure.
7.  Now carefully remove the parallel port programmer from micro-controller board, and press Reset button on development board.

Enjoy Output.

Note :
This is how normal operation of PonyProg takes place.
Remove the programmer from development board to see output.
Your queries and suggestions are always welcome.