Zilog Z51F6412 User Manual

Z8051™ Family of 8-Bit Microcontrollers
Z51F6412 Development Kit
User Manual
UM025901-1112
Copyright ©2012 Zilog, Inc. All rights reserved.
www.zilog.com
Z51F6412 Development Kit
Warning:
User Manual
DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS.
LIFE SUPPORT POLICY
ZILOG’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS PRIOR WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL COUNSEL OF ZILOG CORPORATION.
As used herein
Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b) support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling can be reasonably expected to result in a significant injury to the user. A criti­cal component is any componen t in a li fe supp ort device o r syste m whose failure to p erform ca n be re ason­ably expected to cause the failure of the life support device or system or to affect its safety or effectiveness.
ii
Document Disclaimer
©2012 Zilog, Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. ZILOG, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. ZILOG ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL PROPERTY INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The information contained within this document has been verified according to the general principles of electrical and mechanical engineering.
Z8051 is a trademark or registered trademark of Zilog, Inc. All other product or service names are the property of their respective owners.

Revision History

Each instance in the Revision History table below reflects a change to this document from its previous version.
Revision
Date
Dec 2012
Level Description Page
01 Original issue. N/A
Z51F6412 Development Kit
User Manual
iii
UM025901-1112 Revision History

Table of Contents

Revision History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .iii
List of Figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Kit Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Supported Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Z51F6412 Development Board Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Z51F6412 Development Board Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Install the Z8051 OCD Software and Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Z8051 OCD Driver Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
FTDI USB-to-UART Driver Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Z51F6412 Development Kit
User Manual
iv
Configure the Z8051 OCD and Z51F6412 Development Board . . . . . . . . . . . . . . . . . . . 16
Build and Run the Z51F6412 Demo Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Using the Keil µVision IDE on a Demo Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
HyperTerminal Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Sample Projects and Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Schematic Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Customer Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
UM025901-1112 Table of Contents

List of Figures

Figure 1. The Z51F6412 Development Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 2. Z51F6412 Development Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Figure 3. Block Diagram of the Z51F6412 Development Board . . . . . . . . . . . . . . . . . 3
Figure 4. Z51F6412 Development Board: Highlighted Components . . . . . . . . . . . . . . 5
Figure 5. Install Device Driver Dialog, Windows 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 6. Unsuccessful Installation, Scenario 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 7. Unsuccessful Installation, Scenario 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 8. Browse For Driver Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . . . . 10
Z51F6412 Development Kit
User Manual
v
Figure 9. Can’t Verify Publisher Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . 11
Figure 10. Successfully Installed Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . 12
Figure 11. Device Manager Dialog, Windows 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 12. A Successful USB-to-UART Driver Installation . . . . . . . . . . . . . . . . . . . . . 15
Figure 13. Connecting the 10-Circuit Cable to the Board . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 14. Connecting the USB Mini-B Cable to the Board . . . . . . . . . . . . . . . . . . . . 17
Figure 15. An Example Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 16. Initial OCD Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 17. Object File Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 18. Configuration Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 19. A Typical On-Chip Debugger Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 20. A Typical On-Chip Debugger Window with Child Windows Open . . . . . . 24
Figure 21. Reset & Go Toolbar Icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 22. Selecting the Demo Project File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 23. Selecting the Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 24. Selecting the Target Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 25. Configuring the Debug Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 26. Configuring the Flash Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 27. Load Application at Startup Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 28. Beginning a Debug Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
UM025901-1112 List of Figures
Z51F6412 Development Kit
User Manual
Figure 29. A Default Debug Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 30. Demo Program Menu in HyperTerminal . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 31. Z51F6412 Development Board, #1 of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Figure 32. Z51F6412 Development Board, #2 of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 33. Found New Hardware Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . 39
Figure 34. Install Device Driver Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 35. Couldn’t Find Driver Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 36. The Found New Hardware Wizard Welcome Screen . . . . . . . . . . . . . . . . . 42
Figure 37. The Found New Hardware Wizard’s Browse Screen . . . . . . . . . . . . . . . . . 43
Figure 38. Selecting A Target Driver For Flash Programming . . . . . . . . . . . . . . . . . . . 45
vi
Figure 39. Configuring Additional Flash Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Figure 40. The Keil IDE Flash Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
UM025901-1112 List of Figures

List of Tables

Table 1. Z51F6412000ZCOG Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Table 2. Z51F6412 Development Kit Sample Projects . . . . . . . . . . . . . . . . . . . . . . . 35
Table 3. Z51F6412 Development Kit Documentation . . . . . . . . . . . . . . . . . . . . . . . 35
Z51F6412 Development Kit
User Manual
vii
UM025901-1112 List of Tables

Introduction

