Table of Contents

Advertisement

Quick Links

phyCORE-DS80C390
QuickStart Instructions
Using PHYTEC FlashTools 3 and the Keil µVision2 Software
Evaluation Development Tool Chain
Note: The PHYTEC Spectrum CD includes the electronic version of
the English phyCORE-DS80C390 Hardware Manual
Hinweis: Die PHYTEC Spektrum CD beinhaltet die elektronische
Version des deutschen phyCORE-DS80C390 Hardware Manuals
Edition: May 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-DS80C390 and is the answer not in the manual?

Questions and answers

Summary of Contents for Phytec phyCORE-DS80C390

  • Page 1 QuickStart Instructions Using PHYTEC FlashTools 3 and the Keil µVision2 Software Evaluation Development Tool Chain Note: The PHYTEC Spectrum CD includes the electronic version of the English phyCORE-DS80C390 Hardware Manual Hinweis: Die PHYTEC Spektrum CD beinhaltet die elektronische Version des deutschen phyCORE-DS80C390 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-DS80C390...........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-DS80C390 to a Host-PC ....18 2.3 Starting PHYTEC FlashTools ............20 2.4 Downloading Example Code with FlashTools ......21 2.4.1 "Blinky"...
  • Page 4 5.3 Linking and Locating ..............70 Index of Figures Figure 1: Keil Tool Chain Overview ............8 Figure 2: Mounting the phyCORE-DS80C390 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 start-up phyCORE-DS80C390 in conjunction with the Keil software development tools © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 6: Overview Of This Quickstart Instruction

    Flash device using PHYTEC FlashTools. The "Getting More Involved" section provides step-by-step instructions on how to modify both examples, create and build new projects and generate and download output files to the phyCORE-DS80C390 using the Keil tool chain and FlashTools. "Debugging” section provides...
  • Page 7: System Requirements

    Introduction 1.3 System Requirements Use of this “Rapid Development Kit” requires: • the phyCORE-DS80C390 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-Ds80C390

    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-DS80C390 to be plugged like a “big chip” into target hardware. The standard memory configuration of the phyCORE-DS80C390...
  • Page 9 • on-chip 16-bit / 32-bit math coprocessor • three Chip Select signals for connection to external peripherals • requires only a +5 V/250 mA power source • operates temperature range 0... 70°C (optional -40... 85°C temperature range available) © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • 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-592e_1...
  • 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-592e_1...
  • 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 FlashTools 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-592e_1...
  • Page 15: Getting Started

    • downloading example user code in Intel hexfile format from a host-PC to the external Flash memory using FlashTools 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-592e_1...
  • 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-592e_1...
  • Page 18 QuickStart Instructions All software and tools for this phyCORE-DS80C390 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 a different tool chain, please refer to the corresponding QuickStart manual. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • 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-592e_1...
  • 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-592e_1...
  • Page 22: Interfacing The Phycore-Ds80C390 To A Host-Pc

    QuickStart Instructions 2.2 Interfacing the phyCORE-DS80C390 to a Host-PC Connecting phyCORE-DS80C390, 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-592e_1...
  • Page 24: Starting Phytec Flashtools

    \Software\Flasht3\. FlashTools 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. FlashTools consists of a firmware resident in the external Flash and corresponding software installed on the host-PC.
  • Page 25: Downloading Example Code With Flashtools

    • The FlashTools 3 start window with the Connect tab will now appear. • Select the phyCORE-DS80C390 in the target hardware list in the Connect window. Click on the + sign in front of the phyCORE string to expand the view and to see all available modules.
  • Page 26 • The properties for the communication between the target hardware and the host-PC are configured in the Communication Setup window. • The RS-232 protocol is configured as default. Click on the Properties button to advance to the properties for the serial communication window. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 27 • Click on the Close button in the Communication Setup window to exit the communication setup. Note: Always ensure that the phyCORE-DS80C390 is in Flash programming mode before pressing the Connect button (see section 2.2). • Now click the Connect button to establish connection to the target hardware.
  • Page 28 This is the same window that was used when you first entered FlashTools: The number of banks shown on the Bank Utilities tabsheet varies depending on the size and type of the Flash mounted on the phyCORE-DS80C390. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 29 Getting Started Download downloads specified hexfiles to the target hardware: Protected Areas Info shows protected areas of Flash memory: © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 30: Blinky

    • Returning to the FlashTools tabsheet, choose the Download tab and click on the 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-DS80C390 Demo folder (default location C:\PHYBasic\pC-DS80C390\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 duration. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 32: Hello

    Open button. The demo hexfile has already been installed to your hard drive during the installation procedure. • Browse to the correct drive and path for the phyCORE-DS80C390 Demo folder (default location C:\PHYBasic\pC-DS80C390\Demos\Keil\Hello\Hello.hex) and click Open.
  • Page 33 Once you see the Ready message in the lower left corner, the downloaded code can be executed. • Returning to the Connect tab, click on the Disconnect button and exit FlashTools. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • 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-592e_1...
  • 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-592e_1...
  • Page 36 Hello.hex file loaded into the Flash. • Now push the <Space> bar on your keyboard once to start the automatic baud rate detection on phyCORE-DS80C390 module. • Successful execution will send the character string "Hello World" from the target hardware to the HyperTerminal window.
  • Page 37: Getting More Involved

    2.1. You can also manually install µVision2 by executing setup.exe from within the \Software\Keil\Ek8051UV2 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: Creating A New Project And Adding An Existing Source File

    • To create a new project file select from the µVision2 menu Project|New Project…. This opens a standard Windows dialog box that asks you for the new project file name. • Change to the project directory created by the installation procedure (default location C:\PHYBasic\pC-DS80C390\Demos\Keil\Blinky2). © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 39 • The Select Device for Target ’Target1’ will automatically appear. Double-click on Dallas Semiconductor in the CPU vendor data base list. The phyCORE-DS80C390 is equipped with a DS80C390. Choose this controller type from the list as shown below. This selection sets necessary tool options for the DS80C390 device, as well as pre-configures additional settings for the device.
  • Page 40 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-592e_1...
  • Page 41 • 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-592e_1...
  • Page 42 Start390.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-592e_1...
  • Page 43: Modifying The Source Code

    The next step is to modify the C source before building your project. This includes compiling, linking, locating and creating the hexfile. 3.3 Modifying the Source Code • Double-click on Blinky2.c to open it in the source code editor. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 44: Saving The Modifications

    (i=0; i< 20000 ; i++) /* delay for 20000 counts wait(); /* call wait function This will change the LED on/off ratio. 3.4 Saving the Modifications • Save the modified file by choosing File|Save or by clicking the floppy disk icon © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 45: Setting Tool Chain Options

    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-DS80C390 within the project window. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 46 • Open the Project|Options for Target ‘phyCORE-DS80C390’ menu and change the default settings to the correct values for the phyCORE-DS80C390 as shown in the figure below. This includes settings for the clock frequency of your phyCORE module, the memory model and the off-chip memory.
  • Page 47 Getting More Involved 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-592e_1...
  • Page 48: 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-592e_1...
  • Page 49: Downloading The Output File

    • Returning to the FlashTools tabsheet, choose the Download tab and click on the Open button. • Browse to the correct drive and path for the phyCORE-DS80C390 Demo folder (default location C:\PHYBasic\pC-DS80C390\Demos\Keil\Blinky2\Blinky2.hex and click Open.
  • Page 50: 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, a library called Serinit.lib and an assembler file called Start390.a51. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 51: 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-DS80C390 after compiling. 3.8.4 Building the New Project • Build the project.
  • Page 52: Downloading The Output File

    • Returning to the FlashTools tabsheet, choose the Download tab and click on the Open button. • Browse to the correct drive and path for the phyCORE-DS80C390 Demo folder (default location C:\PHYBasic\pC-DS80C390\Demos\Keil\Hello2\Hello2.hex and click Open.
  • Page 53: Starting The Terminal Emulation Program

    Hello2.hex file loaded into the Flash. • Now push the <Space> bar on your keyboard once to start the automatic baud rate detection on phyCORE-DS80C390 module. • Successful execution will send the modified character string "PHYTEC... Stick It In!" to the HyperTerminal window.
  • Page 54 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • 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-DS80C390 dialog: • The Simulator allows PC-based microcontroller simulation of most features of the 8051 microcontroller family without actually having target hardware.
  • Page 56: Creating A Debug Project And Preparing The Simulator

    (default location) on your hard drive. • Rename the target of your project within the Project Window – Files tab into phyCORE-DS80C390. • 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 57: Setting Options For Target

    • Open the Project|Options for Target ‘phyCORE-DS80C390’ menu and enter the correct oscillator frequency of your phyCORE module in the Xtal (MHz) dialog box and configure the other pull-down menus as shown below. The phyCORE-DS80C390 is populated with a 128 kByte linear accessible SRAM device.
  • Page 58 Locate and LX51 Misc tabsheets are set to their default settings. • Click the OK button to save the settings. • Click on the Rebuild all target files button to compile and link your project. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 59: Preparing The Simulator

    Debugging 4.2 Preparing the Simulator According to the Project|Options for Target ‘phyCORE-DS80C390' configuration, µVision2 will load the application program and run the startup code. • Open the Project|Options for Target ‘phyCORE- DS80C390’ menu and select the Debug tabsheet. • Enable the checkboxes Use: Simulator and Load Application at Startup.
  • Page 60: Starting The Simulator

    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-592e_1...
  • Page 61 • Open this window by selecting Peripherals\I/O-Ports\Port3. • The Parallel Port 3 window will now appear. Status of the simulated LED D3 control can be watched at bit position 0 (P3.4 = 0 => LED ON). © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 62 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-592e_1...
  • Page 63: The Keil Μvision2 Debug Features

    Run button is pushed. • The next button on the simulator toolbar is the Stop button. The Stop button interrupts and stops the running program at an undetermined location. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 64 This can effect a Step Over command by nesting multiple calls for sequential functions. For users with assembler knowledge, the View->Disassembly window is recommended. Here the C source code contrasts with the machine code and the optimization steps are obvious. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 65: Using The Keil Μvision2 Debug Features

    The red marker on the left-hand side of the selected line indicates the breakpoint. • Insert a second breakpoint in the line where the ‘wait’ function is called for the second time. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 66: Single Stepping And Watch Window

    In order to change the number base from hexadecimal to decimal, right-click on the variable you want to change. • Click Step Into several times and watch the value of i count up. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 67 "rhythm[]" is an array with a group of array elements. Click the sign to expand the view and to see all array elements of "rhythm[]". © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 68: Running, Stopping And Resetting

    • The Reset button can be used to reset the application program to its initial state. This renders the program into the same state as when starting the simulator (refer to section 4.2). © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 69: 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 on-chip Flash of the phyCORE-DS80C390. • Select the Output tabsheet and enable the checkbox Create HEX File.
  • Page 70 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 71: Advanced User Information

    The following description is valid only for the FlashTools included with the phyCORE-DS80C390 and is not intended as a guideline for using any other program. FlashTools incorporates a safety mechanism that ensures that the system area, in which the firmware is resident, can not be overwritten during programming of the available user banks of the Flash device.
  • Page 72 QuickStart Instructions Resetting the phyCORE-DS80C390 also activates the system bank (bank 0) of the Flash device, which automatically starts the FlashTools firmware. Then the firmware either enters the Flash programming mode or starts the user application. To distinguish between download and execution modes, the firmware latches the /BOOT signal after reset (/BOOT=0 =>...
  • Page 73: Start390.A51

    (see options within the Project window of the Keil tool chain). We recommend that you add Start390.a51 or Start390.obj (depending on the kind of file you want to add to the project) within the project tree. © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 74: Linking And Locating

    XDATA/HDATA segments are located to the external RAM of the phyCORE-DS80C390 and that all CODE/HCODE segments are located to the external Flash memory of the phyCORE-DS80C390. Exceptions may occur if you use a 8051 derivative with on-chip portions of XDATA (e.g. internal XRAM) or CODE (e.g. internal ROM).
  • Page 75 Advanced User Information Since the phyCORE-DS80C390 is equipped with a software configurable address decoder instead of simple programmable logic device and the DS80C390 includes an additional Chip Select Unit, you can configure the memory model to your needs at runtime.
  • Page 76 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2002 L-592e_1...
  • Page 77 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-592e_1...
  • Page 78 Published by © PHYTEC Meßtechnik GmbH 2002 Ordering No. L-592e_1 Printed in Germany...

Table of Contents