You are on page 1of 5

August 28, 2010

[89V51RD2 FLASH MAGIC MANUAL]

6.1 Introduction
To load a program into the C on the USB 89v51RD2 FLASHER BRD Starter Kit, you will need the Windows program Flash Magic programming software from Embedded System Academy which can be found on the accompanied CDROM or free download it from the Embedded System Academy Website: http://www.esacademy.com and install this to your C drive. Flash Magic is Windows software from the Embedded Systems Academy that allows easy access to all the ISP features provided by the P89C51Rx2 devices. These features include: Erasing the Flash memory (individual blocks or the whole device) Programming the Flash memory Modifying the Boot Vector and Status Byte Reading Flash memory Performing a blank check on a section of Flash memory Reading the signature bytes Reading and writing the security bits Direct load of a new baud rate (high speed communications) Sending commands to place device in BootROM mode Flash Magic provides a clear and simple user interface to these features and more as described in the following sections. Under Windows, only one application may have access the COM Port at any one time, preventing other applications from using the COM Port. Flash Magic only obtains access to the selected COM Port when ISP operations are being performed. This means that other applications that need to use the COM Port, such as debugging tools, may be used while Flash Magic is loaded.

7. Flash Magic User Interface Tour


The window is divided up into five sections. Work your way from section 1 to section 5 to program a device using the most common functions. Each section is described in detail in the following sections.At the very bottom left of the window is an area where progress messages will be displayed and at the very bottom right is where the progress bar is displayed. Just above the progress information EmbeddedHints are displayed. These are rotating Internet links that you canclick on to go to a web page using your default browser. If you wish to quickly flick through all the hints then you can click on the fast forward button:

7.2 Menus
There are four menus, File, ISP, Options and Help. The File menu provides access to loading and saving Hex Files,loading and saving settings files and exiting the application. The ISP menu provides access to the less commonlyused ISP features. The Options menu allows access to the advanced options and includes an item to reset alloptions. The Hep menu contains items that link directly to useful web pages and also open the Help About windowshowing the version number. The Loading and Saving of Hex Files and the other ISP features are described in the following sections.

Visit us at www.nskelectronics.in Page 1

August 28, 2010

[89V51RD2 FLASH MAGIC MANUAL]

7.3 Tooltips
Throughout the Flash Magic user interface extensive use has been made of tool tips. These are small text boxesthat appear when you place the pointer over something and keep it still for a second or two. Note that tool tips do not appear for items that are disabled (grayed out).

7.4 Saving Options


The options in the main window and the Advanced Options window are automatically saved to the registry whenever Flash Magic is closed. This removes the need for an explicit save operation. When Flash Magic is restarted the main window and the Advanced Options window will appear as you left it, so you do not have to repeatedly make the same selections every time you start the application. If you wish to reset the options to the original defaults then choose Reset from the Options menu.

7.5 Five Steps Programming Visit us at www.nskelectronics.in Page 2

August 28, 2010

[89V51RD2 FLASH MAGIC MANUAL]

STEP 1 - Connection Settings


Select Com Port No (If USB Flasher Board Chk COM Port No From Device Manager) Select Baud rate 9600 Select Device - For EX 89V51RD2

STEP 2 -Select Erase Blocks Used By Hex File


Select each Flash block that you wish to erase by clicking on its name. If you wish to erase all the Flash then check that option. If you check to erase a Flash block and all the Flash then the Flash block will not be individually erased. Erasing all the Flash also results in the Boot Vector and Status Byte being set to default values, which ensure that the BootROM will be executed on reset, regardless of the state of the PSEN pin. Only when programming a Hex File has been completed will the Status Byte be set to 00H to allow the code to execute. This is a safeguard against accidentally attempting to execute when the Flash is erased. On some devices (not the Rx+ family) erasing all the Flash will also erase the security bits. This will be indicated by the text next to the Erase all Flash option. On some devices erasing all the Flash will also erase the speed setting of the device (the number of clocks per cycle) setting it back to the default. This will be indicated by the text next to the Erase all Flash option.

STEP 2 -Selecting the Hex File


This step is optional. If you do not wish to program a Hex File then do not select one. You can either enter a path name in the text box or click on the Browse button to select a Hex File by browsing to it. Also you can choose Open from the File menu. Note that the Hex file is not loaded or cached in any way. This means that if the Hex File is modified, you do not have to reselect it in Flash Magic. Every time the Hex File is programmed it is first re-read from the location specified in the main window.

Step 4 Options
This section is optional, however Verify After Programming, Fill Unused Flash and Generate Checksums may only be used if a Hex File is selected (and therefore being programmed), as they all need to know either the Hex File contents or memory locations used by the Hex File. Also note that if one or more of the security bits are set on the device or the clocks bit (6 clks/cycle) is set on the device, then those set bits will be disabled in this section,indicating that they cannot be reprogrammed. If the device erases the security bits (and clocks bit) when a full Flash erase is performed then you can select the Erase all Flash option in section 2 and all the security bits (and clocks bit) will be enabled, indicating that you can select which ones you wish to program after the Hex File has been programmed. If the device does not erase the security bits then even if Erase all Flash is checked, the set security bits will remain disabled. On these devices only a Parallel Programmer can erase the security bits. Checking the Verify After Programming option will result in the data contained in the Hex File being read back from Flash and compared with the Hex File after programming. This helps to ensure that the Hex File was correctly programmed.

Visit us at www.nskelectronics.in Page 3

August 28, 2010

[89V51RD2 FLASH MAGIC MANUAL]

Checking the Fill Unused Flash option will result in every memory location not used by the Hex File being programmed with the value 00H. Once a location has been programmed with 00H it cannot be reprogrammed with any other value, preventing someone from programming the device with a small program to read out the contents of Flash or altering the applications operation. Checking the Generate Checksums option will instruct Flash Magic to program the highest location in every Flash block used by the Hex File with a special checksum adjuster value. This value ensures that when a checksum is calculated for the whole Flash Block it will equal 55H, providing the contents of the Flash block have not be altered or corrupted. Please refer to the Checksums section for more information. Checking the Execute option will cause the downloaded firmware to be executed automatically after the programming is complete. Note that this will not work if using the Hardware Reset option or a device that does not support this feature. The 66x and old Rx2 families only support this feature from revision G onwards.

Step 5 Performing the Operations

Step 5 contains a Start button

Click on Start Button Message shld be apper Rest the Device in ISP Mode Then Click on Reset ( Fig2 will show Proggrmming Status) If u are Getting Error Unable to Communicate or Baud rate Error Hold the Reset and Try Again After getting Message Release The Reset
- http://groups.google.com/group/nskelectronics

Regular Flash Magic Problems Visit us at

Visit us at www.nskelectronics.in Page 4

August 28, 2010

[89V51RD2 FLASH MAGIC MANUAL]

Visit us at www.nskelectronics.in Page 5