CHAPTER 1 GENERAL ...17 CHAPTER 2 CONFIGURATION...19 CHAPTER 3 STARTING AND STOPPING ...27 CHAPTER 4 BASIC OPERATING PROCEDURE...37 CHAPTER 5 COMMAND REFERENCE...45 CHAPTER 6 STAND-ALONE FUNCTION ...67 CHAPTER 7 HARDWARE SPECIFICATIONS...69 CHAPTER 8 ERROR MESSAGES AND REMEDIAL ACTIONS ...87 APPENDIX A NOTES ON DESIGNING A TARGET ...91 APPENDIX B REVISION HISTORY ...93 SUMMARY OF CONTENTS User's Manual U13502EJ2V0UM00...
EEPROM is a trademark of NEC Corporation. PC/AT is a trademark of International Business Machines Corporation. Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Pentium is a trademark of Intel Corporation in the United States. User's Manual U13502EJ2V0UM00...
The information in this document is subject to change without notice. Before using this document, please confirm that this is the latest version. No part of this document may be copied or reproduced in any form or by any means without the prior written consent of NEC Corporation.
Some information contained in this document may vary from country to country. Before using any NEC product in your application, pIease contact the NEC office in your country to obtain a list of authorized representatives and distributors. They will verify: Device availability •...
Page p.18 The setting of the baud rate and the capacity for downloading the user program in Table 1-1 have been changed. p.19 Figure 2-1 has been changed. p.20 Figure 2-2 has been changed. p.20 The description of EXPANSION CONNECTOR has been deleted from Section 2.2. p.28 A description in Section 3.1 has been changed.
Readers of This Manual This manual is intended for user engineers who use the PG-FP3 to design and develop systems with an NEC microcontroller with flash memory. Purpose The PG-FP3 enables programs in the NEC microcontroller with flash memory to be erased, written, or verified with the microcontroller mounted on a user-designed printed circuit board through simple operations on a Windows This manual contains the basic PG-FP3 specifications and explains how to use the...
Terminology PG-FP3 ... Flash memory programmer FLASHPRO3 ... Windows application name of PG-FP3 Target ... NEC microcontroller with flash memory or user board Printer interface (IEEE 1284) ... Parallel interface specified by IEEE 1284-1994. Used FA adapter ... Adapter board used to write programs to an NEC Note The FA adapter board is a product of Naito Densei Machida Mfg.
CHAPTER 1 GENERAL ... 17 CHAPTER 2 CONFIGURATION... 19 2.1 PRODUCT ORGANIZATION ... 19 2.2 NAMES AND FUNCTIONS OF PARTS... 20 2.3 CONNECTIONS OF PARTS ... 22 CHAPTER 3 STARTING AND STOPPING ... 27 3.1 INSTALLING THE APPLICATION... 27 3.2 STARTING THE APPLICATION... 30 3.3 INITIALIZATION AND NOTES ON CORRECT USE ...
Figure No. 2-1. PG-FP3 System Organization ... 19 2-2. PG-FP3 Parts and Names ... 20 3-1. FLASHPRO3 Screens ... 32 3-2. Parameter File Setting Dialog Box... 33 3-3. TYPE Setting Dialog Box (When the Parameter File Is Loaded)... 34 3-4. TYPE Setting Dialog Box (When the Parameter File Is Not Loaded) ...
Table No. 1-1. Function Specifications ...18 2-1. Items in the PG-FP3 Shipping Carton...19 7-1. Product Configuration and Operating Environment ...69 7-2. Pin List ...72 7-3. Printer Interface Specifications ...73 7-4. RS-232C Interface Specifications ...77 7-5. Withstand Voltage of Each Interface Signal...80 LIST OF TABLES Title User's Manual U13502EJ2V0UM00...
Photo No. 2-1. Connections (Host, PG-FP3, and Target)... 22 2-2. Connecting the Printer Interface Cable (I/F SELECT Switch Set to PRINTER I/F Position) ... 23 2-3. Connecting RS-232C (I/F SELECT Switch Set to RS-232C Position)... 23 2-4. Connecting the AC Adapter ... 24 2-5.
The PG-FP3 is a tool for erasing, writing, and verifying programs for an NEC single-chip microcontroller with flash memory on a user board or FA adapter board. Features Supports all NEC microcontrollers with flash memory (as of February 1999) Easy to use in stand-alone mode (with PG-FP3 only) or on Windows 95 or Windows NT using a dedicated application (PG-FP3) Compact, portable design the size of a sheet of A5 paper Has a printer interface (parallel interface) in addition to the standard RS-232C interface.
Function specifications Item Host interface RS-232C: Printer interface The interface can be selected with the I/F SELECT switch. Note 2 Target interface Connector: Level conversion: Protection function: Supported interface: 3-wire, 3-wire + handshake (Max. SCK: 2.0 MHz) Note 3 Supply voltage Target V Target V An overcurrent protection circuit is provided for both V...
2.1 PRODUCT ORGANIZATION The system configuration of the PG-FP3 is illustrated below. User target Note FA adapter Note The FA adapter is a product of Naito Densei Machida Mfg. Co., Ltd. The PG-FP3 shipping carton contains the following items: Item PG-FP3 Floppy disk AC adapter...
2.2 NAMES AND FUNCTIONS OF PARTS Parts and their names are illustrated below. DC JACK FG TERMINAL POWER ACCESS SOCKET OF MASTER ROM The following explains the functions of the PG-FP3 parts: FG TERMINAL The FG terminal is a ground terminal on the PG-FP3. If necessary, ground the terminal using the FG cable supplied as an accessory.
CHAPTER 2 CONFIGURATION DC JACK This is the power supply input jack of the PG-FP3. To supply power to the PG-FP3, use the AC adapter supplied as an accessory. POWER SWITCH This switch turns power to the PG-FP3 on or off. Before turning power on, make sure that all required parts are connected correctly.
2.3 CONNECTIONS OF PARTS This section explains how to connect the various parts of the PG-FP3. The PG-FP3 can be used in two ways. It can be connected to a host machine and controlled by application software or it can be used in stand-alone mode without being connected to a host machine. When using the PG-FP3 without being connected to the host machine (i.e., in stand-alone mode), you may skip the description on connection with the host machine.
CHAPTER 2 CONFIGURATION [Connecting a host machine] Connection of the host interface cable is illustrated below. Select the host interface before turning on power to the PG-FP3. The selected host interface cannot be changed after power has been turned on. Connecting the printer interface cable Set the interface select switch to the printer interface position.
[Connecting the power supply] With the power switch off, connect the AC adapter supplied as an accessory to the DC jack. [Connecting the target] Use the target cable supplied as an accessory to connect the target. Whether you use a Type 1 or Type 2 cable depends on the specifications of the target.
CHAPTER 2 CONFIGURATION Photo 2-6. Connecting Target Cable to User Target For the details of interface signal connections, see Section 7.4 and the manual for the device. When using the FA adapter Make sure that the target V select switch is set to the OUT position. Connect one end of the Type 2 cable to the PG-FP3, and the other end of the cable to the mating connector of the FA adapter.
CHAPTER 2 CONFIGURATION Photo 2-8. Connecting Target Cable to FA Adapter The following is an example of directly connecting the FA adapter to the PG-FP3: Photo 2-9. Directly Connecting FA Adapter to PG-FP3 User's Manual U13502EJ2V0UM00...
Starting the host machine Turn on power to the personal computer, and start Windows 95 or Windows NT. Host machine: PC-9801 or PC-9821 IBM PC/AT compatible CPU: Pentium RAM: 32 Mbytes or more is recommended. Starting the setup program Select [Run] from the Start menu.
CHAPTER 3 STARTING AND STOPPING Starting installation When SETUP .EXE starts, follow the instructions by the setup program until the setting screen for the installation directory is displayed. To stop installation partway, click the [Cancel] button. Specify the installation directory in [Destination Directory] in the Choose Destination Location screen. Then, click the button.
CHAPTER 3 STARTING AND STOPPING Uninstalling the program To uninstall the PG-FP3 application, execute [Add/Remove Programs] in [Control Panel], and select [FLASHPRO3]. Uninstallation will start, and the files copied during installation will be deleted. Caution Uninstallation erases all installed components. If FLASHPRO3 is required after uninstallation, reinstall it.
3.2 STARTING THE APPLICATION This section explains how to start the application program. Connection of each unit and applying power For connection of each unit, see Section 2.3. After completing connections, turn on power to the PG-FP3. When the PG-FP3 is operating normally, the POWER LED lights, the LED on the side of the MODE key blinks, and then the Erase, Program, and Verify LED indicators light.
CHAPTER 3 STARTING AND STOPPING If FLASHPRO3 does not start correctly FLASHPRO3 will not start correctly if the communication settings are wrong or if installation has not been performed correctly. When FLASHPRO3 starts, connection with the PG-FP3 is checked. If communication is not being performed normally, the following dialog is displayed.
CHAPTER 3 STARTING AND STOPPING FLASHPRO3 screen The FLASHPRO3 screen consists of three subscreens. The operation screen contains command execution buttons in the form of a flowchart so that you can perform a series of operations by referring to the flowchart. The log window screen shows the command flow between the FLASHPRO3 and PG-FP3, the status, and the progress of command execution.
3.3 INITIALIZATION AND NOTES ON CORRECT USE Before a target can be accessed with FLASHPRO3, several settings must be performed for FLASHPRO3. If these settings are not done correctly, communication may not be executed correctly or the target may be damaged. Loading parameter file The parameter file is loaded with the [Setting..Device] command.
CHAPTER 3 STARTING AND STOPPING TYPE setting The TYPE setting dialog box is used to set information necessary for communication with the target. Default information is set when the parameter file is loaded. To change the default setting, either execute the [Setting..Type] command, or click the [TYPE] button on the screen.
CHAPTER 3 STARTING AND STOPPING In the TYPE setting dialog box, device-specific information is automatically set when the parameter file has been loaded, and the text box is grayed out. The parameters that can be changed by the user in this dialog box are as follows: 1.
Option setting The Options dialog box is used for detailed setting of the target and is displayed when the [Setting..Option] command is executed. This dialog box is used to set the erase time, write time, and convergence time. These parameters are automatically set to the default values when the parameter file is loaded.
CHAPTER 4 BASIC OPERATING PROCEDURE This chapter explains the basic operating procedure, using as an example the PD78F4216 used as the target. Specifically, this chapter discusses how to start the system and how to write a program to the target by executing the E.P .V.
CHAPTER 4 BASIC OPERATING PROCEDURE Turn on power to the PG-FP3. Confirm that the LED on the PG-FP3 is blinking. Start FLASHPRO3. If the communication error dialog box opens at this time, check the [Connection Port] setting and change if necessary. The example below assumes that the PG-FP3 is connected to LPT1.
CHAPTER 4 BASIC OPERATING PROCEDURE When FLASHPRO3 has been started correctly, the following screen is displayed. User's Manual U13502EJ2V0UM00...
CHAPTER 4 BASIC OPERATING PROCEDURE (2) Loading the parameter file Select [Device] from the [Setting] pull-down menu. The dialog box for loading a parameter file will open. Enter 78F4216.PRC in the box for Device file name: and click the [OK] button. When the parameter file is read, the PG-FP3 is reset for synchronization, then the parameters are read.
CHAPTER 4 BASIC OPERATING PROCEDURE (3) TYPE setting Open the TYPE setting window by selecting [Type] from the [Setting] pull-down menu, or by clicking the button on the operation screen. When the window is open, set COMM Port to UART CH-0, and UART bps to 9600 bps. Then click the [OK] button to accept TYPE setting.
CHAPTER 4 BASIC OPERATING PROCEDURE (4) Downloading a user program Open the dialog box by either selecting [Load File] from the [File] pull-down menu or clicking the button on the operation screen. Select a HEX file to be downloaded, and load the file into FLASHPRO3.
CHAPTER 4 BASIC OPERATING PROCEDURE (5) Executing the E.P.V. command The E.P .V. command can be executed by selecting [E.P .V.] from the [Procedure] pull-down menu, or by clicking the button on the operation screen. While the E.P .V. command is executed, the progress of execution is displayed in the log window, and a PG-FP3 LED blinks.
This chapter explains each command. A command can be selected from the pull-down menu on the menu bar or by clicking the corresponding button on the screen. 5.1 File When [File] is clicked, the pull-down menu shown below is displayed. This menu lists mostly the commands that are used to manipulate files.
5.1.2 Save File The [Save File] command saves the user program loaded into FLASHPRO3 or uploaded from the PG-FP3 to a file. Execute this command by selecting it from the pull-down menu or by pressing the this command has been executed, the window below opens. Enter the name of the file to be saved, and click the [Save] button.
5.1.3 Load Type The [Load Type] command reloads the file (xxxxxx.TYP) in which the information set with [Setting] has been saved when resetting is required. When the Type File is loaded again, the previously used environment is restored. Execute the [Load Type] command by clicking [Load Type] on the [File] pull-down menu. When this command has been executed, the window below opens.
5.1.4 Save Type The [Save Type] command saves information set with [Setting] to a file (xxxxxx.TYP), so that the information can be reloaded when resetting is required. When Type File is saved, the previously used environment can be restored at any time.
5.2 Setting When [Setting] is clicked, the pull-down menu shown below is displayed. This menu lists the commands that are used to set the FLASHPRO3 operating environment (such as setting of the target interface). 5.2.1 Device The [Device] command loads information such as information specific to the target device and communication settings into FLASHPRO3 and the PG-FP3.
5.2.2 Type The [Type] command sets the mode of communication with the target and operating clock. communication mode and operating clock differ depending on the device used, refer to the manual for the device for details. Execute the [Type] command by clicking [Type] on the [Setting] pull-down menu or by clicking the button on the screen.
Entering the end address (END ADDRESS) The end address is determined by the parameter definition information. It is automatically set in the Block and Area modes. Remark The end address range that can be specified with the PG-FP3 is 2 Mbytes (1FFFFFH). This is a hardware specification.
Entering a clock frequency in 3-wire or pseudo 3-wire mode (SIO CLOCK) If 3-wire or pseudo 3-wire mode is selected with the serial port, enter a communication rate as a decimal number. The valid range for communication rates is from 100 Hz to 2.0000 MHz. Be sure to enter the unit also. Up to six digits can be entered.
CHAPTER 5 COMMAND REFERENCE Selecting a transmission clock frequency from the PG-FP3 (Flashpro clock) If [In Flashpro] has been selected when a CPU clock source is being entered, select the clock the PG-FP3 transmits from the frequencies listed below. Different devices provide different operating frequency ranges for the target microcontroller.
AREA setting range In area mode, set an area range. In this mode, the [Block/Area] button at the right of the TYPE setting screen becomes active. When this button is clicked, the dialog box below opens. Enter the area range to be used and click the [OK] button.
5.2.4 Option [Option] sets detailed conditions for each device, such as erase time, write time, and convergence time. These conditions are set to the default values when the parameter file is loaded. Unless otherwise specified, use the default values. If incorrect values are specified, the service life of the device may be shortened or the device may be damaged.
5.2.6 Connection Port The [Connection Port] command sets a port for communication with the PG-FP3. This command is used to change the baud rate or communication port of the host when RS-232C is used. Click [Connection Port] on the [Setting] pull-down menu to execute this command. When the command is executed, the following dialog box opens, allowing you to set a communication port.
5.3 Procedure When [Procedure] is clicked, the pull-down menu shown below is displayed. This menu lists commands that manipulate the target by erasing, programming, or verifying the target. 5.3.1 Download HEX [Download HEX] downloads the user program loaded into FLASHPRO3 with [Load File] to the PG-FP3. The progress of downloading is displayed in the log window.
5.3.2 Erase [Erase] erases the flash memory. Use this command to keep the device with the flash memory erased. To program the flash memory erased by this command, use the [Program] command. A device that has been just delivered to you is blank and can be programmed without having to be erased.
5.3.3 Program The [Program] command writes the data sent from the writer into the flash memory. Then, the command verifies whether the write level is secured. Use this command when writing a delivered device for the first time or when writing a microcontroller kept with its flash memory erased.
The verification is made in either of the following two methods. The PG-FP3 automatically executes the verification in the method that matches the target device. <1> Re-sends the written data from the PG-FP3 and verifies the data written in the flash memory against the re-sent data.
5.3.4 Verify The [Verify] command sends the written data from the PG-FP3 and verifies the data written in the flash memory against the sent data. This command does not check the write level. Use this command to check whether data communication between the PG-FP3 and the microcontroller with flash memory has been normally performed.
5.3.5 E.P.V. The [E.P .V.] command makes a blank check. If the result is OK, the [Program] command is executed. If the check finds an error, the [Erase] command and [Program] command are executed in that order. When writing a delivered device for a second or subsequent time, use this command. If the user does not know whether the device has been erased, use this command to write the device.
5.4 Other When [Other] is clicked, the pull-down menu shown below is displayed. This menu mostly lists ancillary function commands. 5.4.1 Signature The [Signature] command reads the signature information of the target device. Execute this command by selecting [Signature] from the [Other] pull-down menu. When it is executed, the signature information is displayed in the log window as shown at the right.
5.4.3 Dump HEX [Dump HEX] uploads the user program stored on the PG-FP3 to FLASHPRO3 (host side). The uploaded data can be checked by using the [Edit] command. Execute this command by selecting [Dump HEX] from the [Other] pull-down menu or by clicking the button on the operation screen.
5.4.4 Supply Status The [Supply Status] command checks the status of the target power supply (V executed, the status of the target is displayed in the log window. Execute this command by selecting [Supply Status] from the [Other] pull-down menu. Use this command to check the status of the target when the target power supply is used, as when data is written on-board.
The stand-alone function erases, programs, or verifies data with the PG-FP3 alone, without the use of a host. This function is used on a production line when the application system is mass-produced, or used to upgrade a customer’s version. 6.1 FUNCTION The commands that can be executed in stand-alone mode are as follows: Program command Erase command...
6.2 OPERATION The PG-FP3 can execute the E.P .V., ERASE, PROGRAM, VERIFY, and PROM Load commands in the stand-alone mode. For processing and using the commands, see Chapter 5. In standalone mode, it is not necessary to connect to a host. However, a parameter file must be loaded from the host and TYPE setting must be performed by the host in advance.
CHAPTER 7 HARDWARE SPECIFICATIONS 7.1 PRODUCT CONFIGURATION AND OPERATING ENVIRONMENT Table 7-1. Product Configuration and Operating Environment Item Note Power supply Power consumption Dimensions Weight Operating environment Storage environment Note Do not use any power supply other than the AC adapter supplied as an accessory. Specification 9.0 V, 2.0 A (AC adapter input, plug: 5.5 DIA, center: "+") Maximum value: Approx.
7.2 MASTER ROM SOCKET SPECIFICATIONS Usage Mount the master ROM, which downloads the user program, in the 32-pin socket on the top of the PG-FP3. Mount the PROM to which a program has been written in the master ROM socket and execute from the FLASHPRO3 the command that downloads data from the master ROM.
CHAPTER 7 HARDWARE SPECIFICATIONS [Operation from PG-FP3] Mount the PROM in the master ROM socket of the PG-FP3. Photo 7-2. Mounting the PROM in the Master ROM Socket Press the MODE key. Make sure that only the Load LED lights (Load mode). In Load mode, press the ENTER key.
Supported ROM specifications Only an EPROM with 32 or fewer pins and the pin configuration shown below can be used as the master ROM. When the master ROM is accessed, the signature of the PROM is read to check whether the PROM is supported.
7.3 HOST INTERFACE There are two types of host interfaces: the RS-232C interface and the printer interface. Select either using the I/F SELECT switch. When the PG-FP3 is started, the software identifies the switch setting. Note that once an interface has been selected, it cannot be changed until power is turned off and then back on again. 7.3.1 Printer Interface Specifications The printer interface uses the parallel port provided on most personal computers as standard.
[Pin layout] IN/OUT IN/OUT IN/OUT IN/OUT IN/OUT IN/OUT IN/OUT IN/OUT IN/OUT CHAPTER 7 HARDWARE SPECIFICATIONS Compatible mode Busy Select Nack Nfault PError Data 1 (Least Significant Bit) Data 2 Data 3 Data 4 Data 5 Data 6 Data 7 Data 8 (Most Significant Bit) Ninit Nstobe NselectIn...
7.3.2 RS-232C Interface Specifications The specifications of the RS-232C interface are as follows: Item Interface connector Connection Baud rate Communication settings If the RS-232C interface is selected when the PG-FP3 starts, the default baud rate of 9600 bps is set. Unless the baud rate of the application is also 9600 bps on startup, the PG-FP3 cannot connect to the host, possibly causing the Connection Port error dialog box to open.
[Pin layout] Signal name IN/OUT CHAPTER 7 HARDWARE SPECIFICATIONS Specification Common signal line Serial data input Serial data output Data control signal input Data control signal output Data control signal output (not used) Common signal line Data control signal output (not used) Data control signal input (not used) User's Manual U13502EJ2V0UM00...
7.4 TARGET INTERFACE SPECIFICATIONS The target interface has signals such as GND, SI, SO, SCK, CLK, _RESET, V used to connect the target. For the information on the required signal lines, refer to the user's manual for each device. The PG-FP3 comes with two types of cables that can be used to connect the target. Use of these cables is recommended.
7.4.1 Interface Specifications Use the target interface connector to interface with the target. Bear in mind the following points when connecting the target and designing the target board. Supply voltage and operating clock of target Basically, supply the power and operating clock to the microcontroller from the target board when programming its flash memory.
PG-FP3 pins not wired Keep in mind the following points: Open the CLK signal of the PG-FP3 to supply a clock to the microcontroller from the target. Open the SCK signal when using a UART. Open the SO signal when using IIC. Open the HS signal when not using SIO + handshaking.
CHAPTER 7 HARDWARE SPECIFICATIONS [Cable specifications] Two types of target interface cables (IC clip type (TYPE 1) and connector type (TYPE 2)) are supplied. Use the appropriate cable for the situation. If the supplied cables cannot be used because of the specifications of the target and the user prepares a cable, keep the cable length to within 40 cm and use materials with frequency characteristics equivalent to those of the supplied cables.
7.4.2 Equivalent Circuit and Load Condition The interface equivalent circuit between the PG-FP3 and the target and the load condition that must be satisfied by the target are as follows: SI I/O pin SO and RESET output pins CLK output pin CHAPTER 7 HARDWARE SPECIFICATIONS Comparator 74LS07...
APPENDIX A NOTES ON DESIGNING A TARGET Design a board using a flash microcontroller if you want to study the possibility of on-board writing. Pin processing The target may have pins that require special processing when the mode is changed from normal operating mode to flash memory programming mode, or pins that go to high-impedance during programming.
The revision history of this manual is listed below. The applicable chapter column indicates the chapters in the corresponding edition. Edition Second edition The setting of the baud rate in the RS-232C interface specifications and the capacity for downloading the user program have been changed. The PG-FP3 system organization has been changed.
Facsimile From: Name Company Tel. Address North America NEC Electronics Inc. Corporate Communications Dept. Fax: 1-800-729-9288 1-408-588-6130 Europe NEC Electronics (Europe) GmbH Technical Documentation Dept. Fax: +49-211-6503-274 South America NEC do Brasil S.A. Fax: +55-11-6465-6829 I would like to report the following error/make the following suggestion: Document title: Document number: If possible, please fax the referenced page or drawing.