background image

MCS

®

251 Microcontroller Target Board

for Intel 251SB, Temic 251G1/A1,

and Intel 151 and 8051 Derivatives

User’s Guide 07.97

Summary of Contents for MCB251

Page 1: ...MCS 251 Microcontroller Target Board for Intel 251SB Temic 251G1 A1 and Intel 151 and 8051 Derivatives User s Guide 07 97...

Page 2: ...mitted in any form or by any means electronic or mechanical including photocopying recording or information storage and retrieval systems for any purpose other than for the purchaser s personal use wi...

Page 3: ...switches and configuration jumpers Chapter 3 Hardware provides detailed information about hardware including the schematic drawings for the MCB251 board the logic equations for the PLD and the memory...

Page 4: ...u must provide For example projectfile in a syntax string means that you must supply the actual project file name Occasionally italics are also used to emphasize words in the text Elements that repeat...

Page 5: ...nitor Modes 11 Monitor Status Display 11 Chapter 3 Hardware 13 Schematics 18 Printed Board Assembly 22 Technical Data 23 PAL Equations 23 Monitor EPROM Addresses 26 Chapter 4 Programming 27 Monitor Me...

Page 6: ...vi Contents...

Page 7: ...ormance These factors can be weighed against other production parameters to help you choose the optimum code and processor combination Alternatively you may choose just to play with the board make it...

Page 8: ...Write code to use the external UART External UART Example on page 46 Learn more about the Vision IDE Using Vision to Create the BLINKY Program on page 32 Learn more about the dScope debugger Using dSc...

Page 9: ...pin female 1 2 meters long wired one to one n A PC with an available RS 232 port If the port has a 25 pin connector a 9 pin male to 25 pin female adapter may be required n A device programmer is requ...

Page 10: ...applications The power cable provides power to the MCB251 evaluation board The MCB251 does not get power from the PC via the serial cable The following illustration shows MCB251 board and the importan...

Page 11: ...G1 microcontroller n Source Mode with 0 Wait States n Non Page Mode The default DIP switch settings are shown in the following table Switch Uart Int ext Uart SRC D2 Page Moni tor 51 151 MAP 1 MAP 2 LE...

Page 12: ...ON the chip select signal is generated and the Monitor program uses the external serial interface for communication The communication baud rate is 57600 BPS If ext_Uart is OFF the UART chip select is...

Page 13: ...g is enabled and you must operate the MCB251 board with the supplied Monitor EPROM When Monitor is OFF the User Memory Mapping is selected and you may insert an EPROM with your target application If y...

Page 14: ...000h C DFFFh von Neumann mapped C E800h C FFFFh UART X E400h X E7FFh USER X E000h X E3FFh von Neumann mapped User Memory Mapping Monitor DIP Switch is OFF Note DIP Switch 51 151 Page and SRC D2 must b...

Page 15: ...d to port 3 3 If INT1 is OFF the INT push button is not connected to port 3 3 PAGE NONP Default NONP These nine configuration jumpers select whether the MCB251 board operates in page mode or non page...

Page 16: ...N ON OFF OFF ON 0F1h 097h 251SB 251G1 or 251A1 Page Mode Binary Mode ON OFF OFF OFF ON 0F0h 097h 251SB 251G1 or 251A1 Non page Mode Source Mode OFF ON OFF OFF ON 0F3h 097h 251SB 251G1 or 251A1 Non pag...

Page 17: ...interface or baud rate generator for the internal serial interface For such devices it is impossible to use the INT RS232 interface Currently the Temic 251A1 and standard 8051 CPU are not compatible W...

Page 18: ...12 Chapter 2 Setup...

Page 19: ...rovides a circuit description The descriptions here will help you understand how the MCB251 board works and how you can easily interface to the various I O devices available The following block diagra...

Page 20: ...s the clock signal for the CPU NOTE You may insert only one CPU into the board at a time It is not possible to operate with a Temic 251A1 in socket IC4 and another 251 8051 CPU in socket IC1 simultane...