This manual describes how to set up Zilog’s Z51F6412 Development Kit (Zilog part num­ber Z51F6412000ZCOG) and use it to evaluate your Z8051-based designs and applica­tions.
The Kit features a development board consisting of five LEDs, five pushbuttons, a buzzer, port pin headers and a UART-to-USB port. The Board features the Z51 F6412 MCU in an 80-pin LQFP package, plus a DBG connector to connect the Board to a host development PC using the Z8051 USB On-Chip Debugger (OCD) cable. For more details about the Z51F6412 MCU, please refer to the Z51F6412 Product Specification (PS0303)
This document guides you through the following tasks:
Install the Z8051 OCD Software and Documentation – see page 6
Z51F6412 Development Kit
User Manual
1
.
Configure the Z8051 OCD and Z51F6412 Development Board – see page 16
Build and Run the Z51F6412 Demo Project – see page 19
Figure 1 shows an image of the Z51F6412 Development Kit.
Figure 1. The Z51F6412 Development Kit
UM025901-1112 Introduction

Kit Contents

Table 1 lists the contents of the Z51F6412 Development Kit.
Item Description Quantity
1 Z51F6412 Development Board 1 2 Z8051 USB On-Chip Debugger (OCD) 1 3 Z8051 OCD Target Cable (10ckt) 1 4 USB Cable: A (male) to Mini-B 2 5 Z51F6412 Development Kit Insert (FL0150) 1
Z51F6412 Development Kit
User Manual
2
Table 1. Z51F6412000ZCOG Contents
Figure 2 shows an image of the Z51F6412 Development Board.
Figure 2. Z51F6412 Development Board
UM025901-1112 Introduction
Z51F6412 Development Kit

Supported Operating Systems

The Z51F6412 Development Board and the Z8051 On-Chip Debugger support the fol low­ing operating systems:
Microsoft Windows XP
Microsoft Windows Vista (32-bit/64-bit)
Microsoft Windows 7 (32-bit/64-bit)

Z51F6412 Development Board Block Diagram

Figure 3 shows a block diagram of the Z51F6412 Development Board.
User Manual
3
Figure 3. Block Diagram of the Z51F6412 Development Board

Z51F6412 Development Board Description

The Z51F6412 Development Board consists of the following components:
Z51F6412: U2, 80-pin LQFP chip
3 LEDs: Green (D2), Red (D3) and Yellow (D4) connected to the GPIO pins of the
Z51F6412 MCU
1 green LED to indicate USB power: D5
UM025901-1112 Introduction
Z51F6412 Development Kit
User Manual
1 red LED to indicate an overcurrent condition: D6
5 pushbuttons:
SW1: RESET
SW2–SW5: connected to the GPIO pins of the Z51F6412 MCU
USB connector: P1
OCD connector: J3
USB-to-UART interface: U5
USB interface providing power and communication to the Board through adjustable
LD0: U3
Power supply level that can be adjusted with potentiometer R20
4
Overcurrent protection circuit on the Board: U4 and D6
External source of reference voltage (2.5 V) for the on-chip ADC: VR1
MCU current consumption measurement resistor R2 with test points J1 and J2
Buzzer: U1
Test points and headers
The Z51F6412 Development Board, with its key components highlighted, is shown in Figure 4.
UM025901-1112 Introduction
Z51F6412 Development Kit
User Manual
5
Figure 4. Z51F6412 Development Board: Highlighted Components
If a short on the Board should occur, or if its attached component(s) require more than 500 mA, the overcurrent protection functionality will trigger the red LED D6 to illuminate. In this instance, power to the Board will be terminated, and the USB port of the PC will be protected from shorting.
Schematic diagrams of the Z51F6412 Development Board are presented on pages 37 and
38 of this document.
The physical dimensions of the Board are 4.01" x 2.50" (101.8 mm x 63.5 mm).
UM025901-1112 Introduction
Z51F6412 Development Kit
Note:
Note:

Install the Z8051 OCD Software and Document ation

The Z8051 On-Chip Debugger (OCD) interface is the interface by which your PC will communicate with the Z51F6412 MCU to download and execute code. In addition to the OCD, software such as development tools and sample applications will be installed.
If you have already downloaded the Z8051 software and documentation from the Zilog Store and installed it following the procedure on the paper insert in your kit (FL0150), skip this section, and proceed to the Z8051 OCD Driver Installation section, below.
User Manual
6
Observe the following procedure to install the Z8051 On-Chip Debugger software and documentation on your computer.
1. Ensure that the OCD interface hardware is not connected to your PC.
2. In a web browser, download the Z8051 Software and Documentation v2.1 or later
from the Zilog Store
drive and double-click to launch the installation file named
3. From the main menu, select
lowing options:
If you do not plan to use the Keil µVision4 IDE, select
SDCC
.
If you will be using the Keil µVision4 IDE, select
µVision4 IDE Debugging Support
If you only plan to use the programming features and do not plan to perform any
development, select
To install all files, select
In this filename, <version_number> refers to the version number of the OCD Software and Documentation release. For example, this version number may be 2.1.
. When the download is complete, unzip the file to your hard
Z8051_<version>.exe.
Go to the installation page, then select one of the fol-
Zilog OCD + Samples +
Zilog OCD + Samples + Keil
.
Zilog OCD.
All of the above.
4. Follow the on-screen instructions to complete the OCD software installation.
UM025901-1112 Install the Z8051 OCD Software and Documentation

Z8051 OCD Driver Installation

