Hide thumbs Also See for phyCORE-ADuC812:
Table of Contents

Advertisement

Quick Links

phyCORE-ADuC812
QuickStart Instructions
Using PHYTEC FlashTools98 for Windows and the Keil µVision2
Software Evaluation Development Tool Chain
Note: The PHYTEC Spectrum CD includes the electronic version of
the phyCORE-ADuC812 English Hardware Manual
Hinweis: Die PHYTEC Spectrum CD beinhaltet die elektronische
Version des deutschen phyCORE-ADuC812 Hardware Manuals
Edition: July 2002
A product of a PHYTEC Technology Holding company

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the phyCORE-ADuC812 and is the answer not in the manual?

Questions and answers

Summary of Contents for Phytec phyCORE-ADuC812

  • Page 1 QuickStart Instructions Using PHYTEC FlashTools98 for Windows and the Keil µVision2 Software Evaluation Development Tool Chain Note: The PHYTEC Spectrum CD includes the electronic version of the phyCORE-ADuC812 English Hardware Manual Hinweis: Die PHYTEC Spectrum CD beinhaltet die elektronische Version des deutschen phyCORE-ADuC812 Hardware Manuals...
  • Page 2 PHYTEC Meßtechnik GmbH neither gives any guarantee nor accepts any liability whatsoever for consequential damages resulting from the use of this manual or its associated product. PHYTEC Meßtechnik GmbH reserves the right to alter the information contained herein without prior notification and accepts no responsibility for any damages which might result.
  • Page 3: Table Of Contents

    1.4 The PHYTEC phyCORE-ADuC812 ..........4 1.5 The Keil Software Evaluation Development Tool Chain.....7 Getting Started...................11 2.1 Installing Rapid Development Kit Software.......11 2.2 Interfacing the phyCORE-ADuC812 to a Host-PC....18 2.3 Starting PHYTEC FlashTools98 for Windows ......20 2.4 Downloading Example Code with FlashTools ......21 2.4.1 "Blinky"...
  • Page 4 5.3 Linking and Locating ..............78 Index of Figures Figure 1: Keil Tool Chain Overview ............8 Figure 2: Mounting the phyCORE-ADuC812 onto the phyCORE Development Board LD 5V ........18 Figure 3: Important Connectors, Buttons and Suitable Jumper Settings on the phyCORE Development Board LD 5V ......
  • Page 5: Introduction To The Rapid Development Kit

    User's Manuals and Data Sheets • this QuickStart Instruction with general “Rapid Development Kit” description, software installation hints and four example programs enabling quick out-of-the box start-up of the phyCORE-ADuC812 in conjunction with the Keil software development tools © PHYTEC Meßtechnik GmbH 2002...
  • Page 6: Overview Of This Quickstart Instruction

    The “Getting Started” section uses three example programs: • "Hello" and "Blinky" to demonstrate the download of user code to the Flash device using PHYTEC FlashTools98 for Windows. The "Getting More Involved" section provides step-by-step instructions on how to modify both examples, create and build...
  • Page 7: System Requirements

    Introduction 1.3 System Requirements Use of this “Rapid Development Kit” requires: • the phyCORE-ADuC812 SBC module • the phyCORE Development Board LD 5V with the included DB-9 serial cable and AC adapter supplying 5 VDC / min. 500 mA • the PHYTEC Spectrum CD •...
  • Page 8: The Phytec Phycore-Aduc812

    All applicable data/address lines and applicable signals extend from the underlying logic devices to standard-width (2.54 mm / 0.10 in.) pin headers lining the circuit board edges. This enables the phyCORE-ADuC812 to be plugged like a “big chip” into target hardware. The standard memory configuration of the phyCORE-ADuC812...
  • Page 9 • optional 2 to 8 kByte I²C-EEPROM • three Chip Select signals for connection of external peripheries • requires only a 5 V /typ. <150 mA power source Please contact PHYTEC for more information about additional modul configurations. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 10 • simple jumper configuration allowing phyCORE Development Board LD 5V with various PHYTEC phyCORE SBC’s • one control LED D3 for quick testing of user software • 2 x 160-pin Molex connector (X2) enabling easy connectivity to expansion boards (e.g. PHYTEC GPIO-Expansion Board) ©...
  • Page 11: The Keil Software Evaluation Development Tool Chain

    Keil development tools. The full version has no such restrictions, both are fully ANSI compliant. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 12: Figure 1: Keil Tool Chain Overview

    All IDE commands and functions are accessible via intuitive pull- down menus with prompted selections. An extensive Help utility is included. External executables can be run from within µVision2, including emulator software. Figure 1: Keil Tool Chain Overview © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 13 The Keil OH51 object-to-hex converter transforms an absolute object file produced by the BL51 Banking Linker into a standard Intel *.hex file. This file is suitable as an input to the PHYTEC FlashTools98 or for programming into an EPROM or an emulator. OH51 can be run in a DOS box under Windows or directly from µVision2.
  • Page 14 • view/set peripheral information • apply virtual external signals µVision2 has a performance analysis feature to ensure your code runs efficiently. In addition, µVision2 has a disassembler/assembler that allows the modification of user code without recompiling. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 15: Getting Started

    • downloading example user code in Intel hexfile format from a host-PC to the external Flash memory using FlashTools98 2.1 Installing Rapid Development Kit Software • Insert the PHYTEC Spectrum CD into the CD-ROM drive of your host-PC. The PHYTEC Spectrum CD should automatically launch a setup program that installs the software required for the Rapid Development Kit as specified by the user.
  • Page 16 If you decide to individually choose different paths and/or drives you must consider this for all further file and path statements. We recommend that you accept the default destination location. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 17 All Kit-specific content will be installed to a Kit-specific subfolder of the Rapid Development Kit root folder that you have specified at the beginning of the installation process. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 18 All software and tools for this phyCORE-ADuC812 RDK will be installed to the \PHYBasic folder on your hard drive. • In the next dialog you must choose whether to copy the selected documentation as *.pdf files to your hard drive or to install a link to the file on the Spectrum CD.
  • Page 19 • After accepting the Welcome window and license agreement, select the destination location for installation of the Keil evaluation development tool chain. The default location is C:\Keil. If installing the Tasking tool chain, please refer to the corresponding QuickStart manual. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 20 Acrobat Reader. The applicable FlashTools software must be installed to ensure successful completion of this QuickStart Instruction. Failure to install the proper software could lead to possible version conflicts, resulting in functional problems. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 21 Getting Started • Decide if you want to begin the QuickStart Instruction immediately by selecting the appropriate checkbox and click on Finish to complete the installation. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 22: Interfacing The Phycore-Aduc812 To A Host-Pc

    2.2 Interfacing the phyCORE-ADuC812 to a Host-PC Connecting phyCORE-ADuC812, mounted phyCORE Development Board LD 5V, to your computer is simple: • As shown in the figure below, if the phyCORE module is not already preinstalled, mount it pins-down onto the Development Board’s exterior receptacle footprint (X6).
  • Page 23: Figure 3: Important Connectors, Buttons And Suitable Jumper Settings On The Phycore Development Board Ld 5V

    Power Connector • Simultaneously press the Reset (S2) and Boot (S1) buttons on the phyCORE Development Board LD 5V, first releasing the Reset and then, two or three seconds later, release the Boot button. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 24: Starting Phytec Flashtools98 For Windows

    \Software\Flasht98\. FlashTools98 for Windows is a utility program that allows download of user code in Intel *.hex file format from a host-PC to a PHYTEC SBC via an RS-232 connection. FlashTools98 consists of a firmware resident in the external Flash and corresponding software installed on the host-PC.
  • Page 25: Downloading Example Code With Flashtools

    • Choose the correct serial port for your host-PC and a 9.600 baud rate. Note: Always ensure that the phyCORE-ADuC812 is in Flash programming mode before pressing the Connect button. • Click the Connect button to establish connection to the target hardware.
  • Page 26 The number of banks shown on the Bank Utilities tabsheet varies depending on the size and type of the Flash mounted on the phyCORE-ADuC812 © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 27 Communication Setup allows selection of the serial port and speed before the communication is initialized, or to disconnect the ongoing communication: The appearance of the Flash Information tabsheet varies depending on the size and type of the Flash mounted on the phyCORE-ADuC812 © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 28 File Download downloads specified hexfiles to the target hardware: Protected Areas Information shows protected areas of Flash memory: © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 29 Flash memory specified by the user: The appearance of the Sector Utilities tabsheet varies depending on the size and type of the Flash mounted on the phyCORE-ADuC812 © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 30: Blinky

    • Next choose the File Download tab and click on the File Open button. The hexfile has already been installed to your hard drive during the installation procedure. • Browse to the correct drive and path for the phyCORE-ADuC812 Demo folder (default location C:\PHYBasic\pC-ADuC812\Demos\Keil\Blinky\Blinky.hex) and click Open.
  • Page 31 • Press the Reset button (S2) on the phyCORE Development Board LD 5V to reset the target hardware and to start execution of the downloaded software. • Successful execution of the program will flash the LED D3 with equal on and off durations. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 32: Hello

    • Next choose the File Download tab and click on the File Open button. The demo hexfile has already been installed to your hard drive during the installation procedure. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 33 Getting Started • Browse to the correct drive and path for the phyCORE-ADuC812 Demo folder (default location C:\PHYBasic\pC-ADuC812\Demos\Keil\Hello\Hello.hex) and click Open. • Click on the Download button. You can watch the status of the download of the Hello.hex into external Flash memory in the Download window.
  • Page 34 • Next click on OK. This creates a new HyperTerminal session named “COM Direct” and advances you to the next HyperTerminal window. The HyperTerminal Window has a different appearance for different versions of Windows © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 35 (COM1/COM2 Properties). • Then set the following COM parameters: Bits per second = 9.600; Data bits = 8; Parity = None; Stop Bits = 1; Flow Control = None. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 36 • If no output appears in the HyperTerminal window check the power supply, the COM parameters and the RS-232 connection. You have now successfully downloaded and executed two pre-existing example programs in Intel *.hex file format. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 37: Getting More Involved

    2.1. You can also manually install µVision2 by executing install.bat from within the \Software\Keil\Ek8051 directory of your PHYTEC Spectrum CD. Note: It is necessary to use the Keil tool chain provided on the accompanying Spectrum CD in order to complete these QuickStart Instructions successfully.
  • Page 38 After you start µVision2, the window shown below appears. From this window you can create projects, edit files, configure tools, assemble, link and start the debugger. Other 3 party tools such as emulators can also be started from here. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 39: Creating A New Project And Adding An Existing Source File

    • Change to the project directory created by the installation procedure (default location C:\PHYBasic\pC-ADuC812\Demos\Keil\Blinky2). • In the text field ‘File name’, enter the file name of the project you are creating. For this example, enter the name Blinky2 and click on Save. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 40 • Now open the menu Project|Select Device for Target and double- click on Analog Device in the CPU vendor data base list. The phyCORE-ADuC812 is equipped with an Analog Devices ADuC812. Choose this controller type from the list as shown below.
  • Page 41 Choose the option Targets, Groups, Files..• Select the tab Groups / Add Files and type the new group name System Files in the Group to Add: section. • Click on Add and then on OK. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 42 • Your project file structure should now look like this: • In order to add Blinky2.c to our project right-click on the User group to open a menu. Select the option Add Files to Group ‘User’ to open the standard files dialog. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 43 Startup.a51. You have to change the file type to “Asm Source file (*.a, *.src)” in the File of types pull-down menu to see this file. • Your project window should now look like this: © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 44 C source file called Blinky2.c and an existing assembler file called Startup.a51. The next step is to modify the C source before building your project. This includes compiling, linking, locating and creating the hexfile. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 45: Modifying The Source Code

    /* call wait function P34 = 0; /* Port 3.4 Low = LED3 = ON for (i=0; i< 5000; i++) /* delay for 5000 counts wait(); /* call wait function This will change the LED on/off ratio. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 46: Saving The Modifications

    Enter the changes as indicated below and leave all other options set to their default values. µVision2 allows you to set various options with mouse clicks and these are all saved in your project file. • Select the target phyCORE-ADuC812 within the project window. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 47 • The phyCORE-ADuC812 is populated with a 64 kByte linear accessible SRAM device. This allows selection of the Large: variables in XDATA memory model.
  • Page 48 QuickStart Instructions To configure the Output options: • Select the Output tab and activate the Create HEX File checkbox. With this option an Intel *.hex file will be created for download. • Click on OK. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 49: Building The Project

    (e.g. list files *.lst and map files *.map) are generated to help the debugging or troubleshooting and error searching process. • If a list of errors appears, use the editor to correct the error(s) in the source code, save the file and (re-)build the project. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 50: Downloading The Output File

    • Next choose the File Download tab and click on the File Open button. • Browse to the correct drive and path for the phyCORE-ADuC812 Demo folder (default location C:\PHYBasic\pC-ADuC812\Demos\Keil\Blinky2\Blinky2.hex and click Open.
  • Page 51: Hello2

    • Your project window should now look like this: • Save the project. At this point you have created a project called Hello2.uv2 consisting of a C source file called Hello2.c and an assembler file called Startup.a51. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 52: Modifying The Example Source

    • Modify the default options for the output file by selecting the Create HEX File checkbox in the Project|Options for Target..|Output tab. This will automatically create a hexfile for download to the phyCORE-ADuC812 after compiling. 3.8.4 Building the New Project • Build the project.
  • Page 53: Downloading The Output File

    • Next choose the File Download tab and click on the File Open button. • Browse to the correct drive and path for the phyCORE-ADuC812 demo folder (default location C:\PHYBasic\pC-ADuC812\Demos\Keil\Hello2\Hello2.hex directory (default location).
  • Page 54: Starting The Terminal Emulation Program

    • Resetting the phyCORE Development Board LD 5V (at S2) will execute the Hello2.hex file loaded into the Flash. • Successful execution will send the modified character string "PHYTEC... Stick It In!" to the HyperTerminal window. • Click the Disconnect icon . . • Close the Hyper Terminal program.
  • Page 55: Debugging

    For a more detailed description of the debugging features, please refer to the appropriate manuals provided by Keil. The µVision2 Debugger offers two operating modes that can be selected in the Project|Options for Target phyCORE-ADuC812 dialog: • The Simulator allows PC-based microcontroller simulation of most features of the 8051 microcontroller family without actually having target hardware.
  • Page 56: Preparing The Target Hardware To Communicate With Μvision2 Target Monitor

    Tools folder C:\PHYBasic\pC-ADuC812\Tools\Keil\Mon\64k (default location). The PHYTEC Spectrum CD-ROM may also contain other versions of the mon51.hex monitor file. These version are made for different oscillator frequencies and memory options of the phyCORE module. files available C:\PHYBasic\pC-ADuC812\Tools\Keil\Mon...
  • Page 57: Creating A Debug Project And Preparing The Debugger

    ADuC812 in the CPU vendor data base list. • Rename the target of your project within the Project Window – Files tab into phyCORE-ADuC812. • Rename the file group Source Group 1 within the Project Window – Files tab into User and add an additional file group named System Files.
  • Page 58: Setting Options For Target

    Here, in contrast to the Harvard architecture, access to CODE and XDATA space is directed towards the same physical memory device, normally RAM. With this von Neumann memory architecture, it is now possible to change the application program during runtime. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 59: Figure 5: Memory Model For Use With The Keil Monitor (64 Kbyte Ram)

    CODE and XDATA areas within the application program do not overlap. This is important because otherwise portions of the program (CODE) will be overwritten by e.g. variables (XDATA), resulting in an error when executing user code. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 60 QuickStart Instructions • Open the Project|Options for Target ‘phyCORE-ADuC812’ menu and change the default settings to the correct values as shown in the figure below. This includes settings for the clock frequency of your phyCORE module, the memory model (make sure “Large: variables in XDATA”...
  • Page 61 (see settings for the Keil Monitor 51 Driver in section 4.3) any serial input and output of the user application conflicts with the communication of the monitor program. Such serial communication functions cannot be active in user code to ensure proper debugging. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 62 • Click the OK button to save the settings. • Click on the Rebuild all target files button compile and link your project. Please note that this example only requires the define MONITOR51 in order to use the serial output. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 63: Preparing The Debugger

    According to the Project|Options for Target ‘phyCORE-ADuC812' configuration, µVision2 will load the application program and run the startup code. • Open the Project|Options for Target ‘phyCORE-ADuC812’ menu and select the Debug tabsheet. • Enable the checkboxes Use: Keil Monitor-51 Driver and Load Application at Startup.
  • Page 64 • Select the correct COM port and baud rate in the COM Port Settings as shown below. • Ensure that Serial Interrupt checkbox is disabled. • Click on the OK button to exit the Target Setup window. • Click on the OK button again. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 65: Starting The Debugger

    If a problem occurs during data transfer, the following window will appear: • Click on Settings and verify the COM port and the baud rate (9.600 baud). Push the Reset button S2 on the phyCORE Development Board LD 5V and click on Try Again. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 66 You can open inactive windows by choosing the desired window from the View pull-down menu. The following screen capture has Workbook Mode enabled to allow easy access to various overlapped windows with tabs. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 67 Notice the yellow arrow pointing to the first command in the ’main’ function. Also notice the program counter (PC $) within the Project Window – Register page showing the start address of the ‘main’ function. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 68: Keil Μvision2 Debug Features

    Run button is pushed. • The next button on the debugger toolbar is the Stop button. The Stop button interrupts and stops the running program at an undetermined location. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 69 Note: Due to performance reasons the Step Out command is not available in monitor mode. Step Out is only available in the simulator mode. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 70: Using The Keil Μvision2 Debug Features

    4.6 Using the Keil µVision2 Debug Features 4.6.1 Serial Window • Click on the Step Into button. The printf command will be executed and the serial output will appear in the Serial #1 window of the debugger. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 71: Breakpoints

    Notice that the LED (D3) on the Development Board now illuminates. This is because the led(0) function call has been executed and the status of the LED is shown in the Serial window. • Click again on Insert/Remove Breakpoint remove breakpoint. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 72: Single Stepping And Watch Window

    Your program will be executed until it reaches this line. • Notice that the LED D3 on the Development Board is off now and the new status of the LED is shown in the Serial window. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 73 Memory window. • Type X: 0x0129 in the Address: line of the Memory window and press <Enter>. A memory area starting at address 0x0129 of the external memory is now displayed in the Memory window. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 74: Running, Stopping And Resetting

    To do so, add INTERRUPT in the Define: input field within the C51 tabsheet before rebuilding the project and enable the Serial Interrupt in the Target Setup window for the debugger. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 75: Changing Target Settings For The "Final Version

    After successfully debugging the program, next change the target settings in order to create an Intel hexfile. This can then be downloaded to the Flash memory of the phyCORE-ADuC812. • Open the Project|Options for Target ‘phyCORE-ADuC812’ menu and change the settings for off-chip memory to the new values as shown in the figure below.
  • Page 76 QuickStart Instructions • Select the Output tabsheet and enable the checkbox Create HEX File. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 77 Data bits = 8; Parity = None; Stop Bits = 1; Flow Control = None. • Press the Reset button S2 on the Development Board to start the program. • Now you can watch your final debug example execute. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 78 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 79: Advanced User Information

    Programming tools for the Flash device are always included with the phyCORE-ADuC812 in the form of a pre- programmed Flash with a resident microcontroller firmware and a counterpart software serving as the user interface on a host-PC. Once...
  • Page 80 QuickStart Instructions The following description is valid only for the FlashTools98 included with the phyCORE-ADuC812 and is not intended as a guideline for using any other program. FlashTools98 incorporates a safety mechanism that ensures that the system bank (bank 0), in which the firmware is resident, can not be overwritten during programming of the available user banks of the Flash device.
  • Page 81: Startup.a51

    Link/Lib process of your project (see options within the Project window of the Keil tool chain). We recommend that you add Startup.a51 or Startup.obj (depending on the kind of file you want to add to the project) within the project tree. © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 82: Linking And Locating

    To ensure proper execution of your application, it is required that all XDATA segments are located to the external RAM of the phyCORE-ADuC812 and that all CODE segments are located to the external Flash memory and on-chip Flash memory of the phyCORE-ADuC812.
  • Page 83 For instance all XDATA segments should end below 0x7FFF if a 32 kByte RAM device mounted on the phyCORE-ADuC812. We recommend generation of a *.m51 map file for your project and inspection of the memory map information within this file.
  • Page 84 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 85 How would you improve this manual? Did you find any mistakes in this manual? page Submitted by: Customer number: Name: Company: Address: Return to: PHYTEC Technologie Holding AG Postfach 100403 D-55135 Mainz, Germany Fax : +49 (6131) 9221-33 © PHYTEC Meßtechnik GmbH 2002 L-462e_2...
  • Page 86 Published by © PHYTEC Meßtechnik GmbH 2002 Ordering No. L-462e_2 Printed in Germany...

Table of Contents