Keil MCB517AC User Manual

Sab 80c517/80c537 microcontroller target board with 81c90 full can controller and banking support

Advertisement

Quick Links

SAB 80C517/80C537 Microcontroller Target Board
with 81C90 Full CAN Controller and Banking Support
User's Guide 04.97

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MCB517AC and is the answer not in the manual?

Questions and answers

Summary of Contents for Keil MCB517AC

  • Page 1 SAB 80C517/80C537 Microcontroller Target Board with 81C90 Full CAN Controller and Banking Support User’s Guide 04.97...
  • Page 2 © Copyright 1997, 1997 Keil Elektronik GmbH and Keil Software, Inc. All rights reserved. Keil C51™ and dScope™ are trademarks of Keil Elektronik GmbH.
  • Page 3 DIP switches and configuration jumpers. “Chapter 3. Hardware” provides detailed information about hardware including the schematic drawings for the MCB517AC board, the logic equations for the PLD and the memory locations of the different Monitor versions contained in the EPROM.
  • Page 4: Document Conventions

    Preface Document Conventions This document uses the following conventions: Examples Description Bold capital text is used for the names of executable programs, data files, README.TXT source files, environment variables, and commands you enter at the MS-DOS command prompt. This text usually represents commands that you must type in literally.
  • Page 5: Table Of Contents

    MCB517AC Evaluation Board User’s Guide Contents Chapter 1. Introduction ..................1 Quick Start........................2 Chapter 2. Setup....................3 Using the MCB517AC ....................4 Configuring the MCB517AC ..................5 DIP Switches ......................... 6 Configuration Jumper....................9 Monitor Modes......................9 Monitor Status Display....................10 Chapter 3.
  • Page 6 Contents...
  • Page 7: Chapter 1. Introduction

    EPROM of the MCB517AC board in different configurations. These monitor programs let you communicate between your PC and the MCB517AC evaluation board so that you can download and run your 8051 programs. The MCB517AC kit includes the following items: MCB517AC Evaluation Board User’s Guide (this manual),...
  • Page 8: Quick Start

    Use the following list to quickly locate important information about the MCB517AC evaluation board. To… See… Connect power to the MCB517AC board. “Using the MCB517AC” on page 4. Connect the MCB517AC to your PC. “Using the MCB517AC” on page 4.
  • Page 9: Chapter 2. Setup

    MCB517AC Evaluation Board User’s Guide Chapter 2. Setup Setting up the MCB517AC evaluation board is easy. The board requires power and a serial connection to a PC running the MON51 terminal program or dScope for Windows. Before you start, make sure you have satisfied the following hardware and software requirements.
  • Page 10: Using The Mcb517Ac

    The serial cable lets your PC download program code and debug your target applications. The power cable provides power to the MCB517AC evaluation board. The MCB517AC does not get power from the PC via the serial cable. The following illustration shows MCB517AC board and the important interface and hardware components.
  • Page 11: Configuring The Mcb517Ac

    MCB517AC Evaluation Board User’s Guide Configuring the MCB517AC You configure the MCB517AC evaluation board with the DIP switches and the configuration jumpers. The MCB517AC evaluation board is shipped with the following configuration: Siemens SAB 83C517A microcontroller Monitor uses serial interface 0 (COM0) at 9600 bps Banking disabled The default DIP switch settings are shown in the following table.
  • Page 12: Dip Switches

    Chapter 2. Setup DIP Switches The following sections describe each of the DIP switches of the MCB517AC board. S-CAN : Default OFF The S_CAN switch determines, whether a 120Ohm terminating resistor is connected to the CAN_H and CAN_L lines. Switch S_CAN only to ON if this prototype board is connected to one end of a CAN-bus line.
  • Page 13 S2: Default OFF The S1 and S2 switches select the memory map and banking configuration for the MCB517AC. The memory map used on the MCB517AC board depends on the setting of the Monitor DIP switch. The memory maps for both settings are shown in the following tables.
  • Page 14 Chapter 2. Setup LED: Default ON The LED switch selects whether or not port 4 is connected to the 8 LEDs in the upper right portion of the board. When LED is ON, the LEDs on port 4 are enabled. When LED is OFF, the LEDs are not connected to port 4. If you work with the Monitor DIP switch ON and LED is OFF, then you select also a Monitor version which does no longer modify the port 4 lines.
  • Page 15: Configuration Jumper

    The following sections describes the configuration jumper of the MCB517AC board. 80C517 / 80C517A: Default 80C517A This configuration jumper selects whether the MCB517AC board operates with a 80C517 or a 80C517A CPU. It switches the CPU pin 60 from V to V .
  • Page 16: Monitor Status Display

    Chapter 2. Setup Monitor Status Display The Monitor program flashes the Port 4 LED’s during the reset phase. After the reset phase the LED’s reflect the monitor configuration and signals that the board is working correctly. The following table lists the LED pattern after reset. Monitor Version P4.7 P4.6 P4.5 P4.4 P4.3 P4.2 P4.1 P4.0 Monitor 51 using COM 0...
  • Page 17: Chapter 3. Hardware

    MCB517AC Evaluation Board User’s Guide Chapter 3. Hardware The MCB517AC is designed to be a very flexible evaluation board that you can use to become familiar with an 80C517A microcontroller and an 80C91 full CAN controller. We have also tried to provide a board that can be expanded to support your own hardware prototypes.
  • Page 18 Chapter 3. Hardware Power Supply Power is supplied to the MCB517AC from an external 8-12 Volt DC power supply which is capable of providing 300-500mA. Connection is made using a standard 5.5mm barrel plug with a 2.5mm center hole. The center hole is the plus polarity.
  • Page 19: Status Leds

    PAL equations used. Memory and I/O Devices The MCB517AC maps three memory devices into the address space of the CPU. RAM at IC5 and IC7, EPROM at IC23. The two 20V8 PALs at IC13 and IC22 provide also the chip select signal for the external CAN controller at IC3 and an user chip select signal.
  • Page 20 Chapter 3. Hardware You can configure the Monitor to use either the one or the other on-chip serial port to communicate with the PC. Depending on the position of the DIP switches S1 and S2 the serial interface and the baudrate is selected for the Monitor communication.
  • Page 21 Port_x.1 Prototyping Area A perforated area is provided on the MCB517AC for prototyping your own hardware. All data- and address-bus signals as well as all ports are connected to the first two rows of the prototyping area. The signals provided are driven directly by the CPU.
  • Page 22 Chapter 3. Hardware \PSEN P1.6 P1.0 P3.7 P3.1 P1.0 - P1.7 P3.0 - P3.7 P1.7 P1.1 P3.6 P3.0 P7.1 P7.7 P4.7 P4.1 P5.7 P5.1 P7.0 - P7.7 P4.0 - P4.7 P5.0 - P5.7 P7.0 P7.6 P4.6 P4.0 P5.6 P5.0 P8.3 P8.1 P6.7 P6.1...
  • Page 23: Schematics

    MCB517AC Evaluation Board User’s Guide Schematics...
  • Page 24 Chapter 3. Hardware...
  • Page 25 MCB517AC Evaluation Board User’s Guide...
  • Page 26 Chapter 3. Hardware...
  • Page 27: Printed Board Assembly

    MCB517AC Evaluation Board User’s Guide Printed Board Assembly...
  • Page 28: Technical Data

    ;PALASM Design Description ;---------------------------------- Declaration Segment ------------ TITLE GAL for MCB517 Prototype board IC13 PATTERN Banking Decoder REVISION 1.0 AUTHOR Hans Schneebauer COMPANY Keil Elektonik GmbH DATE 10/20/96 CHIP IC13 PALCE20V8 ;---------------------------------- PIN Declarations --------------- 2..4 P6[5..7] COMBINATORIAL ; INPUT /PSEN COMBINATORIAL ;...
  • Page 29 MCB517AC Evaluation Board User’s Guide IF (MON_ON) THEN ; Monitor switched on BEGIN A_P[16] = LED A_P[17] = 0 C_ACCESS = (PSEN * /ALE) + (C_ACCESS * /ALE) ; =1 for a CODE access / =0 for a XDATA access CASE(S[2..1])
  • Page 30 ;PALASM Design Description ;---------------------------------- Declaration Segment ------------ TITLE GAL for MCB517 Prototype board IC22 PATTERN Decoder and Boot Logic REVISION 1.0 AUTHOR Hans Schneebauer COMPANY Keil Elektonik GmbH DATE 10/20/96 CHIP IC22 PALCE20V8 ;---------------------------------- PIN Declarations --------------- 1..8 A[8..15] COMBINATORIAL ; INPUT /PSEN COMBINATORIAL ;...
  • Page 31 MCB517AC Evaluation Board User’s Guide /MON_ON COMBINATORIAL ; INPUT /S[4] COMBINATORIAL ; INPUT /CS_USER COMBINATORIAL ; OUTPUT /CS_CAN COMBINATORIAL ; OUTPUT /CS_RAM COMBINATORIAL ; OUTPUT /CS_EPROM COMBINATORIAL ; OUTPUT /RD_RAM COMBINATORIAL ; OUTPUT MON_RUN COMBINATORIAL ; OUTPUT 21..22 A_P[13..14] COMBINATORIAL ; OUTPUT /S[3] COMBINATORIAL ;...
  • Page 32 Chapter 3. Hardware...
  • Page 33: Monitor Eprom Addresses

    MCB517AC Evaluation Board User’s Guide Monitor EPROM Addresses This following lists the EPROM addresses in the Monitor EPROM for the different monitor versions. At every 8kbyte boundary (address 0, 0x2000, 0x4000 ...) the Monitor EPROM contains a LJMP 0E800H instruction.
  • Page 35: Chapter 4. Programming

    Writing programs for the MCB517AC is relatively simple. However, before you get started, there are a few points you should keep in mind. The MCB517AC is shipped with the Keil 51 monitor for banked and non-banked applications programmed into the EPROM. The MCB517AC board has a Monitor boot logic which is coded in the PLD device.
  • Page 36 Chapter 4. Programming External memory layout in non-banked mode. Code memory Xdata memory 0FFFFH 0FFFFH On-chip XRAM 0F800H CAN-contoller Monitor EPROM 0F700H User Chip select 0F600H unused 0E800H 0E800H Mon. Data Mon. Data 0D300H 0D300H User Code Area User XDATA (v.
  • Page 37: Monitor Data & Interrupt Vectors

    MCB517AC Evaluation Board User’s Guide Code memory Xdata memory 0FFFFH On-chip XRAM 0F800H CAN-contoller Monitor Monitor Monitor Monitor 0F700H User Chip select EPROM EPROM EPROM EPROM 0F600H unused 0E800H 0D200H Bank 0 Bank 1 Bank 4 Bank 5 Restricted Area...
  • Page 38: Writing Programs For The 8051 Monitor

    Writing Programs for the 8051 Monitor Compiling and linking programs for use with the 8051 monitor on the MCB517AC board requires only two steps. First, compile your applications as you normally would. For example, you may use the following command line.
  • Page 39: Blinky Example Program

    BLINKY Example Program The following simple program, BLINKY, is an exercise you may use to test the MCB517AC and verify that you can use the tools provided to generate a working program. BLINKY does nothing more than blink the LEDs on the MCB517AC evaluation board.
  • Page 40 Chapter 4. Programming Using the Windows-Based Tools This section leads you step-by-step through the process of creating the BLINKY example program and testing it using the µVision ID E and dScope debugger. Using µVision to Create the BLINKY Program To create the BLINKY example program using µVision, you need to perform the following steps: Create the BLINKY.C source file.
  • Page 41 MCB517AC Evaluation Board User’s Guide Enter the BLINKY example program shown on page 33. Your screen should look something like the following figure. You should save the BLINKY program after you enter it. Select the Save As… command from the File menu and µVision displays the Save As dialog box shown below.
  • Page 42 Chapter 4. Programming After you save BLINKY.C, you should create a BLINKY project file. A project file contains a list of all the source files in your project as well as the options to use for the compiler, assembler, linker, and make facility. Additionally, the project manager helps you compile, link, and test your target program.
  • Page 43 MCB517AC Evaluation Board User’s Guide When you have created a project file and inserted the source files into the project, you are ready to set the options for the compiler, linker, and other tools. To set the C51 compiler options, select the C51 Compiler… command from the Options menu and µVision displays the C51 Compiler Options dialog box.
  • Page 44 Chapter 4. Programming Enter the number 256 in the Ram Size and 100 in the Code Address text boxes on the Size/Location tab shown above. This creates the RAMSIZE and CODE directive that tells the linker to use up to 256 bytes of internal memory and to locate all relocatable code segments to 100H and above.
  • Page 45 When make completes successfully, you are ready to begin debugging the BLINKY program. Using dScope to Debug the BLINKY Program To load the BLINKY in the MCB517AC evaluation board using dScope, you need to perform the following steps: Load the MON51.DLL CPU driver.
  • Page 46 Chapter 4. Programming When dScope starts, a screen similar to the following displays. Register Window Module Window Command Window To load the MON51.DLL CPU driver, type the following in the command window. load mon51.dll This is shown in the following figure.
  • Page 47 When using the MCB517AC evaluation board, the baudrate should be set according to the DIP switch S3 and S4 settings (typically 9,600 baud). You must determine which COM port of your PC you are using.
  • Page 48 StepOver button on the right side of the module window. As you step through the program, you should see the LEDs on the MCB517AC changing. When you are ready to exit dScope, click on the Stop button in the module window and select the Exit command in the File menu.
  • Page 49: External Can Example

    MCB517AC Evaluation Board User’s Guide External CAN Example The following example program shows you how to access the external CAN controller registers. You can use this CAN xdata structure to access every register of the external CAN controller 81C90. This very simple example reads the low nibble (bits 0-3) of CAN port 0 and writes the data into the high nibble (bits 4-7) of CAN port 0.
  • Page 50 Chapter 4. Programming void main(void) { unsigned char value; CAN.P0PDR = 0xf0; /* configure CAN P0 pins 0-3 for input and */ /* pins 4-7 for output while(1) { value = CAN.P0PR; /* read CAN P0 port value <<= 4; /* shift low nibble to high nibble CAN.P0LR = value;...
  • Page 51: Code Banking Example

    The following example program shows you how to use code banking with the MCB517AC. Here are 7 source modules and one BL51 configuration module which will be located in the common area and from bank 0 to 5. When you step through this program with dScope for Windows you will see how bank switching works.
  • Page 52 Chapter 4. Programming /*----------------------------------------------------------------------- BANK0.C Copyright 1997 KEIL Software, Inc. ------------------------------------------------------------------------*/ #include <reg517.h> extern void func1(void); void func0(void) { P4 |= 0x01; /* switch LED on */ func1(); /* FUNCTION IN BANK 0 CALLS A FUNCTION IN BANK 1 */ P4 &= ~0x01;...
  • Page 53 MCB517AC Evaluation Board User’s Guide /*----------------------------------------------------------------------- BANK3.C Copyright 1997 KEIL Software, Inc. ------------------------------------------------------------------------*/ #include <reg517.h> extern void func4(void); void func3(void) { P4 |= 0x08; /* switch LED on */ func4(); /* FUNCTION IN BANK 3 CALLS A FUNCTION IN BANK 4 */ P4 &= ~0x08;...
  • Page 54 Chapter 4. Programming Using µVision to Create a Banked Program For this example we assume that you are already familiar with µVision concerning how to set up a project. In this example only the difference to a banked application is explained. In addition to a non-banked application you have to perform the following steps: Set the BL51 linker options for a banked project.
  • Page 55 MCB517AC Evaluation Board User’s Guide To set the Make options, select the Make… command from the Options menu. µVision displays the Make Options dialog box shown below. Select OC51 to get a separate OMF file for each bank. Use the following project setup to build a banked application:...
  • Page 56: Chapter 5. Using The 8051 Monitor

    Chapter 5. Using the 8051 Monitor Chapter 5. Using the 8051 Monitor The MCB517AC comes ready-programmed with the Keil Monitor51. The monitor programmed in the Monitor EPROM is setup to run at various baudrates and serial interfaces depending on the setting of DIP switches S3 and S4.
  • Page 57 MCB517AC Evaluation Board User’s Guide Starting the MON51 Terminal Program Use the following command line to start the MON51 terminal program. MON51 COM1|COM2|COM3|COM4 INT14|NOINT BAUDRATE(n) where: Specifies the serial port to use. You may use the COM port COM1: … COM4: number as an abbreviation.
  • Page 58: Utility Commands

    Chapter 5. Using the 8051 Monitor Utility Commands The MON51 terminal program supports the following commands: Exit MON51 and return to DOS. Exit Exit MON51 and return to DOS. Transmit the contents of a file. Echo the contents of the screen to a file. Display the help menu.
  • Page 59 MCB517AC Evaluation Board User’s Guide F3: Echo the Contents of the Screen to a File When you enter , MON51 responds with the following prompt. Alt+3 Output File: Here, you may enter a file where the contents of the screen will be copied. For...
  • Page 60: Index

    Jumper Comment Lines ........51 Default Setting ........5 Configurartion Jumper ......9 Configuration ........12 Configuring the MCB517AC ....5 Kit Contents..........1 Contents of MCB517AC Kit ....1 LED DIP Switch........8 Decode Logic ........13 DIP Switch ...........5 Default Settings ......5 DIP Switches ........6 MAX232..........14 Document conventions ......iv Memory Device ........13...
  • Page 61 MCB517AC Evaluation Board User’s Guide Monitor Memory Map ....... 27 Monitor Modes........9 S_CAN DIP Switch ......6 Monitor Program........ 48 S1 DIP Switch ........7 Monitor Status Display ...... 10 S2 DIP Switch ........7 S3 DIP Switch ........6 S4 DIP Switch ........

Table of Contents