Note:
The driver programs for the Z8051 On-Chip Debugger are copied du ring the software and documentation installation. In the following procedure for PCs running t he W indows 7 32­and 64-bit operating systems, ensure that the target side of the OCD will remain uncon­nected while you install these drivers.
If you are running Windows Vi sta, see Appendix A on page 39 to install your device driv­ers. If you are running Windows XP, see Appendix B on page 42.
1. Connect the OCD hardware to the USB port of your PC by connecting the A (male)
end of one of the two USB A (male)-to-Mini-B cables with the host PC’s USB port.
Connect the Mini-B end to the OCD device.
Z51F6412 Development Kit
User Manual
7
2. After the PC detects the new hardware, it will display the Installing device driver soft-
ware dialog shown in Figure 5.
Figure 5. Install Device Driver Dialog, Windows 7
IMPORTANT NOTE: If you should encounter the scenarios indicated in Figures 6 or 7, right-click your
mouse on select
ZILOG OCD I/F (highlighted in Figure 6) or Unknown device (highlighted in Figure 7) and
Update Driver Software...
UM025901-1112 Install the Z8051 OCD Software and Documentation
Z51F6412 Development Kit
User Manual
8
Figure 6. Unsuccessful Installation, Scenario 1
UM025901-1112 Install the Z8051 OCD Software and Documentation
Z51F6412 Development Kit
User Manual
9
Figure 7. Unsuccessful Installation, Scenario 2
UM025901-1112 Install the Z8051 OCD Software and Documentation
Z51F6412 Development Kit
User Manual
3. Select Browse my computer for driver software (advanced) to display the dialog
shown in Figure 8, which prompts you to key in or browse for the location of the
file. Depending on the type of computer you use (32- bit or 64-bit), use the
button to navigate to one of the following paths, then click the
Next button.
.inf
Browse
On 32-bit machines, use the following path:
<Z8051 Installation>\Z8051_<version_number>\device drivers\OCD USB\x32
On 64-bit machines, use the following path:
<Z8051 Installation>\Z8051_<version_number>\device drivers\OCD USB\x64
10
Figure 8. Browse For Driver Dialog, Windows Vista
UM025901-1112 Install the Z8051 OCD Software and Documentation
Z51F6412 Development Kit
User Manual
4. When Windows prompts you whether to install or not install, as shown in Figure 9,
Install this driver software anyway and wait until the installation is completed
click
(Windows may prompt you more than once).
11
Figure 9. Can’t Verify Publisher Dialog, Windows Vista
5. When the installation is complete, the screen shown in Figure 10 will appear. Click
Close to exit the OCD driver installation.
UM025901-1112 Install the Z8051 OCD Software and Documentation
Z51F6412 Development Kit
Note:
User Manual
12
Figure 10. Successfully Installed Dialog, Windows Vista
On some installations, the Found New Hardware screen shown in Figure 10 may also dis­play the text string,
Zilog Z8051 USB OCD - No Firmware. This occurrence is normal
and can be disregarded.
6. If Zilog Z8051 USB OCD appears in the Device Manager (as highlighted in
Figure 11), the OCD driver software has been successfully installed.
UM025901-1112 Install the Z8051 OCD Software and Documentation
Z51F6412 Development Kit
User Manual
13
Figure 11. Device Manager Dialog, Windows 7
UM025901-1112 Install the Z8051 OCD Software and Documentation

FTDI USB-to-UART Driver Installation

Note:
An FTDI USB-to-UART driver is required to allow your PC to communicate th ro ugh its USB port to the on-chip UART of the Z51F6412 MCU. Observe the following procedu re to perform these connections.
1. Ensure that the USB cable is not plugged in to the Z51F6412 Development Board’s P1
connector.
Z51F6412 Development Kit
User Manual
14
2. Navigate to the following filepath and double-click the
CDM20802_setup.exe file to
begin the driver installation.
<Z8051 Installation>\Z8051_<version_number>\device drivers\FTDI Uart
3. The installation process will begin and you should observe output similar to the fol-
lowing messages on the screen of your PC:
32-bit OS detected
<installation path>\dpinstx86.exe
Installation driver
FTDI CDM driver installation process completed.
The above message may appear for a short time, but will then disappear from your window. This occurrence is normal.
4. When the installation is complete, plug in the Mini-B connector of the second USB
cable into the Board, and the larger A connector into the USB port of your PC. Refer
to Figure 15
on page 18 for guidance.
5. If the driver installation was successful, the Ports (COM & LPT) section of the Device
Manager will display USB Serial Port (COMx) or similar message, as highlighted in
Figure 12.
UM025901-1112 Install the Z8051 OCD Software and Documentation
Z51F6412 Development Kit
Note:
User Manual
15
Figure 12. A Successful USB-to-UART Driver Installation
To launch the Device Manager on W ind ows 7 systems, launch the Start menu, enter device manager in the
Search programs and files field, and press the Enter key.
To open the Device manager on earlier Windows systems, navigate via the following path:
Start Control Panel System Hardware Device Manager Ports (COM& LPT)
UM025901-1112 Install the Z8051 OCD Software and Documentation
Z51F6412 Development Kit
Caution:
User Manual