Page 21: ...AGE DIP switch To select a Monitor version for PAGE mode the PAGE DIP switch must be ON Decode Logic All memory address decode logic and other signal conversions are performed by the 20V8 PAL at IC12...

Page 22: ...er NMI is not set you may generate an NMI signal to the Temic 251G1 device Serial Port The MCB251 supports both the on chip serial port and an external UART Both use the MAX232 at IC10 to convert TTL...

Page 23: ...s necessary to create a 40 pin DIP plug for emulating an 8051 or 251 in a 40 pin DIP package are connected to this prototyping area In addition the data and address bus signals and the user chip selec...

Page 24: ...18 Chapter 3 Hardware Schematics...

Page 25: ...MCB251 Evaluation Board User s Guide 19...

Page 26: ...20 Chapter 3 Hardware...

Page 27: ...MCB251 Evaluation Board User s Guide 21...

Page 28: ...22 Chapter 3 Hardware Printed Board Assembly...

Page 29: ...totype board PATTERN Decoder and Boot Logic REVISION 1 0 AUTHOR Hans Schneebauer COMPANY Keil Elektonik GmbH DATE 10 06 96 CHIP IC6 PALCE20V8 PIN Declarations PIN 1 LED COMBINATORIAL INPUT PIN 2 RST C...

Page 30: ...A 13 A 12 A 11 A 17 A 16 A 15 A 14 Address 3f000 3ffff A 13 A 12 END ELSE BEGIN CS_ROM 1 ROM always enabled CS_RAM 0 RAM always disabled IF A 17 10 b11111010 THEN Address 3e800 3ebff BEGIN MON_RUN PSE...

Page 31: ...ND IF MAP 1 0 b11 THEN 8051 Mode BEGIN IF A 15 10 b111000 THEN ADDRESS e000 e3ff BEGIN CS_USER 1 END ELSE BEGIN CS_USER 0 END IF A 15 10 b111001 THEN ADDRESS e400 e7ff BEGIN CS_UART 1 END ELSE BEGIN C...

Page 32: ...FH 07FF8H 07FF9H 8051 Monitor Dallas 320 Version with Flash LED s251 08800H 09FFFH 251 Monitor Source Mode NOPAGE with Flash LED s 0A800H 0BFFFH 0BFF8H 0BFF9H 8051 151 Monitor NOPAGE with Flash LED s...

Page 33: ...s following sections provide more information about writing programs for the MCB251 evaluation board Monitor Memory Map The MCB251 evaluation board supports 248KB RAM memory which is addressable by fo...

Page 34: ...251 monitor uses the address space 0xFFDFC0 0xFFDFFF for monitor data The user application should not modify these locations Other than the interrupt vectors and the monitor data the monitor program...

Page 35: ...the serial interrupt you must reserve the interrupt vector space for the internal interrupt 0 or serial interrupt The 8051 monitor uses the address space X 0xDF00 X 0xDFFF for monitor data If you enab...

Page 36: ...H 0FF003DH 0FF007BH 0FF007DH In this command line the RESERVE directive tells the linker not to use the specified address space for the user application NOTE The only difference between writing progra...

Page 37: ...tion only to delay for LED flashes void main void unsigned int i Delay var unsigned char j LED var while 1 Loop forever for j 0x01 j 0x40 j 1 Blink LED 0 1 2 3 4 5 6 P1 0x80 do not change A17 port lin...

Page 38: ...the process of creating the BLINKY example program and testing it using the Vision IDE and dScope debugger Using Vision to Create the BLINKY Program To create the BLINKY example program using Vision...

Page 39: ...on the icon in the 251 Tools group When Vision starts select the New command from the File menu and Vision opens a new text window in which you may create the BLINKY program Enter the BLINKY example p...

Page 40: ...and Vision displays the Save As dialog box shown below To save the program as BLINKY C enter BLINKY C in the File Name text box at the top of the Save As dialog box You may want to save the flash prog...

Page 41: ...ons to use for the compiler assembler linker and make facility Additionally the project manager helps you compile link and test your target program To create a project file for BLINKY select the New P...

