Introduction to VisISP-52
VisISP-52 is a Windows application that will run on all modern versions of Windows (Win95, Win98, Win2000, WinME, and WinXP) and which will allow supported microcontrollers to be programmed "in-system". It was developed specifically to program the Atmel AT89S8252 and AT89S8253 installed in an 8052.com SBC but should work equally well for any other design that uses a compatible ISP and one of the supported microcontrollers.
To install VisISP-52 on your computer, simply download the following installation program and run it. This will install the application on your computer and add the appropriate icons to your "Programs" menu. You may then launch the program normally.
- Note: You may need to be logged in as 'Administrator'
in Win2000, WindowsXP, and Windows NT in order to install the program.
Using VisISP-52 to Load Programs on the Microcontroller
VisISP-52's interface is very straight-forward as is pictured below. A single window with minimal menu options provides access to the primary features of the program: Writing new firmware to the microcontroller, reading the firmware that is currently in the microcontroller, and erasing the microcontroller's memory.
Before proceeding, make sure you've selected the right microcontroller in the "Microcontroller" drop-down window. At this time, VisISP-52 only supports the Atmel AT89S8252 and AT89S8253.
To Write Firmware to the Microcontroller: In order to write firmware to the microcontroller, first select the HEX file you wish to download by pressing the "file" button to the right of the "File to Program" prompt. You will be allowed to select a HEX file which will be loaded into memory. Once you've selected the file, you may download it to the microcontroller by pressing the "Write" button. A progress window will be displayed as the file is transferred to the microcontroller.
To Read Firmware from the Microcontroller: You may read the contents of a microcontroller by pressing the "Read" button. This will download the program memory from the microcontroller to the PC. When the download is complete you will be prompted to enter a name for the HEX file that you wish to write the data to. Note that you will not be able to download firmware if the microcontroller has a security "lock bit" set to prohibit such downloading.
To Erase the Microcontroller: You may erase the microcontroller by pressing the "Erase" button. The erase process is very quick but is subsequently followed by a verification phase in which VisISP-52 will read the entire contents of the microcontroller's memory to verify that it was, in fact, erased. You may cancel this verification process at any time without affecting the erase process which is completed almost immediately.
Options: The "Options" menu allows you to configure the ports (LPT port to which the SBC hardware is connected). You may also toggle the "Quick Program Mode." This option only applies to the AT89S8252. When the Quick Program Mode is selected, VisISP-52 will only download those bytes which are contained in the selected HEX file but will leave all other bytes alone. This means that if the HEX file only contains 2k of data, only 2k will be written to the AT89S8252 while the other 6k of the AT89S8252 will not be affected. If this option is not selected then the remaining 6k will be filled with FFh data.
Since the ISP circuit of the 8052.com SBC was originally developed to operate with the AT89S8252 and SP89, VisISP-52 will only work with ISP circuits that are compatible with the original SP89 parallel port pin-out. The 8052.com SBC meets this compatability requirement.
If you are going to include an ISP circuit in your own hardware and you wish it to be compatible with VisISP-52, use the following pin-out:
|Parallel Port Pin||Microcontroller Connection/Function|
|2 (D0)||SCK/P1.7. The D0 pin of the parallel port drives the SCK/P1.7 pin on the microcontroller. SCK is the SPI clock which is generated by VisISP-52 and allows the PC to clock data into and out of the microcontroller.|
|3 (D1)||RST/pin 9. The D1 pin of the parallel port drives the RST pin of the microcontroller. This allows VisISP-52 to put the microcontroller into reset mode. This is necessary because ISP occurs with reset driven high.|
|8 (D6)||ISP Enable. The D6 pin of the parallel port should drive a buffer IC such as the 74HC126 such that the other input lines (D0, D1, and D7) are only connected to the microcontroller when this line is driven high by VisISP-52. When this line is low, the other three input lines should not be connected to their respective connections on the microcontroller. Note that a pull-down resistor between the parallel port and the 74HC126 may be necessary so that ISP is disabled when no parallel cable is connected to the ISP circuit.|
|9 (D7)||MOSI/P1.5. The D7 pin of the parallel port should drive the MOSI pin of the microcontroller. This is the pin that VisISP-52 uses to actually send data bits to the microcontroller in conjunction with the SCK clock line.|
|11 (S7/Busy)||MISO/P1.6. The S7/Busy pin of the parallel port should be driven by the MISO pin of the microcontroller. Data sent from the microcontroller to VisISP-52 is sent on this line. Note that a termination resistor of approximately 220 Ohms is recommended between the 74HC126 latch and the parallel port pin.|
|18-25 (Ground)||Ground. As many pins between 18 and 25 of the parallel port should be connected to ground on the microcontroller circuit. While a single ground line may work, connecting additional ground lines may decrease problems due to crosstalk between the data lines. This is especially true if the parallel cable is a flat ribbon-cable.|
The following schematic describes in detail how such a VisISP-52-compatible ISP circuit should be designed. This is the designed that is implemented in the 8052.com SBC. Click on the schematic for a larger version.
VisISP-52 originated as a Windows application based on the design of SP89 ISP software that was originally developed by Steven Bolt. That software works fine in Linux and probably works fine in Windows; however, the install process was not particularly friendly for Windows NT and Windows XP due to additional software that needed to be installed in order to access the parallel port which is protected in those operating systems.
Additionally, SP89 only supports the AT89S8252 microcontroller which has now been discontinued and replaced by the AT89S8253. Thus it is not possible to use SP89 with the newer AT89S8253 that is shipping with the 8052.com SBC.
VisISP-52 solves both of these problems by providing a single easy-to-install application that will work on any modern Windows operating system. It also supports both the AT89S8252 and the newer AT89S8253.
VisISP-52 does not use any code from SP89, although the code for VisISP-52 was developed with the benefit of looking at the SP89 source code to get a good idea of how the AT89S8252 communication worked. The AT89S8253 code was developed from scratch with some limited technical support from Atmel. The software also includes code based on the parallel port code from Logix4U.
This software is free and may be distributed without restriction. The source code is not currently available but will probably be made available in the future. The only the source code is not being made available at this time is because the code is not as presentable or as easy-to-follow as it should be and will probably confuse the curious developer rather than help him.