Configure the Z8051 OCD and Z51F6412 Development Board

Observe the following procedure to set up and configure the Z8051 On-Chip Debugger and the Z51F6412 Board.
Steps number 1 to 4 present the power-up sequence. Carefully follow these steps to avoid encountering an improper connection or disconnection.
1. Connect the Z8051 On-Chip Debugger (OCD) to the host PC’s USB port.
16
2. Connect one end of the 10-circuit cable to the Z8051 OCD.
3. Connect the other end of the 10-circuit cable connector to the Board’s J3 connector.
Pin 1 of the cable connector is indicated by a red stripe, as shown in Figure 13.
Figure 13. Connecting the 10-Circuit Cable to the Board
UM025901-1112 Configure the Z8051 OCD and Z51F6412 De velopment
Z51F6412 Development Kit
User Manual
4. Using the second USB-to-Mini-B cable, connect the standard USB end to the host
PC’s USB port.
5. Connect the other end of this second Mini-B cable to the Z51F6412 Board’s P1 con-
nector to apply power to the Board. Note that the green LED D5 is ON; see Figure 14.
17
Figure 14. Connecting the USB Mini-B Cable to the Board
Figure 15 shows an example of a completed hardware and software setup.
UM025901-1112 Configure the Z8051 OCD and Z51F6412 De velopment
Z51F6412 Development Kit
User Manual
18
Figure 15. An Example Setup
UM025901-1112 Configure the Z8051 OCD and Z51F6412 De velopment
Z51F6412 Development Kit
Note:
Note:
Note:

Build and Run the Z51F6412 Demo Project

Observe the following procedure to build and run the Z51F6412 demo project.
If you plan to use the Keil µVision IDE, please skip to the the Using the Keil µVision IDE
on a Demo Project section on page 25.
User Manual
19
1. Browse to the following location and double-click the
build the project:
<Z8051 Installation>\Z8051_<version_number>\samples\Z51F6412\Demo\build_sdcc.bat
Refer to the Z8051 Tools Product User Guide (PUG0033) for additional information about these project files and Small Device C Compiler (SDCC) development tools.
2. When the build is complete, the command window will prompt the user to press any
key to continue. Proceed by pressing any key on your keyboard; as a result, a hex file
for the demo will be created in the following path:
<Z8051 Installation>\Z8051_<version_number>\samples\Z51F6412\Demo\demo.hex
3. Set up the OCD and Development Board. If you have not already configured these
items, please return to the Configure the Z8051 OCD and Z51F6412 Development
Board section on page 16.
4. Run the Z8051 OCD software. From the
Zilog Z8051 Software and Documentation <version_number>
OCD <version_number>
shown in Figure 16.
. Once launched, the program will display Connected, as
Start menu, navigate to All Programs
build_sdcc.bat batch file to
Zilog Z8051
If you encounter a message that says Disconnected, return to the Configure the Z8051
OCD and Z51F6412 Development Board section on page 16 to configure the proper
power-up sequence. If the problem persists, Zilog recommends that you review the Z8051
OCD Driver Installation and FTDI USB-to-UART Driver Installation sections.
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
Note:
User Manual
20
Figure 16. Initial OCD Screen
For a free download of the latest version of the OCD software, visit the Zilog website and navigate via the Tools and Software menu to Software Downloads.
5. In the Debugger window, select
Load Hex from the File menu to display the Object
File dialog, which is shown in Figure 17.
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
User Manual
21
Figure 17. Object File Dialog
6. In the Object File dialog, browse to the hex file that you created in Step 2 and click
Open.
7. Click the
UM025901-1112 Build and Run the Z51F6412 Demo Project
Download button to open the Configuration dialog box, shown in Figure 18.
Z51F6412 Development Kit
User Manual
22
Figure 18. Configuration Dialog
8. Click the Write button to open the Configuration Is Changed dialog.
9. Click
OK to open the On-Chip Debugger’s main window. A typical OCD display is
shown in Figure 19; Figure 20 shows an OCD window with child windows open.
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
User Manual
23
Figure 19. A Typical On-Chip Debugger Window
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
Note:
User Manual
24
Figure 20. A Typical On-Chip Debugger Window with Child Windows Open
Use the View menu to open the child windows. For this demonstration, the example win­dows shown in Figure 20 do not need to be opened.
10. Click the
Reset & Go toolbar icon, shown in Figure 21. As a result, LEDs D2, D3 and
D4 on the Z51F6412 Board will blink in sequence.
Figure 21. Reset & Go Toolbar Icon
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
Note:
Notes:
Similar projects that you can use as references are listed in Table 2 on page 35.

Using the Keil µVision IDE on a Demo Project