Page 42: ...Click the Insert button and choose the BLINKY C file you previously saved Then click the save button to save your changes to the project file To return to the Project Manager dialog box select the Edi...

Page 43: ...ler Options dialog box The only options you need to set for the BLINKY example are Include debug information and Source Mode for Code generation These controls are shown in the following figure NOTE I...

Page 44: ...Options dialog box shown below Enter the following text in the Reserve text boxes on the Misc tab shown above 0xFF0003 0xFF0005 0xFF003B 0xFF003D 0xFF007B 0xFF007D This creates the reserve directive...

Page 45: ...y in Vision You may do this in the Environment Pathspecs dialog box Open this dialog box using the Environment Pathspecs command in the Options menu You may specify the path to BIN directory the INC d...

Page 46: ...nally the make options control how Vision processes the files in your project Open the Make Options dialog box by selecting the Make command in the Options menu Make sure you select the Run L251 Linke...

Page 47: ...nd linking it with the appropriate library files This is 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...

Page 48: ...driver n Configure the CPU driver for the appropriate COM port and baud rate n Configure the CPU driver for serial break n Load the BLINKY program n Step through the BLINKY program Each of these step...

Page 49: ...3 When dScope starts a screen similar to the following displays To load the MON251 DLL CPU driver type the following in the command window load mon251 dll This is shown in the following figure Command...

Page 50: ...ch COM port you use Next you should configure the CPU driver to enable serial breaks To do this select the Configuration command from the Peripherals menu dScope displays the Configuration dialog box...

Page 51: ...I O ports in dScope Select the I O Ports command from the Peripherals menu and dScope displays the dialog box shown on the right As you step through the BLINKY program you will see how the Parallel Po...

Page 52: ...signed char far EXTSIO_ADDR 3 define EXTSIO_MCR volatile unsigned char far EXTSIO_ADDR 4 define EXTSIO_LSR volatile unsigned char far EXTSIO_ADDR 5 define EXTSIO_MSR volatile unsigned char far EXTSIO_...

Page 53: ...able all interrupts EXTSIO_MCR 0x00 dummy EXTSIO_LSR dummy EXTSIO_MSR dummy EXTSIO_RBR Send a character out the external UART void extsio_putchar unsigned char c while EXTSIO_LSR 0x20 0 EXTSIO_THR c R...

Page 54: ...57600 for counter 0 counter unsigned long i printf Hello World u r n unsigned counter 100 for i 0 i DELAY i wait Use the following command line to compile the external UART example program C251 EXTSIO...

Page 55: ...test your programs MON251 Terminal Program The MON251 terminal program communicates with the 251 monitor using one of your PC s serial ports MON251 lets you n Display the contents of the 251 s memory...

Page 56: ...ardware interrupts are not used You may use N as an abbreviation for NOINT BAUDRATE n Specifies the baud rate to use If this option is omitted MON251 defaults to 9600 baud The value n specifies the ba...

Page 57: ...eturns to DOS For example EXIT F1 Exit MON251 and Return to DOS When you enter F1 or Alt 1 MON251 responds with the following prompt EXIT MON251 y or n Enter Y to exit MON251 close all files and retur...

Page 58: ...creen changes If you enter the name of a file that already exists MON251 responds with the following prompt Overwrite existing file y or n Enter Y to overwrite the file HELP Display the Help Menu When...

Page 59: ...lection 10 D Dallas 320 6 14 Dallas 520 6 Decode Logic 15 DIP Switch Default Settings 5 SW1 5 DIP Switches 6 Document conventions iv E Example Program External UART 46 FLASH 31 ext_Uart DIP Switch 6 E...

Page 60: ...isplay 11 N NMI Jumper 9 NOINT 50 P PAGE NONP Jumper 9 PAGE DIP Switch 7 PAL 15 PAL Equations 23 Power Supply Circuitry 14 Printed Board Assembly 22 printf 46 Programming 27 Prototyping Area 17 Push B...

Reviews: