Professional Documents
Culture Documents
Introduction 89C51 8051 Microcontroller Kit of Vi Microsystems PDF
Introduction 89C51 8051 Microcontroller Kit of Vi Microsystems PDF
Equipments Required:
Microcontroller Kit
Theory:
Specifications of the kit:
1. Hardware specifications:
• Intel 8051/89C51 at 12MHz
• Memory address
System EPROM location : 0000H to 3FFFH
and C000H to FFFFH
System RAM location : 4000H to BFFFH
Additional RAM : 0000H to 3FFFH
and C000H to FEFFH (For Micro-51 LC Kit), 0000H to
3FFFH and C000H to FF00H (For Vi89C51 kit)
Monitor Buffer : 4000H to 40FFH
User Program/Data RAM location : 4100H to BFFFH
User Data RAM location : 0000H to 3FFFH
and C000H to FEFFH (For Micro-51 LC Kit), 0000H to
3FFFH and C000H to FF00H (For Vi89C51 kit)
Memory mapped IO : FF00H to FF2FH
and FFC0H to FFFFH
Memory mapped IO expansion : FF20H to FFBFH
Monitor buffer should not be accessed by the user since it is used by the monitor
program.
• Input and Output
24 IO lines using two Programmable Peripheral Interface
IC (8255)
One RS232C Serial Interface using 8051 Serial port
Two 16 bit timers
One Centronics compatible Printer Interface through first
8255
Five interrupt sources
• Display
16x2 alpha numeric LCD display
6 digit, 7 segment red LED display with filter
• IBM keyboard interface
8051 Trainer kit (Vi89C51 SB) Interface Block diagram (In left page of record)
2. Software specifications:
The Microcontroller Kit Micro-51 LC of Vi Microsystems contains a high
performance 32kB monitor program. It is designed to respond to user input,
RS232C serial communications, etc. Some simple commands (Not case sensitive)
for the kit are:
3. Memory configurations:
All peripherals in Micro-51 LC of Vi Microsystems are memory mapped,
ie the peripheral will also be included in the memory configuration.
Memory allocation table is shown in table 1: (In left page of the records)
External Program
Memory
C000H EPROM Expansion area FFFFH
User Program Memory BFFFH
Combined with Data
4000H Memory
0000H Monitor EPROM area 3FFFH
External Data Memory
FF00H Memory Mapped IO FFFFH
C000H User Data Memory FEFFH
User Data Memory BFFFH
Combined with Program
4000H Memory
0000H User Data Memory 3FFFH
Allocation of EPROM:
The kit has a standard EPROM configuration of 32kB using one 27256 (32k x 8
EPROM). The address for the monitor EPROM is 0000H to 3FFFH and C000H to
FFFFH.
Allocation of RAM:
The kit has 32kB of R/W Program/Data memory using one 61256 (32k x 8
DRAM). The address is from 4000H to BFFFH, out of which the first 256 locations are
used by monitor as its data buffer area. Hence user program area starts from 4100H
onwards.
The kit has one more 32kB of R/W Data memory using one 61256 and the
address is from 0000H to 3FFFH and C000H to FEFFH.
Software features:
The kit accept any command related in the command prompt mode, indicated by a
‘#’ symbol in the leftmost position of the second row in the LCD module as shown below:
Micro-51
#_
Some functions that can be performed by the command are:
1. Display and substitute memory locations
2. Display and modify the registers of the 8051
3. Enter and initiate execution of your own program
4. Assemble and disassemble
Command line editor features:
Single line editor can process up to 40 characters
Valid key functions are:
Enter
To validate an entry
To increment memory location
To select from memory
-
To decrement memory locations
To select from menu
.
To terminate a command
Backsp
ace
To delete a character and comeback one position
Left arrow
To come back one position without deleting a character
Right arrow
To move right one position without deleting a character
Space bar
To provide space in a command or data
Del
To delete a character in a command line
0 to 9
Numeric character
a-z
Alphabetic character
Shift
Non-alphabetic and uppercase alphabetic character
Connector details:
The connectors available in kit are:
1. Power Connector (P1)
Single row 5 pin unicon Male connector
Signal description
Pin Details
1 GND
2 -12V
3 +12V
4 No connection
5 Vcc (+5V)
OPCODE
ADDRES & MNEMO
LABEL COMMENTS
S OPERAN NICS
DS
4100 MAIN 74 23 mov a,#23 Load accumulator by 23H
Add accumulator with 22H
4102 24 22 add a,#22 and store result in
accumulator
Load data pointer by external
4104 90 42 00 mov dptr,#4200
memory address 4200H
Move accumulator content to
4107 F0 movx @dptr,a external memory location
pointed by data pointer
If any carry in addition, go to
4108 50 04 jnc LOOP1
loop1 else next address
410A 74 01 mov a,#01 Load accumulator by 1H
410C 80 01 sjmp LOOP2 Go to loop2
410E LOOP1 E4 clr a Clear accumulator
Increment data pointer by
410F LOOP2 A3 inc dptr
one
Move accumulator content to
4110 F0 movx @dptr,a external memory location
pointed by data pointer
4111 STOP 80 FE sjmp STOP Halt
Procedure:
1. To enter assembly language program by placing opcodes in the program
memory.
The procedure is as follows:
Micro-51
#SP 4100 <CR>
(CR- Carriage Return)
Enter substitute memory command with 16 bit address of the program memory
Edit Program memory
4100 00-
Enter the opcode
Edit Program memory
4100 00-74 <CR>
Enter 74H
Edit Program memory
4101 00-22 <CR>
Enter 22H
Edit Program memory
4102 00-. <CR>
After entering the program came back to command prompt by entering ‘.’
Micro-51
#_
Micro-51
#SD 4400 <CR>
(CR- Carriage Return)
Enter substitute memory command with 16 bit address of the data memory
Edit Program memory
4400 00-
Micro-51
#_
3. To enter data/modify to 8051 registers
The procedure is as follows:
Micro-51
#R
Origin is displayed
ORIGIN : 4100 <CR>
6. To execute a program
Micro-51
#go 4100 <CR>
Go command followed by 16 bit address (Program memory) and enter
If the program has infinite loop or halt, the following message will appear
Executing…
To exit from execution and to return control to the command editor, press RESET key in
the kit.
Error conditions:
1. Attempting to modify the contents of ROM or non-existing memory locations
2. Invalid address (ie not within the range of 0000H to FFFFH)
3. Invalid data (ie not within the range of 00H to FFH)
4. Attempting to modify the contents of internal RAM
5. Invalid address of internal RAM (ie not within the range 0000H to 007FH)
Demo programs to do in the lab:
1. Program to add two 8-bit data in R0 and R1 of bank0 and store the result to R2 in the
same bank.
OPCODE
ADDRES & MNEMO
LABEL COMMENTS
S OPERAN NICS
DS
4100 MAIN 78 11 mov r0,#11 r0 = data 1
4102 79 FF mov r1,#ff r1 = data 2
4104 E8 mov a,r0 A = r0
4105 29 add a,r1 A = A + r1
4106 FA mov r2,a R2 = A
4107 HALT 80 FE sjmp HALT Halt the program
Results:
Studied about 8051 microcontroller kit