Zilog’s On -Ch ip Debu gg er h ardware n ow fu lly supports the Keil µVision IDE. Our target driver is seamlessly integrated with the Keil debugger, allowing Keil C51 users to work within the µVision4 environment without switching between the Keil compiler and Zilog’s external OCD software. In the demo project example that follows, the Z51F6412 MCU-related project is referenced as
This document refers to the Keil µVision IDE V4.53.0.6 (PK51 Prof. Developers Kit) or later.
Demo.
User Manual
25
Refer to the Z8051 T ools Product User Guide (PUG0033)
for additional information about
these project files and debugging with the Keil µV ision IDE and Zilo g On-Chip Debugger.
Debugger Configuration
Observe the following procedure to build and run a Z51F6412 demonstration project using the Keil µV ision IDE.
1. Start the Keil µVsion4 IDE.
2. From the
<Installation directory>\Z8051_<version>\samples\Z51F6412\Demo
3. Select the Demo.uvproj file and click Open; see Figure 22.
Project menu, select Open Project and navigate to the following filepath:
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
User Manual
26
Figure 22. Selecting the Dem o Proj ec t Fi le
4. Return to the Project menu and select Options for Target ‘Demo’.
5. In the Options for Target ‘Demo’ dialog that appears, click the
Device tab and ensure
that your target is properly selected for your project, as illustrated in Figure 23.
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
User Manual
27
Figure 23. Selecting the Target
6. After selecting the target, click the Debug tab and select the Zilog Z8051 Target
Driver
from the Use: drop-down menu, as highlighted in Figure 24.
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
User Manual
28
Figure 24. Selecting the Target Driver
7. Click the Settings button, located to the right of this drop-down menu, to configure
your Debug and Flash options. The Settings dialog is displayed with the Debug
Options tab appearing by default, as shown in Figure 25.
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
Notes:
User Manual
29
Figure 25. Configuring the Debug Options
When configuring the appropriate Debug option, be aware of the following stipulations:
Checking the Peripheral continues running option means that the timers used in
your project will run while the processor is stopped by the debugger.
The Reset at Main option will only work if you have a main file in your project; oth-
erwise you should deselect this option.
8. Click the Flash Options tab. The Flash Options Settings dialog will appear, as shown
in Figure 26. To select the proper options for Flash programming, refer to the
Z51F6412 Product Specification (PS0303)
UM025901-1112 Build and Run the Z51F6412 Demo Project
.
Z51F6412 Development Kit
User Manual
30
Figure 26. Configuring the Flash Options
9. Click OK to exit the Settings dialog.
10. From the
Options for Target ‘Demo’ dialog, select the Load Application at Startup
checkbox, as shown in Figure 27, the so that the IDE will download the code upon
connection. There is no need to select or enter an initialization file.
Figure 27. Load Application at Startup Settings
11. Click
12. From the
UM025901-1112 Build and Run the Z51F6412 Demo Project
OK to exit the Options for Target ‘Demo’ dialog.
Project menu, select Rebuild All to rebuild all target files.
Z51F6412 Development Kit
User Manual
13. Start your debugging session by clicking the Start/Stop Debug Session icon, as indi-
cated in Figure 28. A default Windows configuration of the debug session is shown in
Figure 29.
Figure 28. Beginning a Debug Session
31
Figure 29. A Default Debug Session
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
Note:
Note:
Note:
User Manual
The following buttons in the Keil µV ision IDE are not supported by the Zilog OCD d river:
T o learn more about the full functionality of the Keil µVision IDE, please refer to the Keil Keil µVision4 IDE documentation.
32
14. From the
Debug menu, select Run, or simply press the F5 key on your Windows key-
board to run the demo project. As a result, LEDs D2, D3 and D4 on the Z51F6412
Development Board will blink in sequence.
15. To stop code execution, select
Stop from the Debug menu.
16. To stop your debugging session, click the
Refer to Appendix C on page 45 for a discussion of Stand-Alone Flash Programming Using the Keil µVision IDE.

HyperTerminal Configuration

A communications program such as HyperTerminal can be used on Windows XP systems to view the messages from the Z51F6412 Development Board. The following procedure examines how to configure HyperTerminal for the Z51F6412 demo project.
The HyperT ermi nal application is not availabl e in Windows V ista and Windows 7 systems. If you are using either of these operating systems, consider using/installing different com­munication software, such as Tera Term. Please refer to the documentation for the particu­lar emulation software you use to configure it for communication with the Z51F6412 Development Board.
Start/Stop Debug Session icon.
1. In HyperT erminal, select the COM port assigned to the USB-to-UART interface cable
that is connected to the P1 connector on the Development Board.
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
Note:
User Manual
This COM port can be determined from the Device Manager, as described in the the FTDI
USB-to-UART Driver Installation section on page 14.
2. Configure this port to reflect the following settings:
9600 bps
8 data bits
No parity
1 stop bit
No flow control
33
3. Click the
Call button to connect to the Z51F6412 Board. Upon connection, you should
be able to see the Demo program menu shown in Figure 30.
Figure 30. Demo Program Menu in HyperTerminal
At this point, you have successfully run the Z51F6412 demo project, but you are welcome to continue evaluating the demo in HyperTerminal. For additional information about how
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit
Note:
User Manual
to create, edit, run and debug this project, please see the Z8051 Tools Product User Guide
(PUG0033) and/or the Z8051 On-Chip Debugger and In-System Programmer User Man­ual (UM0240).
Turn off the power by removing the USB cable from the P1 connector on the Development Board.
34
UM025901-1112 Build and Run the Z51F6412 Demo Project
Z51F6412 Development Kit

