Table of Contents

Advertisement

Quick Links

microMODUL-8051C05
QuickStart Instructions
Using PHYTEC FlashTools98 and the TASKING Embedded
Development Environment (EDE) evaluation version
Note: The PHYTEC Spectrum CD includes the electronic version of
the English microMODUL-8051 Hardware Manual
Hinweis: Die PHYTEC Spectrum CD beinhaltet die elektronische
Version des deutschen microMODUL-8051 Hardware Manuals
Edition: May 2000
A product of a PHYTEC Technology Holding company

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the microMODUL-8051C05 and is the answer not in the manual?

Questions and answers

Summary of Contents for Phytec microMODUL-8051C05

  • Page 1 QuickStart Instructions Using PHYTEC FlashTools98 and the TASKING Embedded Development Environment (EDE) evaluation version Note: The PHYTEC Spectrum CD includes the electronic version of the English microMODUL-8051 Hardware Manual Hinweis: Die PHYTEC Spectrum CD beinhaltet die elektronische Version des deutschen microMODUL-8051 Hardware Manuals...
  • Page 2 The information in this document has been carefully checked and is believed to be entirely reliable. However, PHYTEC Meßtechnik GmbH assumes no responsibi- lity for any inaccuracies. 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.
  • Page 3: Table Of Contents

    1.5 The TASKING 8051C05 Embedded Development Environment (EDE) ..............7 Getting Started...................11 2.1 Installing Rapid Development Kit Software.......11 2.2 Interfacing the microMODUL-8051C05 to a Host-PC ....18 2.3 Starting PHYTEC FlashTools98 for Windows ......20 2.4 Downloading Example Code with FlashTools98 .......21 2.4.1 “Hello”................27...
  • Page 4 Memory Window............55 4.5.2 Stack Window ............... 56 4.5.3 Simulated I/O ..............56 4.6 Resetting CrossView Pro and the microMODUL-8051C05 ..57 Advanced User Information............. 59 5.1 FlashTools98 ................59 5.2 Start.asm ..................61 5.2.1 Linking and Locating ............ 62 5.3 Debugging using Monitor Kernel..........
  • Page 5: Introduction To The Rapid Development Kit

    Hardware Manual. 1.1 Rapid Development Kit Documentation This “ Rapid Development Kit” includes the following electronic documentation on the enclosed “ PHYTEC Spectrum CD-ROM” : • the PHYTEC microMODUL-8051...
  • Page 6: Overview Of This Quickstart Instruction

    1.3 System Requirements Use of this “ Rapid Development Kit” requires: • the PHYTEC microMODUL-8051C05, • the PHYTEC Development Board with the included DB-9 serial cable and AC adapter supplying 8-13 V/min 300 mA, • the PHYTEC Spectrum CD, • an IBM-compatible host-PC (486 or higher running at least Windows95/NT) ©...
  • Page 7 Introduction For more information and example updates, please refer to the following sources: http://www.phytec.com - or - http://www.phytec.de support@phytec.com - or - support@phytec.de http://www.tasking.com support_de@tasking.com (Germany) support@tasking.com (International) © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 8: The Phytec Micromodul-8051C05

    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 microMODUL-8051C05 to be plugged like a “big chip” into target hardware. The standard memory configurations of the microMODUL-8051C05 features 32 (to 128) kByte external SRAM and 128 (to 512) kByte external Flash for storage of user code.
  • Page 9 • operates in a temperature range of 0... 70° C (optional -40... 85° C temperature range available) The PHYTEC Development Board, in EURO-card dimensions (160 x 100 mm), is fully equipped with all mechanical and electrical components necessary for the speedy and secure insertion and subsequent programming of most PHYTEC microMODUL and miniMODUL series Single Board Computers.
  • Page 10 • a CAN interface at a second DB-9 connector • a VG96-connector • simple jumper configuration allowing use of the Development Demoboard with various PHYTEC Single Board Computers • Galvanic separation of CAN-bus signals • Voltage regulator for supply of CAN operational voltage •...
  • Page 11: The Tasking 8051C05 Embedded Development Environment (Ede)

    The IHEX51 Object-to-Hex converter converts an absolute object file into an Intel-hexfile that is suitable for programming into an EPROM device or downloading into external Flash on the PHYTEC microMODUL-8051C05 target board. The TASKING tool chain consists of the following executables: • C Compiler cc51.exe...
  • Page 12 8051 controllers. All kind of derivatives from Philips, Infineon, Dallas, Intel and Atmel can be selected from a list in the EDE Processor Options menu. The TASKING 8051 compiler provides the fastest and smallest code using industry benchmarks. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 13 This allows you to fully evaluate the features and power of TASKING products on the PHYTEC target board. The full version has no restrictions and is fully ANSI compliant. © PHYTEC Meßtechnik GmbH 2000...
  • Page 14 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 15: Getting Started

    Flash-Memory using FlashTools98 2.1 Installing Rapid Development Kit Software When you 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 2000 L-534e_1...
  • Page 17 All Kit-specific content will be installed to a Kit-specific subdirectory of the Rapid Development Kit root folder that you have specified at the beginning of the installation process. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 18 QuickStart Instructions All software and tools for this microMODUL-8051C05 Kit 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 documentation.
  • Page 19 Additional software, such as Adobe Acrobat Reader, will also be offered for installation. Note: Tasking Evaluation Development tool chain is limited for 30 days since the first installation. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 20 These QuickStart Instructions and the demo software included on the CD-ROM have been specifically tailored for use with one another. In the following windows you can decide to install FlashTools98 Software and the Acrobat Reader. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 21 Getting Started Press Finish to complete the installation and decide if you want to begin the Quickstart Instruction immediately. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 22: Interfacing The Micromodul-8051C05 To A Host-Pc

    QuickStart Instructions 2.2 Interfacing the microMODUL-8051C05 to a Host-PC Connecting the microMODUL-8051C05, mounted on the PHYTEC Development Board, to your computer is simple: • As shown in the figure below, if the microMODUL is not already pre-installed, mount it pins-down onto the Development Board’s exterior receptacle footprint (X2).
  • Page 23: Figure 2: Suitable Development Board Jumper Settings

    Boot (S2) switch. This sequence of pressing and releasing the Reset (S1) and Boot (S2) switches renders the microMODUL-8051C05 into the Bootstrap mode. FlashTools must always be operated in this mode. See section 5.1 FlashTools98 for more details. Ensure that the terminal program flasht.exe is always invoked only after the reset procedure.
  • Page 24: Starting Phytec Flashtools98 For Windows

    PHYTEC Spectrum CD. FlashTools98 for Windows is a utility program that allows download of user code in *.hex-file format from a host-PC to a PHYTEC Single Board Computer (SBC) via an RS-232 connection. FlashTools98 consists of a firmware resident in the external Flash and corresponding software installed in the host-PC.
  • Page 25: Downloading Example Code With Flashtools98

    Programs|PHYTEC FlashTools98 program group. • The Communication Setup tab of the FlashTools98 Worksheet window will now appear. Here you can specify connection properties to the microMODUL-8051C05. • Choose the correct serial port for your host-PC and a 9,600 baudrate. • Click the Connect button to establish connection to the target hardware.
  • Page 26 Flash Programming Mode as described in section 2.3. • Optional: if FlashTools98 detects multiple Flash devices on the target hardware (e.g. controller derivatives with internal Flash) the following Programming Mode Selection dialog window will appear: © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 27 8051 controller derivatives used microMODUL-8051C05 offer on-chip Flash. An appropriate Programming Mode option will only appear if on-chip memory is detected by the FlashTools98 firmware. For this example, it is assumed that no on-chip Flash is available on the controller populating the microMODUL-8051C05.
  • Page 28 Flash, this tab is called Block Utilities. These tabs enable erasure of memory banks and blocks, respectively. The Block Utilities also supports chip erase of the entire on-chip Flash. Flash Information shows sector and address ranges in Flash memory: © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 29 Communication Setup allows selection of the serial port and speed (this is the same window that was used when you first entered FlashTools98 for Windows): File Download downloads specified hex-files to the target hardware: © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 30 QuickStart Instructions Protected Areas Information shows protected areas of Flash memory: Sector Utilities allow erasure of individual sectors of Flash memory: © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 31: Hello

    Flash memory can be viewed in the left-hand corner of the FlashTools98 Worksheet window. Wait until the status check finishes before returning to work with the board. Once the status check is complete, the downloaded code can be executed. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 32 HyperTerminal program included within Windows. • Start the HyperTerminal program within the Programs|Accessories bar. • The HyperTerminal main window will now appear: • Double-click on the HyperTerminal icon “Hypertrm” to create a new HyperTerminal session. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 33 “COM Direct” and advances you to the next HyperTerminal window. • The “New Connections Properties” window will now appear. Specify Direct to COM1 under the Connect Using combobox (be sure to indicate the correct COM setting for your system). © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 34 = 8; Parity = None; Stop Bits = 1; Flow Control = None. • Selecting OK advances you to the “COM Direct – HyperTerminal” monitoring window. Notice the connection status report in the bottom lower corner of the window. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 35 <Space> bar on your keyboard will execute the hello.hex file loaded into the Flash. Pressing the <Space> bar allows the microMODUL-8051C05 to detect the baud rate for connection to the target hardware. • Successful execution will send the character string "Hello World"...
  • Page 36: Blinky

    • Type the complete pathway and name of the file you wish to download C:\PHYBasic\uM8051C5\Demos\Tasking\Blinky\blinky.hex folder (default location) • Click on the Download button and view the download procedure to the board in the status window © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 37 • Successful execution of the program will flash the LED with equal on and off durations You have now successfully downloaded and executed two pre-existing example programs in *.hex-file format. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 38 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 39: Getting More Involved

    After you start EDE, the window shown below appears. From this window you can create projects, edit files, configure tools, compile, assemble, link and start the debugger. Other 3 party tools such as emulators can also be started from here. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 40: Creating A New Project And Adding An Existing Source File

    QuickStart Instructions 3.2 Creating a New Project and Adding an Existing Source File • Open the Project menu and choose New and press the Browse... button. The window shown below appears. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 41 • In the ‘File name’, enter the file name of the project you are creating. For this tutorial, enter the name Blinky2, press Save and chose OK in the next window. • The following window will appear: © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 42 • Choose OK to save the new project. At this point you have created a project called blinky2.pjt and added an existing C source file called blinky2.c and an existing Assembler file called cstart.asm. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 43: Modifying The Source Code

    P2_8 = 1; /* output to LED port for (i=0; i< 6000 ; i++) { /* delay for 150000 counts wait (); /* call wait function This will change the on/off ratio of the blinky program. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 44: Saving The Modifications

    Enter the changes as indicated below and leave all other options set to their default values. EDE allows you to set various options with mouse clicks and these are all saved in your project file. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 45 • Open the EDE menu and choose Processor Options...|Processor. Adjust the default settings by clicking Defaults. • Open the EDE menu and choose Processor Options...|Memory and specify the following settings. Press OK to close the window after the modification. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 46 To configure the C Compiler Options: • Open the EDE menu and choose C Compiler Options|Project Options|Memory Model and specify the following settings • Open the EDE menu and choose C Compiler Options|Project Options|Preprocessing and specify the following settings. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 47 EPROM programmers (.hex) radiobutton. Delete any value in Start adress (hex) for IEEE-695, S-REC and I-Hex. Attention: Do not enter any value in Start address: since the FlashTools will not accept this! © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 48: Building The Project

    No errors found. is shown in the bottom line. The code to be downloaded to the board will be the name of the project with .hex as filename extension (in this case blinky2.hex). © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 49 *.l51) are created 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 and save the file and repeat this section. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 50: Downloading The Output File

    • If the modified hex-file properly executes, the LED should now flash in a different mode with different on and off duration’s. You have now modified source code, recompiled the code, created a modified download hex-file, and successfully executed this modified code. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 51: Hello

    • Open the file hello2.c from within the project window. • Use the editor to modify the printf command: printf ("\x1AHello World\n") printf ("\x1APHYTEC... Stick It In!\n") • Save the modified file under the same name hello2.c. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 52: Setting Tool Chain Options

    Utilities tab, highlight Bank #1, and click on the Erase Bank(s) button • Next choose the File Download tab and click on the File Open button • Download file hello2.hex from project folder C:\PHYBasic\uM8051C5\Demos\Tasking\Hello2 (default location). © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 53: Starting The Terminal Emulation Program

    • Resetting the Development Board (at S1) 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 54 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 55: Debugging

    CrossView Pro Ensure that the target hardware is properly connected to the host-PC and a power supply. Use the Phytec FlashTools98 to download the monitor program. The monitor program is specific to the oscillator frequency of the microMODUL-8051C05, the memory available the baudrate you want to use.
  • Page 56: Debugging Crossview Example

    C:\PHYBasic\um8051C5\Tasking\demos\xvw\ • Open the existing project called pmm8051.pjt . • Specify the connection properties for the microMODUL-8051C05 in EDE|CrossView Pro Options..Choose the correct serial port for your host-PC and the correct baud rate. • Reset the target board Since the monitor program also consumes some processor resources like the interrupt vector of the serial interface, plus some sfr’s,...
  • Page 57 You may have to open any invisible window by opening the View menu and selecting the window to view. • For troubleshooting please refer to Appendix A, Troubleshooting. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 58: Using The Tasking Crossview Pro Debug Features

    Now the ‘+’ sign is exchanged by a ‘-‘ sign which shows that recordvar is expanded. A double click on it switches back to the ‘compact’ form. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 59: Single Stepping

    This is the memory area for the long array table. The recursive calculated factorial values of the variable loopvar are stored in this array. Single step through the for loop: for (loopvar = 0; loopvar <= 7; ++loopvar). © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 60: Stack Window

    • The program now hangs in an endless loop while (loopvar) since loopvar is never zero. • Set the variable loopvar to zero by modifying it’s content to reach the end of the program (which includes a simulated input demonstration too). © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 61: Resetting Crossview Pro And The Micromodul-8051C05

    The Monitor runs in the target hardware. When the Reset the application (but do not run) button is pressed the PC (Program Counter) is set to zero. This command does NOT perform a hardware- reset of the target system. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 62 QuickStart Instructions © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 63: Advanced User Information

    Programming tools for the Flash device are always included with the microMODUL-8051C05 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 64 To distinguish between download and execution modes, the firmware checks immediately for the presence of a pull-up resistor (usually 4.7kΩ) connected to pin D0 (Data 0) of the microMODUL-8051C05 after reset. This resistor is located on the Development Board and can be connected to the microMODUL-8051C05 by pressing the Boot (S2) switch.
  • Page 65: Start.asm

    EDE according to the settings in EDE|CPU Options. Most important in combination with the microMODUL-8051C05 is the correct Chip Select (CS) setup via the Buscon and Addrsel registers. Because the startup code is modified by macro preprocessor defines it is not necessary to copy the start.asm file (located in \lib\src directory)
  • Page 66: Linking And Locating

    8051C05. All ROM code and –data sections must also be located to any internal non-volatile memory (e.g. Flash, OTPROM) of the C165 or any external Flash-Memory of the microMODUL-8051C05. The small Memory-Model which is the only one supported in the eval version of the TASKING C166/ST10 toolchain requires a special treatment of near RAM- and ROM-data sections.
  • Page 67 RAM for locating data classes and Flash for locating code and constant classes. The recommended operating mode of the microMODUL-8051C05 allows the use of the Chip Select Unit of the C165 to define the physical memory layout. By modifying the system registers (Buscon and Addrsel) in EDE|CPU Options as part of your project you can adapt the memory layout to your needs.
  • Page 68: Debugging Using Monitor Kernel

    Refer to the EDE|Linker Options|Memory settings of the “addone” projectfile (\XVW\pmm8051.pjt). If you want to know the exact spaces the monitor consumes, take a look at the monitor mapfile (*.l51) in directory \TASKING\MON\ . © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 69: Appendices

    EDE|Project Options|Startup menu or take a look into the .map file of your project. • the address window settings may be wrong. RAM bank 1 should be mapped to address 0h. Check Buscon1 and Addrsel1 settings in EDE|CPU Options. © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 70: A.iii Placing Code Breakpoint At 0Xxxxxxx Failed: Memory Not Writeable

    RAM area. The error message is generated because parts of the application are allocated in read only memory. You can verify this by checking the projects mapfile (.map). © PHYTEC Meßtechnik GmbH 2000 L-534e_1...
  • Page 71 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 2000 L-534e_1...
  • Page 72 Published by © PHYTEC Meßtechnik GmbH 2000 Ordering No. L-534e_1 Printed in Germany...

Table of Contents