Keil MCB517AC User Manual

Manual is about: SAB 80C517/80C537 Microcontroller Target Board with 81C90 Full CAN Controller and Banking Support

Summary of MCB517AC

  • Page 1

    Sab 80c517/80c537 microcontroller target board with 81c90 full can controller and banking support user’s guide 04.97.

  • Page 2

    Ii keil software information in this document is subject to change without notice and does not represent a commitment on the part of the manufacturer. The software described in this document is furnished under license agreement or nondisclosure agreement and may be used or copied only in accordance ...

  • Page 3: Preface

    Mcb517ac evaluation board user’s guide iii preface this manual describes the keil software mcb517ac evaluation board and the 8051 microcontroller software development tools. The following chapters are included: “chapter 1. Introduction” gives an overview of this user’s guide and provides a quick sta...

  • Page 4: Document Conventions

    Iv preface document conventions this document uses the following conventions: examples description readme.Txt bold capital text is used for the names of executable programs, data files, source files, environment variables, and commands you enter at the ms-dos command prompt. This text usually repres...

  • Page 5: Contents

    Mcb517ac evaluation board user’s guide v contents chapter 1. Introduction ..................................................................................... 1 quick start..................................................................................................................... 2 chapter...

  • Page 6

    Vi contents.

  • Page 7: Chapter 1.  Introduction

    Mcb517ac evaluation board user’s guide 1 chapter 1. Introduction thank you for letting keil software provide you with the mcb517ac evaluation board and software for the 8051 microcontroller family. With this kit you can generate code and then operate it on the mcb517ac evaluation board. This hands-o...

  • Page 8: Quick Start

    2 chapter 1. Introduction 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. Read about the defa...

  • Page 9: Chapter 2.  Setup

    Mcb517ac evaluation board user’s guide 3 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 sof...

  • Page 10: Using The McB517Ac

    4 chapter 2. Setup using the mcb517ac to use the mcb517ac evaluation board, you must: n connect the external serial port jack (com 0) to an serial port on your pc using the supplied serial cable. N connect power using a standard power supply. The serial cable lets your pc download program code and d...

  • Page 11: Configuring The McB517Ac

    Mcb517ac evaluation board user’s guide 5 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: n siemens sab 83c517a microcontroller n monitor uses serial in...

  • Page 12: Dip Switches

    6 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 connect...

  • Page 13

    Mcb517ac evaluation board user’s guide 7 monitor: default on the monitor switch selects if the monitor is used for debugging or if the mcb517ac operates with and user application eprom at ic23. When monitor is on, a the monitor memory mapping is enabled and you must operate the mcb517ac board with t...

  • Page 14

    8 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 le...

  • Page 15: Configuration Jumper

    Mcb517ac evaluation board user’s guide 9 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 p...

  • Page 16: Monitor Status Display

    10 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...

  • Page 17: Chapter 3.  Hardware

    Mcb517ac evaluation board user’s guide 11 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 yo...

  • Page 18: Cpu

    12 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. 5 volts dc is provided to th...

  • Page 19

    Mcb517ac evaluation board user’s guide 13 decode logic all memory address decode logic as well as other signal conversion is performed by two 20v8 pals at ic13 and ic22. Refer to “ pal equations” on page 22 for a complete listing of the pal equations used. Memory and i/o devices the mcb517ac maps th...

  • Page 20

    14 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. Please refer to “dip switch...

  • Page 21

    Mcb517ac evaluation board user’s guide 15 can gnd +5v can_l can_h can connector (db9m) gnd optional +5v can_l can_h 1 6 5 9 optional gnd can ports in addition to the can receive and transmit lines the 81c90 full can controller has two 8 bit i/o port extensions. Each of these pins can be configured a...

  • Page 22

    16 chapter 3. Hardware p1.0 - p1.7 p1.0 p1.1 p1.6 p1.7 +5v \psen ale p3.0 - p3.7 p3.0 p3.6 p3.1 p3.7 p5.0 - p5.7 p5.0 p5.6 p5.1 p5.7 p4.0 - p4.7 p4.0 p4.6 p4.1 p4.7 p7.0 - p7.7 p7.6 p7.0 p7.7 p7.1 db0 - db7 db6 db0 db7 db1 p6.0 - p6.7 p6.0 p6.6 p6.1 p6.7 p8.0 - p8.3 p8.0 p8.2 p8.1 p8.3 a8 - a15 a14 ...

  • Page 23: Schematics

    Mcb517ac evaluation board user’s guide 17 schematics.

  • Page 24

    18 chapter 3. Hardware.

  • Page 25

    Mcb517ac evaluation board user’s guide 19.

  • Page 26

    20 chapter 3. Hardware.

  • Page 27: Printed Board Assembly

    Mcb517ac evaluation board user’s guide 21 printed board assembly.

  • Page 28: Technical Data

    22 chapter 3. Hardware technical data supply voltage: 8v .. 12v dc supply current: typ. 300ma system clock: 12 mhz memory: 256 kbytes ram 128 kbytes monitor eprom (optional 256 kbytes user eprom) cpu: siemens 80c517a or 83c517a or 80c517 or 80c537 peripherals 2 rs232 interfaces can interface pal equ...

  • Page 29

    Mcb517ac evaluation board user’s guide 23 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]) begin 0: begin ; no banking a_p[15] = 0 ; monitor without banking a_r[15] = a15 a...

  • Page 30

    24 chapter 3. Hardware begin 0: begin ; no banking a_p[15] = a15 a_p[16] = 0 a_p[17] = 0 a_r[15] = a15 a_r[16] = 0 a_r[17] = 0 a_r17 = 0 end 1: begin ; 2 banks with a 1mbit * 8 eprom a_p[15] = a15 * /p6[5] a_p[16] = a15 * p6[5] a_p[17] = 0 a_r[15] = a15 a_r[16] = 0 a_r[17] = 0 a_r17 = 0 end 2: begin...

  • Page 31

    Mcb517ac evaluation board user’s guide 25 pin 13 /mon_on combinatorial ; input pin 14 /s[4] combinatorial ; input pin 15 /cs_user combinatorial ; output pin 16 /cs_can combinatorial ; output pin 17 /cs_ram combinatorial ; output pin 18 /cs_eprom combinatorial ; output pin 19 /rd_ram combinatorial ; ...

  • Page 32

    26 chapter 3. Hardware.

  • Page 33: Monitor Eprom Addresses

    Mcb517ac evaluation board user’s guide 27 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. Monitor version eprom add...

  • Page 35: Chapter 4.  Programming

    Mcb517ac evaluation board user’s guide 29 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...

  • Page 36

    30 chapter 4. Programming external memory layout in non-banked mode. Code memory xdata memory 00000h monitor eprom 0ffffh 0e800h 00000h 0ffffh 0f800h 0f700h on-chip xram *3 can-contoller user chip select 0f600h 0e800h unused user code area (v. Neumann mapped) user xdata area *1 (overlaps user code a...

  • Page 37

    Mcb517ac evaluation board user’s guide 31 code memory monitor eprom bank 0 xdata memory 00000h 0ffffh 0f800h 0f700h on-chip xram *3 can-contoller user chip select 0f600h 0e800h unused restricted area *1 common monitor eprom bank 1 common monitor eprom bank 4 common monitor eprom bank 5 common ... 08...

  • Page 38

    32 chapter 4. Programming 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. C51 mycode.C second...

  • Page 39: Blinky Example Program

    Mcb517ac evaluation board user’s guide 33 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...

  • Page 40

    34 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 µvis...

  • Page 41

    Mcb517ac evaluation board user’s guide 35 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 ...

  • Page 42

    36 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...

  • Page 43

    Mcb517ac evaluation board user’s guide 37 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 µvisi...

  • Page 44

    38 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 ...

  • Page 45

    Mcb517ac evaluation board user’s guide 39 this process it historically called making the project. While the make is running, µvision displays the status as shown below. If errors occur during the make process, a message window appears. If there were warnings or errors in your source file, you may in...

  • Page 46

    40 chapter 4. Programming when dscope starts, a screen similar to the following displays. To load the mon51.Dll cpu driver, type the following in the command window. Load mon51.Dll this is shown in the following figure. Command window register window module window.

  • Page 47

    Mcb517ac evaluation board user’s guide 41 typically, the first time you load the cpu driver for the 8051 monitor, you must set the com port and baudrate. If dscope cannot determine the com port and the baud rate automatically, the following dialog box appears informing you that dscope could not find...

  • Page 48

    42 chapter 4. Programming you may now single step through the blinky program by clicking on the 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 th...

  • Page 49: External Can Example

    Mcb517ac evaluation board user’s guide 43 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 nibbl...

  • Page 50

    44 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 can.P0lr = value; /* output data at can p0 pins 4-7 */ } } use the following command li...

  • Page 51: Code Banking Example

    Mcb517ac evaluation board user’s guide 45 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 prog...

  • Page 54

    48 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 p...

  • Page 55

    Mcb517ac evaluation board user’s guide 49 to set the make options, select the make… command from the options menu. µvision displays the make options dialog box shown below. Use the following project setup to build a banked application: for this example please select the common area (no bank number) ...

  • Page 56: Mon51 Terminal Program

    50 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. You may use t...

  • Page 58: Utility Commands

    52 chapter 5. Using the 8051 monitor utility commands the mon51 terminal program supports the following commands: n exit exit mon51 and return to dos. N f1 exit mon51 and return to dos. N f2 transmit the contents of a file. N f3 echo the contents of the screen to a file. N help display the help menu...

  • Page 59

    Mcb517ac evaluation board user’s guide 53 f3: echo the contents of the screen to a file when you enter f3 or alt+3 , mon51 responds with the following prompt. Output file: here, you may enter a file where the contents of the screen will be copied. For example: output file: debug.Prn directs mon51 to...

  • Page 60: Index

    54 index index 2 20v8 ...................................................13 8 8051 monitor......................................48 80c517 / 80c517a jumper ..................9 80c517 cpu ......................................12 80c517a cpu....................................12 b baudrate ...............

  • Page 61

    Mcb517ac evaluation board user’s guide 55 monitor memory map ....................... 27 monitor modes..................................... 9 monitor program................................ 48 monitor status display ...................... 10 n noint ............................................... 49 ...