Sample Projects and Documentation

A number of sample projects are included on the CD that ships with the Z51F6412 Devel­opment Kit, and their locations, listed in Table 2, will be accessible upon installation.
Table 2. Z51F6412 Development Kit Sample Projects
Description Location
Demo samples\Z51F6412\Demo Led Blink samples\Z51F6412\Led_Blink
samples\Z51F6412\Led_Blink_Asm
User Manual
35
A number of Z8051-related documents are included in the Z51F6412 Development Kit, and their locations, listed in T able 3, will be accessible upon installation. You can also find current versions of each of these documents on the Zilog website
Table 3. Z51F6412 Development Kit Documentation
Description Document Location
Z51F0410 Product Specification PS0295 Documentation\Chip_Documentation Z51F0811 Product Specification PS0296 Documentation\Chip_Documentation Z51F3220 Product Specification PS0299 Documentation\Chip_Documentation Z51F3221 Product Specification PS0300 Documentation\Chip_Documentation Z51F6412 Product Specification PS0303 Documentation\Chip_Documentation Z51F0410 Product Brief PB0237 Documentation\Chip_Documentation Z51F0811 Product Brief PB0238 Documentation\Chip_Documentation Z51F3220 Product Brief PB0239 Documentation\Chip_Documentation Z51F3221 Product Brief PB0240 Documentation\Chip_Documentation Z51F6412 Product Brief PB0241 Documentation\Chip_Documentation Z8051 OCD and ISP User Manual UM0240 Documentation\Tools_Documentation Z51F0410 Evaluation Kit User Manual UM0257 Documentation\Tools_Documentation
.
Z51F0811 Evaluation Kit User Manual UM0242 Documentation\Tools_Documentation Z51F3220 Development Kit User Manual UM0243 Documentation\Tools_Documentation Z51F3221 Development Kit User Manual UM0258 Documentation\Tools_Documentation
UM025901-1112 Sample Projects and Documentation
Z51F6412 Development Kit
User Manual
Table 3. Z51F6412 Development Kit Documentation (Continued)
Description Document Location
Z51F6412 Development Kit User Manual UM0259 Documentation\Tools_Documentation Z8051 Tools Product User Guide PUG0033 Documentation\Tools_Documentation
36
UM025901-1112 Sample Projects and Documentation

Schematic Diagrams

