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
Loading...
+ 37 hidden pages