0
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
创作中心
发布
  • 发文章

  • 发资料

  • 发帖

  • 提问

  • 发视频

创作活动
Z51F3220000ZCOG

Z51F3220000ZCOG

  • 厂商:

    ZILOG(齐洛格)

  • 封装:

    -

  • 描述:

    KIT DEV FOR MCU Z51F32

  • 数据手册
  • 价格&库存
Z51F3220000ZCOG 数据手册
Z8051™ Family of 8-Bit Microcontrollers Z51F3220 Development Kit User Manual UM024307-1112 Copyright ©2012 Zilog®, Inc. All rights reserved. www.zilog.com Z51F3220 Development Kit User Manual ii Warning: 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 critical component is any component in a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness. 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. UM024307-1112 Z51F3220 Development Kit User Manual iii Revision History Each instance in the Revision History table below reflects a change to this document from its previous version. Revision Level Description Page Nov 2012 07 Corrected pin values in Default Jumper Settings table. 6 Sep 2012 06 Replaced incorrect screen in Figure 27. 31 Sep 2012 05 Updates for Z8051 Installation Software release 2.0. 20, 26, 33, 45–46 Apr 2012 04 Updated for improved usability. All Mar 2012 03 Added a G to end of part number to indicate RoHS compliance; added Figure 21. 25 Mar 2012 02 Corrected filepaths in the Build and Run the Z51F3220 Demo Project section. 20 Feb 2012 01 Original issue. Date UM024307-1112 All Revision History Z51F3220 Development Kit User Manual iv Table of Contents Revision History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .iii List of Figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Kit Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z51F3220 Development Board Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Z51F3220 Development Board Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 3 3 4 Install the Z8051 OCD Software and Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Z8051 OCD Driver Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 FTDI USB-to-UART Driver Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Configure the Z8051 OCD and Z51F3220 Development Board . . . . . . . . . . . . . . . . . . . 17 Build and Run the Z51F3220 Demo Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Using the Keil µVision IDE on a Demo Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 HyperTerminal Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Sample Projects and Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Schematic Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 OCD Driver Installation on Windows Vista Systems . . . . . . . . . . . . . . . . . . . . . . . . . 39— OCD Driver Installation on Windows XP Systems . . . . . . . . . . . . . . . . . . . . . . . . . . 42— Stand-Alone Flash Programming Using the Keil µVision IDE . . . . . . . . . . . . . . . . . 45— Customer Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 UM024307-1112 Table of Contents Z51F3220 Development Kit User Manual v List of Figures Figure 1. The Z51F3220 Development Kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Figure 2. Z51F3220 Development Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Figure 3. Block Diagram of the Z51F3220 Development Board . . . . . . . . . . . . . . . . . 4 Figure 4. Z51F3220 Development Board: Highlighted Components . . . . . . . . . . . . . . 5 Figure 5. Install Device Driver Dialog, Windows 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Figure 6. Browse For Driver Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Figure 7. Can’t Verify Publisher Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . 10 Figure 8. Successfully Installed Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . 11 Figure 9. Unsuccessful Installation, Scenario 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Figure 10. Unsuccessful Installation, Scenario 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Figure 11. Device Manager Dialog, Windows 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Figure 12. A Successful USB-to-UART Driver Installation . . . . . . . . . . . . . . . . . . . . . 16 Figure 13. Connecting the 10-Circuit Cable to the Board . . . . . . . . . . . . . . . . . . . . . . . 17 Figure 14. Connecting the USB Mini-B Cable to the Board . . . . . . . . . . . . . . . . . . . . 18 Figure 15. An Example Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Figure 16. Initial OCD Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Figure 17. Object File Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Figure 18. Configuration Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Figure 19. Configuration Is Changed Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Figure 20. A Typical On-Chip Debugger Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Figure 21. A Typical On-Chip Debugger Window with Child Windows Open . . . . . . 25 Figure 22. Reset & Go Toolbar Icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Figure 23. Selecting the Demo Project File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Figure 24. Selecting the Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Figure 25. Selecting the Target Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Figure 26. Configuring the Debug Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Figure 27. Configuring the Flash Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Figure 28. Load Application at Startup Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 UM024307-1112 List of Figures Z51F3220 Development Kit User Manual vi Figure 29. Beginning a Debug Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Figure 30. A Default Debug Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Figure 31. Demo Program Menu in HyperTerminal . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Figure 32. Z51F3220 Development Board, #1 of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Figure 33. Z51F3220 Development Board, #2 of 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Figure 34. Found New Hardware Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . 39 Figure 35. Install Device Driver Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . . 40 Figure 36. Couldn’t Find Driver Dialog, Windows Vista . . . . . . . . . . . . . . . . . . . . . . . 41 Figure 37. The Found New Hardware Wizard Welcome Screen . . . . . . . . . . . . . . . . . 42 Figure 38. The Found New Hardware Wizard’s Browse Screen . . . . . . . . . . . . . . . . . 43 Figure 39. Selecting A Target Driver For Flash Programming . . . . . . . . . . . . . . . . . . . 45 Figure 40. Configuring Additional Flash Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Figure 41. The Keil IDE Flash Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 UM024307-1112 List of Figures Z51F3220 Development Kit User Manual vii List of Tables Table 1. Z51F3220000ZCOGG Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Table 2. Default Jumper Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Table 3. Z51F3220 Development Kit Sample Projects . . . . . . . . . . . . . . . . . . . . . . . 36 Table 4. Z51F3220 Development Kit Documentation . . . . . . . . . . . . . . . . . . . . . . . 36 UM024307-1112 List of Tables Z51F3220 Development Kit User Manual 1 Introduction This manual describes how to set up Zilog’s Z51F3220 Development Kit (Zilog part number Z51F3220000ZCOG) and use it to evaluate your Z8051-based designs and applications. The Kit features a development board consisting of five LEDs, five pushbuttons, a buzzer, four 7-segment LCD digits, port pin headers and a UART-to-USB port. The Board features the Z51F3220 MCU in a 44-pin MQFP 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 Z51F3220 MCU, please refer to the Z51F3220 Product Specification (PS0299). This document guides you through the following tasks: • • • Install the Z8051 OCD Software and Documentation – see page 7 Configure the Z8051 OCD and Z51F3220 Development Board – see page 17 Build and Run the Z51F3220 Demo Project – see page 20 Figure 1 displays an image of the Z51F3220 Development Kit. UM024307-1112 Introduction Z51F3220 Development Kit User Manual 2 Figure 1. The Z51F3220 Development Kit Kit Contents Table 1 lists the contents of the Z51F3220 Development Kit. Table 1. Z51F3220000ZCOGG Contents Item Description 1 Z51F3220 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 Z8051 OCD Software and Documentation CDROM 1 6 Z51F3220 Development Kit Insert (FL0139) 1 UM024307-1112 Quantity Introduction Z51F3220 Development Kit User Manual 3 Appendix 2 on page 3 displays an image of the Z51F3220 Development Board. Figure 2. Z51F3220 Development Board Supported Operating Systems The Z51F3220 Development Board and the Z8051 On-Chip Debugger support the following operating systems: • • • Microsoft Windows XP Microsoft Windows Vista (32-bit/64-bit) Microsoft Windows 7 (32-bit/64-bit) Z51F3220 Development Board Block Diagram Figure 3 displays a block diagram of the Z51F3220 Development Board. UM024307-1112 Introduction Z51F3220 Development Kit User Manual 4 Figure 3. Block Diagram of the Z51F3220 Development Board Z51F3220 Development Board Description The Z51F3220 Development Board consists of the following components: • • Z51F3220: U2, 44-pin MQFP chip • • • 1 green LED to indicate USB power: D5 • • • USB connector: P1 UM024307-1112 3 LEDs: Green (D2), Red (D3) and Yellow (D4) connected to the GPIO pins of the Z51F3220 MCU 1 red LED to indicate an overcurrent condition: D6 5 pushbuttons: – SW1: RESET – SW2–SW5: connected to the GPIO pins of the Z51F3220 MCU OCD connector: J1 USB-to-UART interface: U7 Introduction Z51F3220 Development Kit User Manual 5 • USB interface providing power and communication to the Board through adjustable LD0: U5 • • • • • • • Power supply level that can be adjusted with potentiometer R22 Overcurrent protection circuit on the Board: U6 and D6 External source of reference voltage (2.5 V) for the on-chip ADC: VR1 MCU current consumption measurement resistor R7 with test points J4 and J5 Buzzer: U1 4-digit, 7-segment LCD panel Test points, headers and prototype area with two footprints OCD Connector J1 R3 and R6 Voltage Divider VR1 On-Chip ADC USB-to-UART IC Z51F3220 MCU USB Power LED D5 Overcurrent LED D6 Figure 4. Z51F3220 Development Board: Highlighted Components UM024307-1112 Introduction Z51F3220 Development Kit User Manual 6 By default, the Z51F3220 Development Board is set up with preinstalled shunts on J16 jumper pins 1–2 and 3–4 to allow the interfacing of the Z51F3220 MCU’s UART0 to the USB port. When the Board is connected to the USB port of the host PC, LED D5 will be ON. The default settings and functionalities of these shunts are listed in Table 2. Table 2. Default Jumper Settings Headers Pins Functionality Notes J16 1–2, 3–4 UART0 to USB Default J16 5–6, 7–8 UART1 to USB J2 1–2 VCC is being measured by AN1 Default J2 3–4 External VREF, 2.5 V is used for ADC Default As indicated in the table, should you decide to use the the Z51F3220 MCU’s UART1 block as the interface for your own project (currently not supported in this release), move the J16 shunts to positions 5–6 and 7–8. By default, Input 1 of the ADC is used to measure the supply voltage. This measurement point is taken from a middle point in the voltage divider circuit that includes resistors R3 and R6; the scaling is performed by software so that the LCD always displays the actual voltage. For a visual representation, see the schematic diagram in Figure 32 on page 37. 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 Z51F3220 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). UM024307-1112 Introduction Z51F3220 Development Kit User Manual 7 Install the Z8051 OCD Software and Documentation The Z8051 On-Chip Debugger (OCD) interface is the interface by which your PC will communicate with the Z51F3220 MCU to download and execute code. In addition to the OCD, software such as development tools and sample applications will be installed. Note: If you have already installed the Z8051 software and documentation from the CD-ROM following the procedure on the paper insert in your kit (FL0139), skip this section and proceed to the Z8051 OCD Driver Installation section, below. 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. Insert the Z8051 Software and Documentation CD into your computer’s CD-ROM drive. The setup program launches automatically. If the setup program does not launch automatically, open Windows Explorer, browse to your CD-ROM drive, and doubleclick the file labeled Z8051_.exe. Note: In this filename, refers to the version number of the OCD Software and Documentation release. For example, this version number may be 1.0. 3. Follow the on-screen instructions to complete the OCD software installation. Z8051 OCD Driver Installation The driver programs for the Z8051 On-Chip Debugger are copied during the software and documentation installation. In the following procedure for PCs running the Windows 7 32and 64-bit operating systems, ensure that the target side of the OCD will remain unconnected while you install these drivers. Note: If you are running Windows Vista, see Appendix A on page 39 to install your device drivers. If you are running Windows XP, see Appendix B on page 42. UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 8 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. 2. After the PC detects the new hardware, it will display the Installing device driver software dialog shown in Figure 5. Figure 5. Install Device Driver Dialog, Windows 7 IMPORTANT NOTE: If you should encounter the scenarios presented in Figures 9 or 10, right-click your mouse on ZILOG OCD I/F (highlighted in Figure 9) or Unknown device (highlighted in Figure 10) and select Update Driver Software... 3. Select Browse my computer for driver software (advanced) to display the dialog shown in Figure 6, which prompts you to key in or browse for the location of the .inf file. Depending on the type of computer you use (32- bit or 64-bit), use the Browse button to navigate to one of the following paths, then click the Next button. – On 32-bit machines, use the following path: \Z8051_\device drivers\OCD USB\x32 – On 64-bit machines, use the following path: \Z8051_\device drivers\OCD USB\x64 UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 9 Figure 6. Browse For Driver Dialog, Windows Vista UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 10 4. When Windows prompts you whether to install or not install, as shown in Figure 7, click Install this driver software anyway and wait until the installation is completed (Windows may prompt you more than once). Figure 7. Can’t Verify Publisher Dialog, Windows Vista UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 11 5. When the installation is complete, the screen shown in Figure 8 will appear. Click Close to exit the OCD driver installation. Figure 8. Successfully Installed Dialog, Windows Vista Note: On some installations, the Found New Hardware screen shown in Figure 8 may also display the text string, Zilog Z8051 USB OCD - No Firmware. This occurrence is normal and can be disregarded. UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 12 Figure 9. Unsuccessful Installation, Scenario 1 UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 13 Figure 10. Unsuccessful Installation, Scenario 2 UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 14 6. If Zilog Z8051 USB OCD appears in the Device Manager (as highlighted in Figure 11), the OCD driver software has been successfully installed. Figure 11. Device Manager Dialog, Windows 7 UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 15 FTDI USB-to-UART Driver Installation An FTDI USB-to-UART driver is required to allow your PC to communicate through its USB port to the on-chip UART of the Z51F3220 MCU. Observe the following procedure to perform these connections. 1. Ensure that the USB cable is not plugged in to the Z51F3220 Development Board’s P1 connector. 2. Navigate to the following filepath and double-click the CDM20802_setup.exe file to begin the driver installation. \Z8051_\device drivers\FTDI Uart 3. The installation process will begin and you should observe output similar to the following messages on the screen of your PC: 32-bit OS detected \dpinstx86.exe Installation driver FTDI CDM driver installation process completed. Note: 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 19 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. UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 16 Figure 12. A Successful USB-to-UART Driver Installation Note: To launch the Device Manager on Windows 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) UM024307-1112 Install the Z8051 OCD Software and Documentation Z51F3220 Development Kit User Manual 17 Configure the Z8051 OCD and Z51F3220 Development Board Observe the following procedure to set up and configure the Z8051 On-Chip Debugger and the Z51F3220 Board. Caution: 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. 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 Z51F3220 Board’s J1 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 UM024307-1112 Configure the Z8051 OCD and Z51F3220 Development Z51F3220 Development Kit User Manual 18 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 Z51F3220 Board’s P1 connector to apply power to the Board. Note that the green LED D5 is ON; see Figure 14. Figure 14. Connecting the USB Mini-B Cable to the Board Note: In the event that you later remove the LCD panel from the Board, observe its orientation in Figure 14. The panel’s small plastic notch should be located in the position indicated by the red square. Figure 15 shows an example of a completed hardware and software setup. UM024307-1112 Configure the Z8051 OCD and Z51F3220 Development Z51F3220 Development Kit User Manual 19 Figure 15. An Example Setup UM024307-1112 Configure the Z8051 OCD and Z51F3220 Development Z51F3220 Development Kit User Manual 20 Build and Run the Z51F3220 Demo Project Observe the following procedure to build and run the Z51F3220 demo project. Note: 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 26. 1. Browse to the following location and double-click the build_sdcc.bat batch file to build the project: \Z8051_\samples\Z51F3220\Demo\build_sdcc.bat Note: 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_\samples\Z51F3220\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 Z51F3220 Development Board section on page 17. 4. Run the Z8051 OCD software. From the Start menu, navigate to All Programs → Zilog Z8051 Software and Documentation → Zilog Z8051 OCD . Once launched, the program will display Connected, as shown in Figure 16. Note: If you encounter a message that says Disconnected, return to the Configure the Z8051 OCD and Z51F3220 Development Board section on page 17 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. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 21 Figure 16. Initial OCD Screen Note: 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. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 22 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 Download button to open the Configuration dialog box, shown in Figure 18. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 23 Figure 18. Configuration Dialog 8. Select Enable/Reset input and click the Write button to open the Configuration Is Changed dialog. A typical OCD display, if child windows are open, is shown in Figure 19. Note: Please disregard the instructions stated in the Configuration Is Changed dialog, and proceed to Step 9. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 24 Figure 19. Configuration Is Changed Dialog 9. Click OK to open the On-Chip Debugger’s main window. A typical OCD display is shown in Figure 20; Figure 21 shows an OCD window with child windows open. Figure 20. A Typical On-Chip Debugger Window UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 25 Figure 21. A Typical On-Chip Debugger Window with Child Windows Open Note: Use the View menu to open the child windows. For this demonstration, the example windows shown in Figure 21 do not need to be opened. 10. Click the Reset & Go toolbar icon, shown in Figure 22. As a result, LEDs D2, D3 and D4 on the Z51F3220 Board will blink in sequence and the LCD panel will display the current voltage applied to the Board. Figure 22. Reset & Go Toolbar Icon UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 26 Note: Similar projects that you can use as references are listed in Table 3 on page 36. Using the Keil µVision IDE on a Demo Project Zilog’s On-Chip Debugger hardware now fully 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 Z51F3220 MCU-related project is referenced as Demo. Notes: This document refers to the Keil µVision IDE V4.53.0.6 (PK51 Prof. Developers Kit) or later. Refer to the Z8051 Tools Product User Guide (PUG0033) for additional information about these project files and debugging with the Keil µVision IDE and Zilog On-Chip Debugger. Debugger Configuration Observe the following procedure to build and run a Z51F3220 demonstration project using the Keil µVision IDE. 1. Start the Keil µVsion4 IDE. 2. From the Project menu, select Open Project and navigate to the following filepath: \Z8051_\samples\Z51F3220\Demo 3. Select the Demo.uvproj file and click Open; see Figure 23. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 27 Figure 23. Selecting the Demo Project File 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 24. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 28 Figure 24. 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 25. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 29 Figure 25. 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 26. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 30 Figure 26. Configuring the Debug Options Notes: 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; otherwise you should deselect this option. 8. Click the Flash Options tab. The Flash Options Settings dialog will appear, as shown in Figure 27. To select the proper options for Flash programming, refer to the Z51F3220 Product Specification (PS0299). UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 31 Figure 27. 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 28, the so that the IDE will download the code upon connection. There is no need to select or enter an initialization file. Figure 28. Load Application at Startup Settings 11. Click OK to exit the Options for Target ‘Demo’ dialog. 12. From the Project menu, select Rebuild All to rebuild all target files. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 32 13. Start your debugging session by clicking the Start/Stop Debug Session icon, as indicated in Figure 29. A default Windows configuration of the debug session is shown in Figure 30. Figure 29. Beginning a Debug Session   Figure 30. A Default Debug Session UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 33 Note: The following buttons in the Keil µVision IDE are not supported by the Zilog OCD driver: To learn more about the full functionality of the Keil µVision IDE, please refer to the Keil Keil µVision4 IDE documentation. 14. From the Debug menu, select Run, or simply press the F5 key on your Windows keyboard to run the demo project. As a result, LEDs D1, D2 and D3 on the Z51F3220 Evaluation Board will blink in sequence. 15. To stop code execution, select Stop from the Debug menu. 16. To stop your debugging session, click the Start/Stop Debug Session icon. Note: 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 Z51F3220 Development Board. The following procedure examines how to configure HyperTerminal for the Z51F3220 demo project. Note: The HyperTerminal application is not available in Windows Vista and Windows 7 systems. If you are using either of these operating systems, consider using/installing different communication software, such as Tera Term. Please refer to the documentation for the particular emulation software you use to configure it for communication with the Z51F3220 Development Board. 1. In HyperTerminal, select the COM port assigned to the USB-to-UART interface cable that is connected to the P1 connector on the Development Board. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 34 Note: This COM port can be determined from the Device Manager, as described in the the FTDI USB-to-UART Driver Installation section on page 15. 2. Configure this port to reflect the following settings: – 9600 bps – 8 data bits – No parity – 1 stop bit – No flow control 3. Click the Call button to connect to the Z51F3220 Board. Upon connection, you should be able to see the Demo program menu shown in Figure 31. Figure 31. Demo Program Menu in HyperTerminal UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 35 At this point, you have successfully run the Z51F3220 demo project, but you are welcome to continue evaluating the demo in HyperTerminal. For additional information about how 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 Manual (UM0240). Note: Turn off the power by removing the USB cable from the P1 connector on the Development Board. UM024307-1112 Build and Run the Z51F3220 Demo Project Z51F3220 Development Kit User Manual 36 Sample Projects and Documentation A number of sample projects are included on the CD that ships with the Z51F3220 Development Kit, and their locations, listed in Table 3, will be accessible upon installation. Table 3. Z51F3220 Development Kit Sample Projects Description Location Demo samples\Z51F3220\Demo Led Blink samples\Z51F3220\Led_Blink samples\Z51F3220\Led_Blink_Asm A number of Z8051-related documents are included in the Z51F3220 Development Kit, and their locations, listed in Table 4, will be accessible upon installation. You can also find current versions of each of these documents on the Zilog website. Table 4. Z51F3220 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 Z51F3220 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 Z51F0811 Evaluation Kit User Manual UM0242 Documentation\Tools_Documentation Z51F3220 Development Kit User Manual UM0243 Documentation\Tools_Documentation Z8051 Tools Product User Guide PUG0033 Documentation\Tools_Documentation UM024307-1112 Sample Projects and Documentation Z51F3220 Development Kit User Manual 37 Schematic Diagrams Figures 32 and 33 display schematic diagrams of the Z51F3220 Development Board. VCC_T U1 VCC_T R1 1 1 + D1 LL4148 200 2 R3 49.9K U2 2 CEM1206S - VCC_M R5 10K J1 VR1 2 4 6 8 10 + 1 2 3 4 8 7 6 5 - 22 21 20 19 18 17 16 15 14 13 12 Pin 22 Pin 21 Pin 20 Pin 19 Pin 18 Pin 17 Pin 16 Pin 15 Pin 14 Pin 13 Pin 12 RxD1 TxD1 11 10 9 8 7 6 5 4 3 2 1 Pin 11 Pin 10 Pin 9 Pin 8 Pin 7 Pin 6 Pin 5 Pin 4 Pin 3 Pin 2 Pin 1 SEG3 SEG2 SEG1 COM2 COM1 COM0 RxD1 TxD1 R6 49.9K LCD1 SEG10 SEG9 SEG8 SEG7 SEG6 SEG5 SEG4 SEG1 SEG2 SEG3 SEG4 COM2 LM285 - 2.5V HDR/PIN 2x5 J2 DSCL R7 VCC_T 1 3 34 35 36 37 38 39 40 41 42 43 44 Pin 34 Pin 35 2 4 VCC C2 27pF C1 1 1 ohm 1 0.1uF J4 J5 Current measure C3 Y1 12MHZ J18 1 1 27pF J19 J17 PWM4AB/EINT1/AN1/SEG26/P03 PWM4AA/T4O/EINT0/AVREF/AN0/P02 DSCL/T3O/P01 DSDA/EC3/P00 VDD VSS XOUT/P50 XIN/P51 BLNK/EC0/EINT8/P52 PWM0O/T0O/SXIN/P53 EINT10/SXOUT/P54 4 VCC_M 1 P10/SEG14/AN13/RXD1/SCL1/MISO1 P20/SEG13/AN14/TXD1/SDA1/MOSI1 P21/SEG12/AN15/SCK1 P22/SEG11/SS1 P23/SEG10 P24/SEG9 P25/SEG8 P26/SEG7 P27/SEG6 P30/COM7/SEG5 P31/COM6/SEG4 Pin 42 1 1 3 5 7 9 MOSI2 MISO2 SCK2 SS2 PWM2O/T2O/EINT12/AN12/SEG15/P11 PWM1O/T1O/EINT11/AN11/SEG16/P12 BUZO/EC1/AN10/SEG17/P13 MOSI2/AN9/SEG18/P14 MISO2/AN8/SEG19/P15 SCK2/EINT7/AN7/SEG20/P16 SS2/EINT6/AN6/SEG21/P17 PWM4CB/EINT5/AN5/SEG22/P07 PWM4CA/EINT4/AN4/SEG23/P06 PWM4BB/EINT3/AN3/SEG24/P05 PWM4BA/EINT2/AN2/SEG25/P04 3 R4 10K 23 24 25 26 27 28 29 30 31 32 33 Pin 23 Pin 24 Pin 25 Pin 26 Pin 27 Pin 28 Pin 29 Pin 30 Pin 31 Pin 32 Pin 33 2 SEG11 SEG12 R2 49.9K P32/COM5/SEG3 P33/COM4/SEG2 P34/COM3/SEG1 P35/COM2/SEG0 P36/COM1 P37/COM0 P43/VLC0/SS0 P42/VLC1/SCK0 P41/VLC2/TXD0/SDA0/MOSI0 P40/VLC3/RXD0/SCL0/MISO0 P55/RESETB J20_1 J20_2 J20_3 J20_4 J20_5 J20_6 J20_7 J20_8 J20_9 J20_10 J20_1 J20_2 J20_3 J20_4 J20_5 J20_6 J20_7 J20_8 J20_9 J20_10 VCC_T 49.9K R9 PROTO1 Y2 32.768KHZ C5 18 17 16 15 14 13 12 11 10 R10 18pF 0 ohm 1 J8 VCC_T 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 9 8 7 6 5 4 3 2 1 1 Pin 31 1 Pin 32 1 Pin 33 proto13x22 1 2 3 4 5 6 7 8 16 15 14 13 12 11 10 9 J21_1 J21_2 J21_3 J21_4 J21_5 J21_6 J21_7 J21_8 J21_9 J21_10 COM1 SEG5 SEG6 SEG7 SEG8 SEG9 SEG10 SEG11 SEG12 COM0 2 16 15 14 13 12 11 10 9 J21 1 2 3 4 5 6 7 8 9 10 J21_1 J21_2 J21_3 J21_4 J21_5 J21_6 J21_7 J21_8 J21_9 J21_10 1x10 1 2 3 4 5 6 7 8 9 10 1x10 SW1 B3U-1000P J9 Pin 23 Pin 24 Pin 25 Pin 26 Pin 27 Pin 28 Pin 29 Pin 30 Pin 31 Pin 32 Pin 33 16 15 14 13 12 11 10 9 1 2 3 4 5 6 7 8 9 10 11 J7 Pin 12 Pin 13 Pin 14 Pin 15 Pin 16 Pin 17 Pin 18 Pin 19 Pin 20 Pin 21 Pin 22 1 2 3 4 5 6 7 8 9 10 11 J3 Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Pin 7 Pin 8 Pin 9 Pin 10 Pin 11 1 2 3 4 5 6 7 8 9 10 11 spare GREEN 470 R12 D3 2 RED 470 R13 VCC_T R14 R15 VCC_T VCC_T R16 VCC_T R17 D4 2 49.9K 470 16 15 14 13 12 11 10 9 U4 1 2 3 4 5 6 7 8 D2 2 1 2 3 4 5 6 7 8 spare VCC_T R11 1 U3 1 2 3 4 5 6 7 8 PROTOTYPE AREA (.1X.1 GRID) DO NOT POPULATE HEADERS 0 ohm 20 19 18 17 16 15 14 13 12 11 LCD TxD0 RxD0 RESET Z51LF32FNX C4 COM2 1E/1F 1D/1G/1A 2E/2F 2D/2G/2A 3E/3F 3D/3G/3A 4E/4F 4D/4G/4A COM1 J20 TxD0 RxD0 1 18pF NC0 NC1 NC2 1B/1C/1P 2B/2C/2P 3B/3C/3P 4B/4C COM3 NC3 NC4 VIM-404 R8 J6 1 2 3 4 5 6 7 8 9 10 49.9K 49.9K 49.9K YELL Pin 42 1 2 SW2 B3U-1000P Pin 30 1 2 SW3 B3U-1000P Pin 29 1 2 Pin 28 1 SW4 B3U-1000P 2 SW5 B3U-1000P Figure 32. Z51F3220 Development Board, #1 of 2 UM024307-1112 Schematic Diagrams Z51F3220 Development Kit User Manual 38 VCC_5V R18 J10 2 J11 1 1 C7 4.7uF 0.1uF U5 3 C8 1 P1 SH1 SH2 SH3 SH4 h1 h2 VBUS DM DP ID GND 1 2 3 4 5 USB, mini B 1uF R19 20K 2 OUT EN ADJ 4 5 BYP R20 1.5K R21 20K C12 MIC5318 0.01uF 15 VCC RXD RTS USBDM CTS USBDP DTR 8 R26 19 100K 24 27 28 17 NC1 DSR RESET DCD NC RI OSCI CBUS0 OSCO CBUS1 CBUS2 3v3 OUT GND3 GND2 GND1 TEST 26 21 18 25 0.1uF 7 C14 AGND CBUS3 CBUS4 C10 C11 4.7uF 0.1uF 1 3 OC VCC_5V R24 D6 470 1 RED R25 4.7K 5 3 11 2 9 J15 10 J13 J14 PWR_EN- 1 16 EN 2 U7 TXD VCC_T TPS2051B R22 20K R23 4.75K VCCIO 1 2 GND 4 2 4 OUT C9 0.01uF 20 IN 6 Center Pad VCC_T 5 1uF GND 7 C13 U6 IN 1 6 7 8 9 10 11 J12 VCC_T 1 C6 1 L1 FERRITE BEAD 1 470 3 GREEN 1 D5 6 23 22 13 14 12 FT232RL SERIAL USB 1-2, 3-4 UART0 5-6, 7-8 UART 1 J16 1 3 5 7 2 4 6 8 RxD0 TxD0 RxD1 TxD1 RxD0 TxD0 RxD1 TxD1 HDR/PIN 2x4 Figure 33. Z51F3220 Development Board, #2 of 2 UM024307-1112 Schematic Diagrams Z51F3220 Development Kit User Manual 39 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 Wizard dialog box, shown in Figure 34. Click Locate and install driver software (recommended). Figure 34. 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 Continue. UM024307-1112 OCD Driver Installation on Windows Vista Systems Z51F3220 Development Kit User Manual 40 4. When the Insert the Disc dialog appears, as shown in Figure 35, 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 36. Figure 35. Install Device Driver Dialog, Windows Vista UM024307-1112 OCD Driver Installation on Windows Vista Systems Z51F3220 Development Kit User Manual 41 Figure 36. Couldn’t Find Driver Dialog, Windows Vista 5. Return to page 8 and follow Steps 3 through 6. UM024307-1112 OCD Driver Installation on Windows Vista Systems Z51F3220 Development Kit User Manual 42 Appendix B. OCD Driver Installation on Windows XP Systems The driver programs for the Z8051 On-Chip Debugger are copied during 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. 2. After the PC detects the new hardware, it will display the Found New Hardware Wizard dialog box, shown in Figure 37. Select Install from a list or specific location (Advanced); then click Next. Figure 37. The Found New Hardware Wizard Welcome Screen UM024307-1112 OCD Driver Installation on Windows XP Systems Z51F3220 Development Kit User Manual 43 3. The next dialog box, shown in Figure 38, prompts you to enter a path or navigate to the directory in which the .inf file was installed. Depending on the type of computer you use (32- bit or 64-bit), use the Browse button to navigate to one of the following paths and click the Next button, leaving all other selections at their default settings. – On 32-bit machines, use the following path: \Z8051_\device drivers\OCD USB\x32 – On 64-bit machines, use the following path: \Z8051_\device drivers\OCD USB\x64 Note: On some installations, the Found New Hardware screen shown in Figure 37 may also display the text string, Zilog Z8051 USB OCD - No Firmware. This occurrence is normal and can be disregarded. Figure 38. The Found New Hardware Wizard’s Browse Screen UM024307-1112 OCD Driver Installation on Windows XP Systems Z51F3220 Development Kit User Manual 44 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. UM024307-1112 OCD Driver Installation on Windows XP Systems Z51F3220 Development Kit User Manual 45 Appendix C. Stand-Alone Flash Programming Using the Keil µVision IDE Observe the following procedure to program Flash memory without debugging. 1. From the Project menu, open the Options for Target 'your project’, and click the Utilities tab. In the Use Target Driver for Flash Programming drop-down menu within the Configure Flash Menu Command pane, ensure that Zilog Z8051 Target Driver is selected, as indicated in Figure 39. Figure 39. Selecting A Target Driver For Flash Programming 2. Click the Settings button to change any additional Flash options. The Settings dialog will appear, as shown in Figure 40. UM024307-1112 Stand-Alone Flash Programming Using the Keil µVision Z51F3220 Development Kit User Manual 46 Figure 40. Configuring Additional Flash Options 3. After you have selected your Flash options, click OK to exit the Flash Options dialog. 4. Click OK to exit the Options For Target ‘Demo’ dialog. 5. From the Flash menu of the Keil IDE (see Figure 41), select either of the following options: – Select Download to program Flash memory with the current project – Select Erase to perform a mass erase of internal Flash memory Figure 41. The Keil IDE Flash Menu UM024307-1112 Stand-Alone Flash Programming Using the Keil µVision Z51F3220 Development Kit User Manual 47 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://support.zilog.com. To learn more about this product, find additional documentation, or to discover other facets about Zilog product offerings, please visit the Zilog Knowledge Base or consider participating 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. UM024307-1112 Customer Support
Z51F3220000ZCOG 价格&库存

很抱歉,暂时无法提供与“Z51F3220000ZCOG”相匹配的价格&库存,您可以联系我们找货

免费人工找货