Layout circuit near to MCU
SW4SW2
DSCL
LED1
LED2
LED3
SW3
DSDA
SW1
DSCL DSDA
P00
P01
P15/INT5 P14/INT4 P13/INT3 P12/INT2 P11/INT1 P10/INT0 SW4 SW3 SW2 SW1 P07 P06
P31/AN9 P30/AN8 P27/AN7
P77 LED3 LED2 LED1 P25/AN5 P24/AN4 P23/AN3 P22/AN2 P21/AN1
P17/INT7 P16/INT6
P34/AN12 P35/AN13 P36/AN14 P37 P40 P41 P42 P43 P80 P81
VCC P44 P45 P46 P47
P51 P52 P53/PWM1
P54/PWM2 P55/PWM3 P56/PWM4 P57/PWM5 P60 P61
P64 P65 P66 P67
VCC
LPF
LPF
RxD0 TxD0
RxD1 TxD1
VCC
P00 P06 P10/INT0 P12/INT2 P14/INT4 P16/INT6
P25/AN5
P30/AN8 TxD1 P34/AN12 P36/AN14 P40 P42 P80 P44 P46
GND GND
VCC_T
VCC_T
P22/AN2 P24/AN4
P52 P54/PWM2 P56/PWM4 P60 P64 P66
VCC_T VCC_T P01
P21/AN1 P23/AN3
P51 P53/PWM1 P55/PWM3 P57/PWM5 P61 P65 P67
P07 P11/INT1 P13/INT3 P15/INT5 P17/INT7
P77 P27/AN7 P31/AN9 RxD1 P35/AN13 P37 P41 P43 P81 P45 P47
GND GND
VCC_T
VCC
VCC_TVCC_T
VCC_T
VCC_TVCC_T
VCC_T
VCC_T
VCC_T
VCC_T
VCC_T
RxD0
TxD0
Zilog Confidential All Rights Reserved
Zilog Confidential All Rights Reserved
Zilog Confidential All Rights Reserved
C5
18pF
C2
0.1uF
C4
18pF
J1
1
D1 LL4148
2 1
J4
HDR/PIN 2x30
1 3 5 7
9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 5960
58
56
54
52
50
48
46
44
42
40
38
36
34
32
30
28
26
24
22
20
18
16
14
12
10
8
6
4
2
R2 1 ohm
R11
470
VR1
2.5V
1
2
3
R7
1K
R10
470
R8
180K
R9
470
R15
49.9K
C1
0.1uF
R1
200
D4
YELL
2 1
J2
1
R14
49.9K
R6
49.9K
D3
RED
2 1
R3
2.2K
R5 10K
D2
GREEN
2 1
R13
49.9K
SW2
B3U-1000P
1 2
R12
49.9K
SW5
B3U-1000P
1 2
Y2
32.768KHZ
J3
HDR/PIN 2x5
1 2 3 4 5 6 7 8 9 10
SW3
B3U-1000P
1 2
1
2
4
3
U2
Z51F6412
P00/PCI00/USS0
1
P01/PCI01/ACK0
2
P02/PCI02/TxD0
3
P03/PCI03/RxD0
4
P04/PCI04/SUBXIN
5
P05/PCI05/SUBXOUT
6
P06/PCI06/SCL
7
P07/PCI07/SDA
8
P70/PCI70
9
P71/PCI71
10
P72/PCI72
11
P73/PCI73
12
P10/INT0
13
P11/INT1
14
P12/INT2
15
P13/INT3
16
P14/INT4
17
P15/INT5
18
VSS
19
VDD
20
P16/INT6
21
P17/INT7
22
P20/AN0/AVREF
23
P21/AN1
24
P22/AN2
25
P23/AN3
26
P24/USS3/AN4
27
P25/ACK3/AN5
28
P74/PCI74
29
P75/PCI75
30
P76/PCI76
31
P77/PCI77
32
VSS
33
VDD
34
P26/TxD3/AN6
35
P277/RxD3/AN7
36
P30/USS1/AN8
37
P31/ACK1/AN9
38
P32/TxD1/AN10
39
P33/RxD1/AN11
40
AN12/SSS0/P34
41
AN13/SCK0/P35
42
AN14/MOSI0/P36
43
MISO0/P37
44
USS2/P40
45
ACK2/P41
46
TxD2/P42
47
RxD2/P43
48
P80
49
P81
50
VSS1
51
VDD1
52
SSS1/P44
53
SCK1/P45
54
MOSI1/P46
55
MISO1/P47
56
BUZ/P50
57
EC0/P51
58
T0/P52
59
(PWM1)T1/P53
60
(PWM2)T2/P54
61
(PWM3)T3/P55
62
(PWM4)T4/P56
63
(PWM5)T5/P57
64
EC2/P60
65
EC3/P61
66
nRESET
67
EC4/P64
68
EC5/P65
69
P66
70
P67
71
XIN/P62
72
XOUT/P63
73
VSS2
74
LPF
75
VDD2
76
DSCL
77
DSDA
78
nTEST
79
VDD18
80
SW4
B3U-1000P
1 2
U1
CEM1206S
+
1
-
2
R4 10K
C7
250pF
C6
1000pF
Y1 10 MHz
13
2
SW1
B3U-1000P
1 2
C3
0.1uF
Figures 31 and 32 show schematic diagrams of the Z51F6412 Development Board.
Z51F6412 Development Kit
User Manual
37
UM025901-1112 Schematic Diagrams
Figure 31. Z51F6412 Development Board, #1 of 2
Z51F6412 Development Kit
PWR_EN-
VCC_T
RxD0
TxD0
VCC_T
VCC_5V
VCC_5V
VCC_T
RxD0
TxD0
J8
1
R23
4.7K
C8
4.7uF
R22
470
C16
0.1uF
U4
TPS2051B
OUT
1
GND
2
OC
3
EN
4
IN
5
D6
RED
2
1
C9
0.1uF
R19 20K
C12
4.7uF
R17 20K
J9
1
J7
1
L1 FERRITE BEAD
P1
USB, mini B
VBUS
1
DM
2
DP
3
ID
4
GND
5
SH1
6
SH2
7
SH3
8
SH4
9
h1
10
h2
11
C10
1uF
R16
470
R18
1.5K
J5
1
D5
GREEN
2
1
R21
4.75K
C11
1uF
C14
0.01uF
J6
1
C13
0.1uF
R20 20K
1 3
2
U3
MIC5318
GND
2
EN
1
IN
3
ADJ
5
OUT
4
BYP
6
Center Pad
7
C15
0.01uF
U5
FT232RL
USBDM
16
RTS
3
GND1
7
RI
6
NC1
8
DTR
2
VCCIO
4
3v3 OUT
17
NC
24
RESET
19
TXD
1
USBDP
15
CBUS3
14
OSCI
27
OSCO
28
GND218TEST
26
CBUS1
22
GND3
21
DCD
10
CTS
11
DSR
9
RXD
5
CBUS4
12
CBUS2
13
AGND
25
CBUS0
23
VCC
20
R24
100K
User Manual
38
UM025901-1112 Schematic Diagrams
Figure 32. Z51F6412 Development Board, #2 of 2
Z51F6412 Development Kit
User Manual

Appendix A. OCD Driver Installation on Windows Vista Systems

