PonyProg documentation
by
Lanconelli Open Systems
http://www.cs.unibo.it/~lanconel
http://utenti.tripod.it/LancOS


Contents

1 Intalling
2 Menu Commands
2.1 File
2.1.1 New
2.1.2 Open
2.1.3 Save
2.1.4 Save as
2.1.5 Print
2.1.6 Close
2.1.7 Exit
2.2 Edit
2.2.1 Edit note
2.2.2 Edit buffer enabled
2.3 Device
2.3.1 Type
2.3.2 Read
2.3.3 Write
2.3.4 Verify
2.3.5 GetInfo
2.4 Utility
2.4.1 Double bank
2.4.2  Byte swap
2.4.3 Write security
2.4.4  Write high endurance
2.5 Options
2.5.1 Setup
2.5.2 Calibration
Appendix
A

1 Installing

Installing PonyProg depend on the system you have.
With Windows95 you have to create a new directory named C:\PONYPROG, then copy the file just downloaded to C:\PONYPROG and unzip it (with WinZip), finally you can copy ponyprog (the link) on the desktop.

With Linux you need the V library v1.20 correctly installed. Login as root and follow these instructions:
Copy the file downloaded to a directory like /usr/local/src and decompress it with "tar xvfz ponyprog.tar.gz", then enter the directory ponyprog.
Make a link to the V configuration file, the Config.mk in the root directory of the V library:
"rm -f Config.mk; ln -s ~/v/Config.mk ./Config.mk"
Then build the executable and install it with "make linux; make installLinux" for a static linked executable or
"make linuxelf; make installLinuxElf" for a dinamic linked executable.
The executable will be installed in /usr/local/bin.

The first time you run the program remember to select the interface and port you use with the Setup. If the program report a message like "The interface don't respond" when started, then means that you not have configured the port properly, or the interface is not connected.
You may need also a Calibration, it depends on the fastness of your computer.


2 Menu commands

The following is an explanation of each menu command.


2.1 File

2.1.1 New

Open a new window, each window can display the content of a device or file.


2.1.2 Open

Open a file by name, and read its content in the current window. You can select the file to open through a dialog. PonyProg recognize four different types of file format: e2p, intel hex, motorola S-record and raw binary. If the selected file don't seem to be a e2p, it tries to open the file as intel hex; if also this operation failed, then it opens the file as binary. If the file has e2p format, you don't have to worry about the device type currently setted, otherwise you first have to select the correct device type, then load a file. If you want to load a file for the Atmel AVR, be sure to load the content of the flash first, and then the content of the eeprom. To do so you have to configure the AVR assembler to generate Intel hex format with extension .hex for the flash and .eep for the eeprom. The content of the eeprom will be displayed after the content of the flash memory.


2.1.3 Save

Save the content of current window to a file. If no name has been specified work like Save as.


2.1.4 Save as

Open a dialog box where you can specify the name of the file. In the bottom of the dialog box you can select the file format for the file to save (indicated by the extension). If you press OK the content of the current window will be saved in the file specified. Saving in Intel hex format or motorola S-record don't work yet. I suggest to save always in e2p format, doing so the device type and the notes will be recorded in the file. The .bin format is raw binary format, it's suitable for exporting the file to other programs.


2.1.5 Print

Open a dialog box where you can select the printer name and options. If you press OK the content of the current buffer will be printed.


2.1.6 Close

Close the current window, if there is only one opened window it ask if you want to exit; you can choose Yes or No. If the current buffer is modified it ask you if you want to save the content in a file before to close the window.


2.1.7 Exit

Close all the opened window and exit the program. If exist a modified buffer it ask you if you want to save the content in a file before to close the window.


2.2 Edit

2.2.1 Edit note

Open a dialog box where you can edit a Chip id and a note. These two fields are saved within the window content if you use the e2p file format (see Open). These two fields are free text editing, and are useful for a description of the device programmed and the meaning of its content.


2.2.2 Edit buffer enabled

You can toggle this item either to enable or disable the edit mode. If this mode is enabled you can edit the buffer content by clicking on a location of the current window. Two editing modes are available: hexadecimal editing and text editing. If you click on the HEX (center) part of the screen or press ENTER you open a dialog where you can insert the new value for that byte in decimal, hexadecimal, or character. If you click on the ASCII (right) part of the screen you open a dialog where you can insert or modify a text starting from that location. You can CUT & PASTE in the text entry dialog by the use of the right mouse button. Note that you can enable/disable the edit mode of the current window only, so if there are more than one buffer window opened, the edit mode of other window remains unchanged.

prog-edit.jpg (6188 byte)


2.3 Device

2.3.1 Select