The driver programs for the Z8051 On-Chip Debugger are copied to the development PC during the software and documentation installation. In the following procedure for PCs running Windows Vista 32- and 64-bit operating systems, ensure that the target side of the OCD will remain unconnected while you install these drivers.
1. Connect the OCD hardware to the USB port of your PC by connecting the A (male) end of one of the two USB A (male)-to-Mini-B cables with the development PC’s USB port. Connect the Mini-B end to the OCD device.
2. After the PC detects the new hardware, it will display the Found New Hardware Wiz­ard dialog box, shown in Figure 33. Click
ommended)
.
Locate and install driver software (rec-
39
Figure 33. Found New Hardware Dialog, Windows Vista
3. Depending on your development PC’s User Account Control settings, Windows may ask for permission to continue the installation. Click
UM025901-1112 OCD Driver Installation on Windows Vista Systems
Continue.
Z51F6412 Development Kit
User Manual
4. When the Insert the Disc dialog appears, as shown in Figure 34, select I don’t have
the disc. Show me other options.
Click the Next button to display the dialog that
follows, which is shown in Figure 35.
40
Figure 34. Install Device Driver Dialog, Windows Vista
UM025901-1112 OCD Driver Installation on Windows Vista Systems
Z51F6412 Development Kit
User Manual
41
Figure 35. Couldn’t Find Driver Dialog, Windows Vista
5. Return to page 8 and follow Steps through 6.
UM025901-1112 OCD Driver Installation on Windows Vista Systems
Z51F6412 Development Kit
User Manual

Appendix B. OCD Driver Installation on Windows XP Systems

The driver programs for the Z8051 On-Chip Debugger are copied du ring the software and documentation installation. In the following procedure for Windows XP systems, ensure that the target side of the OCD will remain unconnected while you install these drivers.
1. Connect the OCD hardware to the USB port of your PC by connecting the A-Male end of one of the two USB A (male)-to-Mini-B cables with the host PC’s USB port, and connect the Mini-B end to the OCD device.
42
2. After the PC detects the new hardware, it will display the
ard
dialog box, shown in Figure 36. Select Install from a list or specific location
(Advanced)
; then click Next.
Found New Hardware Wiz-
Figure 36. The Found New Hardware Wizard Welcome Screen
UM025901-1112 OCD Driver Installation on Windows XP Systems
Z51F6412 Development Kit
Note:
User Manual
3. The next dialog box, shown in Figure 37, prompts you to enter a path or navigate to the directory in which the you use (32- bit or 64-bit), use the paths and click the
.inf file was installed. Depending on the type of computer
Browse button to navigate to one of the following
Next button, leaving all other selections at their default settings.
On 32-bit machines, use the following path:
<Z8051 Installation>\Z8051_<version_number>\device drivers\OCD USB\x32
On 64-bit machines, use the following path:
<Z8051 Installation>\Z8051_<version_number>\device drivers\OCD USB\x64
On some installations, the Found New Hardware screen shown in Figure 8 on page 10 may also display the text string,
Zilog Z8051 USB OCD - No Firmware. This occurrence
is normal and can be disregarded.
43
Figure 37. The Found New Hardware Wizard’s Browse Screen
UM025901-1112 OCD Driver Installation on Windows XP Systems
Z51F6412 Development Kit
User Manual
4. When Windows prompts you whether to continue the installation or stop, click the
Continue Anyway button and wait until the installation is completed (Windows may
prompt you more than once). When the installation is complete, click
Finish.
44
UM025901-1112 OCD Driver Installation on Windows XP Systems
Z51F6412 Development Kit
User Manual

Appendix C. Stand-Alone Flash Programming Using the Keil µVision IDE

Observe the following procedure to program Flash memory without debugging.
45
1. From the
Utilities tab. In the Use Target Driver for Flash Programming drop-down menu
within the Configure Flash Menu Command pane, ensure that
Driver
Project menu, open the Options for Target 'your project’, and click the
Zilog Z8051 Target
is selected, as indicated in Figure 38.
Figure 38. Selecting A Target Driver For Flash Programming
2. Click the will appear, as shown in Figure 39.
UM025901-1112 Stand-Alone Flash Programming Using the Keil µVision
Settings button to change any additional Flash options. The Settings dialog
Z51F6412 Development Kit
User Manual
46
Figure 39. Configuring Additional Flash Options
3. After you have selected your Flash options, click OK to exit the Flash Options dia- log.
4. Click
5. From the
OK to exit the Options For Target ‘Demo’ dialog.
Flash menu of the Keil IDE (see Figure 40), select either of the following
options: – Select – Select
Download to program Flash memory with the current project Erase to perform a mass erase of internal Flash memory
Figure 40. The Keil IDE Flash Menu
UM025901-1112 Stand-Alone Flash Programming Using the Keil µVision

Customer Support

To share comments, get your technical questions answered, or report issues you may be experiencing with our products, please visit Zilog’s Technical Support page at http://sup-
port.zilog.com.
To learn more about this product, find additional documentation, or to discover other fac­ets about Zilog product offerings, please visit the Zilog Knowledge Base ticipating in the Zilog Forum
This publication is subject to replacement by a later edition. To determine whether a later edition exists, please visit the Zilog website at http://www.zilog.com
.
Z51F6412 Development Kit
User Manual
47
or consider par-
.
UM025901-1112 Customer Support
Loading...