Select the type of current device. You have to select the device type before reading or writing the device. Selecting an "Auto XXX"  type means that the device type is determined by the program during the read or write operation, this feature is useful when you need to query a device to know if it works and which device it is. There are some different device family: the I²C Bus eeproms that are addressed with 8 bit word, the I²C Bus eeproms that are addressed with 16 bit word, the Microwire eeproms, the SPI eeproms, the AVR microcontrollers and the PIC microcontrollers. You can select the device family in the tool bar with the combo-box, or directly the device type in the menu. The current device type is stored in the .INI file, so the next time you run the program it's recalled. To read and write I²C Bus eeproms other than 24xx (i.e. the SDE2526, SDA2546, SDA2586, SDA3546, SDA3586) select the type "24XX Auto".
The 24C01 can be readed but not writed, you can read it as a 2402 or 24XX Auto device. Note that you can replace a 24C01 eeprom with a new 24C02 eeprom, because it's fully compatible to the 24C01.


2.3.2 Read

Read the content of a device in the current window.  This operation can take a while to execute, so a dialog box shows that the operation is still in progress. If you want to stop the current read just press the "Abort" button. Finally a dialog box showing the result of the operation appears.
If the program report the message "The device not responding" means that you have missed to connect the device to read, or the interface is not configured properly (see the Setup). Note that only the devices that support probing report this type of message, other device simply read all 0's of FF's (if the device is missed). The devices that support probing are the 24XX serie and the "AT90SXX Auto". In the specific case of  "AT90SXX Auto" device type selected, the program can report the message "The device is locked" in case of the locked bits was programmed. You can't read a locked device, to program it see Write.


2.3.3 Write

Write the content of the current window to a device. A dialog box ask you to confirm this unrecoverable operation. This operation can take a while to execute, so a dialog box shows that the operation is still in progress. If you want to stop the current write just press the "Abort" button. After the writing an automatic verify is executed. Finally a dialog box showing the result of the operation appears.
Before to do a write I suggest to select the specific device type, not the "24XX Auto" or "AT90SXX Auto". Note that if you select a "AT90SXX Auto" device and try to write a locked device you get the message: "The device is locked".
Note that both the flash and eeprom are writed (only if the device have both flash and eeprom like the AVR), and then verified.


2.3.4 Verify

Verify the content of a device, compares it to the content of  the current window.  This operation can take a while to execute, so a dialog box shows that the operation is still in progress. If you want to stop the current verify just press the "Abort" button. Finally a dialog box showing the result of the operation appears.


2.3.5 GetInfo

Shows some informations about the device. Some of these informations are showed also in the status bar at the bottom of the main window.


2.4 Utility

2.4.1 Double bank

This operation duplicates every bank in the current buffer and changes the device type to a bigger device type. A bank is a cluster of 256 bytes for the 24xx and a word for other device. This utility is useful to replace a SDA2546 device with a 24C08 or a SDA2586 with a 24C16. To do it you have to select the device type "24xx Auto", connect the SDA2546 device and perform a Read operation. Then you have to perform a "Double bank", replace the SDA2546 with a blank 24C08 and do a Write operation.


2.4.2 Byte swap

This operation swap bytes within every word in the buffer. This command is useful to convert from little endian representation to big endiand and viceversa. Some devices uses 16bit word so you can represent it in both ways depending on your needs.
For example consider the number 1234 hex (4660 decimal), the little endian is 34 - 12, while the big endiand is 12 - 34.


2.4.3 Write security

This command is implemented only for some devices.
With the AVR you can lock the program and eeprom memory from further reading by using this command. When the device is locked you can rewrite it, but not read it. Note that if you try to read a locked device with the type "AT90Sxx Auto" setted you receive the message "The device is locked"; you have to select the specific device before to write to it.
With the 24C65 a dialog ask to insert the first block and the number of blocks to lock. When the device is locked you can't do a "write security" or a "write high endurance" anymore. To lock the device the number of blocks must be greater than 0.


2.4.4 Write high endurance

This command is implemented only for the 24C65 eeprom. A dialog ask you to insert the high endurance block (support more write operations). When the device is locked this command don't work.


2.5 Options

2.5.1 Setup

Open a dialog box where you can select the interface type and the port number where the hardware is connected. You can choose from several hardware interfaces (see PonyProg - The hardware for more info). Note that only PonyProg SI support all the devices.


2.5.2 Calibration

Calibration tunes the I²C Bus timing for your computer. You have to connect a 24Cxx eeprom (be sure it's a 100KHz, not a 400KHz), then choose calibration from the menu. After this operation is completed succesfully you should read every I²C Bus eeprom.
Calibration is still under construction, if you have problems in read/write other devices, you need do modify manually the following line in ponyprog.ini (or .ponyprogrc if you have Linux) file.
BogoMipsX1000=60000
You have to decrease the 60000 if you have slow computer (like a 486) or you need to increase this value if you have fast computer (Pentium II). With Linux this value is taken from the /proc/cpuinfo, so it should be already correct.