Sie sind auf Seite 1von 107

DYNA-51

USER'S MANUAL

Kailash Vaibhav, Park Site, B/H Godrej Colony, Vikhroli (W),


Mumbai 400079.
Tel: (91-22) 5181900. Fax: (91-22) 5181930 / 40
URL : w w w .d y n a l o g i n d i a .c o m email: sales@dynalogindia.com

Dynalog i
TABLE OF CONTENTS
CHAPTER 1 OVERVIEW ....................................................... 1-1

1.1 SYSTEM HARDWARE OF DYNA-51 ............................. 1-1


1.1.1 Micro controller ............................................................. 1-1
1.1.2 Memory ........................................................................... 1-1
1.1.3 LCD Display Interface.................................................... 1-2
1.1.4 Keyboard Interface:........................................................ 1-2
1.1.5 Serial Interface (CN6) .................................................... 1-2
1.1.6 Timer (CN5).................................................................... 1-2
1.1.7 Parallel I/O Interface (CN2, CN4) ................................. 1-2
1.1.8 Dyna Study Cards support.............................................. 1-3
1.2 SYSTEM SOFTWARE............................................................... 1-3
1.2.1 Local Mode:.................................................................... 1-3
1.2.2 Remote Mode:................................................................. 1-5

CHAPTER 2 GETTING STARTED........................................ 2-1

2.1 UNPACKING DYNA-51............................................................ 2-1

2.2 OPTIONS FOR DYNA-51 ....................................................... 2-1


2.3 POWER SUPPLY ..................................................................... 2-2

Dynalog ii
2.4 CONNECTORS ON BOARD...................................................... 2-2
2.5 CN6 SERIAL CONNECTOR ..................................................... 2-2
2.6 CN5 FOR TIMER SIGNALS ..................................................... 2-2

2.7 CN2 AND CN4 FOR 8255 I/O INTERFACE .............................. 2-3
2.8 P1 FOR SYSTEM SIGNALS BUS ............................................... 2-3

2.9 INSTALLATION PROCEDURE .................................................. 2-3

CHAPTER 3 MEMORY AND I/O DETAILS ........................ 3-1

3.1 MEMORY MAP................................................................... 3-1


3.2 SYSTEM I/O MAP............................................................... 3-1

CHAPTER 4 LOCAL MODE .................................................. 4-1

4.1 COMMAND SET FOR DYNA_51: ........................................... 4-2


4.1.1 D Display Memory......................................................... 4-2
4.1.2 E Edit Memory............................................................... 4-3
4.1.3 C Copy memory ............................................................. 4-3
4.1.4 F Fill Memory................................................................ 4-4
4.1.5 I Insert Byte ................................................................... 4-5
4.1.6 DL Delete Byte............................................................... 4-5
4.1.7 S Search Byte ................................................................. 4-6
4.1.8 CM Compare Block ....................................................... 4-6

Dynalog iii
4.1.9 HD Hex to decimal conversion...................................... 4-7
4.1.10 DH Decimal to hex conversion...................................... 4-8
4.1.11 A Assemble Command ................................................... 4-8
4.1.12 U Disassemble Command.............................................. 4-9
4.1.13 I Port Input .................................................................... 4-9
4.1.14 O Port Output .............................................................. 4-10
4.1.15 GO Run Program......................................................... 4-10
4.1.16 T Trace Command ........................................................ 4-11
4.1.17 BREAKPOINT COMMANDS ....................................... 4-13
4.1.18 R REGISTER DISPLAY ................................................ 4-15
4.1.19 Rno. EDIT REGISTER.................................................. 4-16

CHAPTER 5 REMOTE MODE............................................... 5-1

5.1 COMMAND SET FOR DYNA_51: ........................................... 5-2


5.1.1 D Display Memory........................................................ 5-2
5.1.2 E Edit Memory............................................................... 5-3
5.1.3 C Copy memory ............................................................. 5-4
5.1.4 F Fill Memory................................................................ 5-5
5.1.5 I Insert Byte ................................................................... 5-5
5.1.6 DL Delete Byte............................................................... 5-6

Dynalog iv
5.1.7 S Search Byte ................................................................. 5-6
5.1.8 CM Compare Block ....................................................... 5-7
5.1.9 HD Hex to decimal conversion...................................... 5-7
5.1.10 DH Decimal to hex conversion...................................... 5-8
5.1.11 A Assemble Command ................................................... 5-8
5.1.12 U Disassemble Command.............................................. 5-9
5.1.13 13. IN Port Input......................................................... 5-10
5.1.14 O Port Output .............................................................. 5-10
5.1.15 GO Run Program......................................................... 5-11
5.1.16 L Load File .................................................................. 5-12
5.1.17 W Write File................................................................. 5-13
5.1.18 T Trace Command ........................................................ 5-13
5.1.19 BREAKPOINT COMMANDS ....................................... 5-14
5.1.20 R REGISTER DISPLAY ................................................ 5-17
5.1.21 Rno. EDIT REGISTER.................................................. 5-17

CHAPTER 6 SYSTEM SUBROUTINES ................................ 6-1

6.1 LOCAL MODE ROUTINES ............................................... 6-3


6.1.1 LCD Routines ................................................................. 6-3
6.1.2 Keyboard Routines ......................................................... 6-7

Dynalog v
6.2 REMOTE MODE ROUTINES .......................................... 6-10
6.2.1 Receiver Status(Rx_sts) ................................................ 6-10
6.2.2 Transmitter Ready(Tx_sts) ........................................... 6-11
6.2.3 Receiver_Flush(Rx_flush) ............................................ 6-11
6.2.4 Console Input(CI) ......................................................... 6-12
6.2.5 Console Output (CO).................................................... 6-12
6.2.6 Display A Message (PRINT STRING).......................... 6-13
6.2.7 Read String And Display .............................................. 6-14
APPENDIX A CONNECTOR DETAILS...A-1
APPENDIX B LIST OF PIO CARDS..B-1
APPENDIX C DYNA-51 SERIES STUDY CARDS......C-1
APPENDIX D INTEL HEX FORMAT...D-1
APPENDIX E 8051 INSTRUCTION SET...E-1
APPENDIX F COMPONENT LAYOUT & CIRCUIT
DIAGRAMS......F-1

Dynalog vi
Dyna-51 Overview

Chapter 1
Overview

DYNA-51 is a 8051 based kit having advanced hardware and software features.
DYNA-51 is designed to be an ideal introduction to rapidly expanding field of Micro
controllers. It is an excellent tool for learning 8051 Micro controller and also for
development of 8051 based systems. The kit has LCD module interface and ASCII
keyboard interface. DYNA-51 has two modes of operation

1. Local mode
2. Remote Mode

1.1 SYSTEM HARDWARE OF DYNA-51

1.1.1 Micro controller

8 bit 8051 microcontroller operating at 12MHz.

1.1.2 Memory

32 KB EPROM contains firmware,


32 KB PROG/DATA RAM.

Dynalog 1-1
Dyna-51 Overview

1.1.3 LCD Display Interface

LCD Display of 40 characters by 2 lines is provided.

1.1.4 Keyboard Interface:

An ASCII keyboard for input.

1.1.5 Serial Interface (CN6)

RS-232 port is provided for serial interface. 8250 USART along with 1488,
1489 driver chips provides necessary signals brought out on a 9 pin D type
connector. Baud rates form 300 to 9600 can be selected through software.

1.1.6 Timer (CN5)

Three channels of 16 bit Timer/counter are provided using 8254. The


signals are brought out on 10-pin FRC connector (CN5).

1.1.7 Parallel I/O Interface (CN2, CN4)

Two 8255's are present onboard. All the 48 I/O lines are brought out on the
two numbers of 26 pin FRC male connectors compatible with DYNA-PIO
cards (CN2, CN4).

Dynalog 1-2
Dyna-51 Overview

1.1.8 Dyna Study Cards support

A 50 pin FRC male connector (P1) provided is for bus expansion purpose.
All the address and data lines along with interrupts are terminated on this
connector. Dyna Series Study Cards can be interfaced through this
connector.

1.2 SYSTEM SOFTWARE

1.2.1 Local Mode:

The Local Mode supports following commands:

Command Function Syntax


D Display Memory D strt end <CR>
E Edit Memory E strt<CR>
C Copy Memory C strt end destination<CR>
F Fill Memory F strt end Data<CR>
I Insert Byte I strt end Data <CR>
DL Delete Byte DL strt end <CR>
S Search Byte S strt end Data <CR>

Dynalog 1-3
Dyna-51 Overview

Command Function Syntax


CM Compare Block CM strt end Destination <CR>
HD Hex to decimal conversion HD Hexvalue <CR>
DH Decimal to Hex conversion DH decimalvalue <CR>
A Assemble Command A strt address <CR>
U Disassemble command U strt end <CR>
I Port Input IN addr <CR>
O Port Output O addr Data <CR>
GO Run Program GO Addr<CR>
T Single Step T strt_addr <CR>
BR Enter breakpoint BR partition [,partition]..
BRD Display breakpoint BRD <CR>
BRE Delete breakpoint BRE BRno.<CR>
BRC Clear breakpoint BRC<CR>
R Register display R<CR>
Rno. Edit register Rno.= DATA<CR>

Dynalog 1-4
Dyna-51 Overview

1.2.2 Remote Mode:

The remote (serial) mode supports the following commands:

Command Function Syntax


D Display Memory D strt end <CR>
E Edit Memory E strt<CR>
C Copy Memory C strt end destination<CR>
F Fill Memory F strt end Data<CR>
I Insert Byte I strt end Data <CR>
DL Delete Byte DL strt end <CR>
S Search Byte S strt end Data <CR>
CM Compare Block CM strt end Destination <CR>
HD Hex to decimal conversion HD Hexvalue <CR>
DH Decimal to Hex conversion DH decimalvalue <CR>
A Assemble Command A strt address <CR>
U Disassemble command U strt end <CR>
I Port Input IN addr <CR>
O Port Output O addr Data <CR>
GO Run Program GO Addr<CR>
L Load File (Download) L <CR>
W Write File (Upload) W strt end <CR>
Trace File T strt_addr <CR>

Dynalog 1-5
Dyna-51 Overview

Command Function Syntax


BR Enter breakpoint BR partition [,partition]..
BRD Display breakpoint BRD <CR>
BRE Delete breakpoint BRE BRno.<CR>
BRC Clear breakpoint BRC<CR>
R Register display R<CR>
Rno. Edit register Rno.= DATA<CR>

Dynalog 1-6
Dyna-51 Getting Started

Chapter 2
Getting Started

2.1 UNPACKING DYNA-51

While unpacking make sure that the following items are present on
Dyna-51 kit fitted in an attractive acrylic box:

1. Kit with 8 bit Intel 8051, 32 KB ROM, 32 KB RAM and support


chips 8254, 8250, 8255 & 8279.
2. LCD Display
3. ASCII Keyboard.
4. Manual

2.2 OPTIONS FOR DYNA-51

1. Switch mode Power Supply Model SMPS-03A.


2. Serial Cable for RS232 Port.
3. 26 pin FRC cables for interfacing 8255 PIO lines.
4. PIO cards from Dynalog supported on 8255 interface connector.
5. DYNA-Series Study Cards from Dynalog.

Dynalog 2-1
Dyna-51 Getting Started

2.3 POWER SUPPLY

The kit is used with the Dynalog's SMPS 03A Model Power Supply. The 6 pin
female connector can be plugged in 6 pin male connector soldered onboard.

The power requirement of Dyna-51 board is:


+5 V 3 Amps
+12 V 1A
-12 V 0.5 A

2.4 CONNECTORS ON BOARD

All pin details of all the connectors are given in Appendix A.

2.5 CN6 SERIAL CONNECTOR

All the signals for the RS 232C compatible Serial Interface are brought out
on the 9-pin D type male (DTM) connector. The serial cable can be directly
connected to this connector.

2.6 CN5 FOR TIMER SIGNALS

10 Pin FRC connector is provided which has Timer interface lines


terminated on it.

Dynalog 2-2
Dyna-51 Getting Started

2.7 CN2 AND CN4 FOR 8255 I/O INTERFACE

Two 26 pin FRC male connectors are provided on board for 8255's I/O
Interface. Connector can be used for interfacing DYNA-PIO cards.
Centornics printer can be interfaced through this connector.

2.8 P1 FOR SYSTEM SIGNALS BUS

A 50 pin FRC male connector provided is for Bus expansion. All the address
Data and control lines along with interrupt lines are terminated on this
connector. The same connector is used to interface DYNA-51 with DYNA-
Study cards given in Appendix.

2.9 INSTALLATION PROCEDURE

1. First connect Power Supply (SMPS-03A) cable (6-pin female connector) to


the system supply connector (CN3) with proper orientation.
2. For Serial mode connect the serial cable to 9-pin DTM connector.
3. Switch on the Power Supply. LCD display will show

DYNALOG (INDIA) LTD.


Press S for Serial or CR for Key Mode

4. Press S key for Remote (Serial) Mode or CR for Local Mode.


Now the system is ready for use.

Dynalog 2-3
Dyna-51 Memory And I/O Details

Chapter 3
Memory And I/O Details

3.1 MEMORY MAP

The memory map of DYNA-51 is shown in the following table:

00000-07FFF 32KB PROGRAM MEMORY


EPROM 27256 contains firmware
8000-93FF Reserved
9400-FFFF PROG / DATA RAM

3.2 SYSTEM I/O MAP

The I/O devices are addressed using lower Data Memory space. The data memory
map for different chips is given below:

8255 (#1) PPI


BASE = 100H
BASE + 0 100H PORT A
BASE + 1 101H PORT B
BASE + 2 102H PORT C
BASE + 3 103H Control Word Register

Dynalog 3-1
Dyna-51 Memory And I/O Details

8255 (#2) PPI


BASE = 180H
BASE + 0 180H PORT A
BASE + 1 181H PORT B
BASE + 2 182H PORT C
BASE + 3 183H Control Word Register

8254 Timer
BASE = 200H
BASE + 0 200H Counter 0
BASE + 1 201H Counter 1
BASE + 2 202H Counter 2
BASE + 3 203H Control Word Register

8250 USART
BASE = 280H
BASE + 0 280H Transmit Buffer
BASE + 0 280H Receive Buffer
BASE + 0 280H Divisor Latch LSB
BASE + 1 281H Divisor Latch MSB
BASE + 1 281H Interrupt Enable Register
BASE + 2 282H Interrupt Identification Register
BASE + 3 283H Line Control Register
BASE + 4 284H Modem Control Register
BASE + 5 285H Line Status Register
BASE + 6 286H Modem Status Register

Dynalog 3-2
Dyna-51 Memory And I/O Details

LCD
BASE = 300H
STUDY CARDS
IOEXP - 400 to 407H
IOEXP1 - 408 to 40FH
IOEXP2 - 410 to 417H
IOEXP3 - 418 to 41FH

INTERRUPTS
There are five interrupts provided in the 8051. Three of these are generated
automatically by internal operations, Timer flag 0, Timer flag 1, and the serial port
interrupt. Two interrupts are triggered by external signals connected to INT0 and
INT1. Interrupt INT0 is used by the system monitor for single stepping. Serial port
is used for keyboard interface. Both internal Timers are available for the user.
INTERRUPT VECTORS for INT 0 and the timer interrupts are programmed by
system monitor in program memory as follows.

3.3 INTERRUPT VECTOR LOCATION

IE1 (external interrupt INT1) 9360H


TF0 (Timer Flag 0) 9370H
TF1 (Timer Flag 1) 9380H

Dynalog 3-3
Dyna-51 Memory And I/O Details

Jump instruction can be placed on these locations pointing to user Interrupt


Service Routine (ISR).

EX:
If he user wants to use INT 1 and ISR is at address location 9600H, the jump
instruction should be entered at location 9360H using Edit memory command.
9360 02 96 00 ; LJMP to 9600H

) NOTE: Internal RAM is used by the System Monitor and is not available to the user.

Dynalog 3-4
Dyna-51 Local Mode

Chapter 4
Local Mode

DYNA-51 has a built in keyboard. In this mode monitor processes all the inputs
entered through the keyboard and displays the results on the LCD display.

When system is switched on the display shows, sign-on message, 'Press 'S' for
Serial or 'CR' for keypad mode. Press 'CR' key to switch to keypad mode. The
prompt DYNA-51 will appear on the screen. This indicates that the system is ready
to accept a command from you.

In the following paragraph various commands are discussed. Each command is


described and examples are included for clarity. Each command can be terminated
by pressing a 'ESC' key. The command is not acted upon until the carriage return
is sensed. You may abort any command, before entering the carriage return. In
case any wrong entry is entered, the display will show 'Invalid Command'
message, you can press 'ESC' key and then type valid command.

Dynalog 4-1
Dyna-51 Local Mode

4.1 COMMAND SET FOR DYNA_51:

4.1.1 D Display Memory

Syntax: D strt end <CR>

D strt
Selected area of addressable memory may be accessed and displayed by
the D command. The D command produces a formatted listing of the
memory contents between strt (starting address) and end (end address)
inclusive on the display.
Each line of the listing begins with the address of the first memory
location displayed on that line, represented as 4 hexadecimal digits,
followed by contents of 8 memory locations, each one represented by 2
hexadecimal digits.

EX. D 1000 1020 <CR>


1000: 75 F0 0A E5 1B A4 25 1C ...........

RULES:
1. strt address should be less than end address.
2. Addresses are accepted as hex value.
3. If strt address lies in program memory, then end address should
not lie in data memory.

Dynalog 4-2
Dyna-51 Local Mode

4. In the LOCAL mode press 'Enter' key to display next screen and
'ESC' key to return to command prompt.

4.1.2 E Edit Memory

Syntax: E strt<CR>

The E command allows you to examine and modify memory locations


individually.

EX. E 9400 <CR>


9400: 02.04 22.08
In the above example old contents of memory locations 9400 and 9401
was 02,22.This contents was change to 04,08 respectively.

RULES:
1. Press 'Space bar' key to edit next location or Press 'Enter' key to
exit edit mode.

4.1.3 C Copy memory

Syntax: C strt end destination<CR>

Dynalog 4-3
Dyna-51 Local Mode

When using C command, the contents of the memory block from the "strt
address to "end address" are moved to consecutive memory locations
beginning at "destination address".

EX. C 9400 9403 9408 <CR>


9400: 04 22 32 02
9408: 04 22 32 02

In the above example contents of memory locations 9400 to 9403 are copied to
memory locations starting from 9408 to 940B.

RULES:
1. Destination should be greater than Strt address.

4.1.4 F Fill Memory

Syntax: F strt end Data<CR>


This command is used to fill an area of memory with a data byte.

EX. F 9400 940f 0Ah <CR>


9400 to 940F=0a

Dynalog 4-4
Dyna-51 Local Mode

RULES
Press 'ESC" key to return to command prompt.

4.1.5 I Insert Byte

Syntax: I strt end Data <CR>

This command is used to insert a data byte in a given block of memory.


The remaining block shifts down by one position, up to the end address
specified.

EX. I 9400 9407 02 <CR>

This command will insert 02h at memory location 9400h.

RULES:

1. strt address should be less than end address


2. strt should lie in RAM area.

4.1.6 DL Delete Byte

Syntax : DL strt end <CR>

Dynalog 4-5
Dyna-51 Local Mode

This command is used to delete a data byte in a given block of memory.


The remaining block shifts up by one position, up to the end address
specified.

EX. DL 9400 9406 <CR>


This command will delete byte at memory location 9400h.

4.1.7 S Search Byte

Syntax: S strt end Data <CR>


The Search command searches a block of memory for a given data byte
and lists the address where the data byte occurs.

EX. S 9400 9408 0Ah <CR>


9400:0A
9401:0A

RULES:
1. Press 'Enter' to see next memory location.

4.1.8 CM Compare Block

Syntax: CM strt end Destination <CR>

Dynalog 4-6
Dyna-51 Local Mode

This command is used to compare byte by byte a block of memory from


strt address to end address with a given block of memory starting from
destination address. Whenever the first mismatch is found, the address
and bytes are displayed. Remaining mismatches can be scanned with
'Enter' key. If there is no mismatch then "Compare OK" message will be
displayed.

EX. CM 9400 9405 9410 <CR>


9400:0A 9410:FF
9401:0A 9411:FF
9402:06 9412:FF
9403:0D 9413:06
9404:01 9414:00
9405:05 9415:0C

4.1.9 HD Hex to decimal conversion

Syntax: HD hexvalue <CR>


This command is used to convert a Hexadecimal number to decimal
equivalent.
EX. 1. HD FFFF <CR>
65535
2. HD 0DFA <CR>
3578

Dynalog 4-7
Dyna-51 Local Mode

4.1.10 DH Decimal to hex conversion

Syntax: DH decimalvalue <CR>


This command is used to convert a decimal number to its hexadecimal
equivalent.

EX. 1. DH 4095 <CR>


0FFF
2. DH 65535 <CR>
FFFF

4.1.11 A Assemble Command

Syntax: A strt address <CR>

The A command accepts assembly language statements and assembles


each statement into executable machine code. These assembled machine
codes are stored in a specified memory on line-by-line basis at the time of
entry.

EX. A 9400 <CR>


9400: MOV A,#04H <CR>
9402: INC A <CR>
9403: MOV R1,A<CR>
9404: <CR>

Dynalog 4-8
Dyna-51 Local Mode

) Notes: (i) After entering assembly language statement press <CR> for
next line.

(ii) To end the assembly press <CR> without entering anything.

4.1.12 U Disassemble Command

Syntax: U strt end <CR>

The U command followed by the address disassembles the program from


the specified location. The U command translates machine instruction into
assembly language mnemonics.

EX. U 9400 9406 <CR>


9400: 7407 MOV A,#04h
9402: 04 INC A
9403: 02900A MOV R1, A

4.1.13 I Port Input

Syntax: IN addr <CR>

Dynalog 4-9
Dyna-51 Local Mode

The Port Input (IN) command is used to display a byte or word at an input
port. The Port Input command inputs a byte from the port specified by "port
address" and displays the byte.

EX. IN 100 <CR>


0100:00
This command reads location 100h and displays the byte.

4.1.14 O Port Output

Syntax: O addr Data <CR>

The port output command is used to output a byte to an output port. The
Port Output command outputs the byte entered as "Data" to the output
port specified by "port address".

EX. O 103 80 <CR>


0103:80

This command outputs data 80h at 103h location.

4.1.15 GO Run Program

Syntax: GO Addr<CR>

Dynalog 4-10
Dyna-51 Local Mode

The GO command is used to execute user program from the address


stated in this command.
To illustrate the operation of[GO] command the sample program is
given below:

C000: MOV A,#02h


C002: MOV R0, #02h
C004: ADD A, R0
C005: MOV DPRT,#C050h
C008: MOVX @DPTR,A
C009: LJMP 6000H ; Jump to sign on prompt

) Notes: (i) To execute this program syntax is,


GO C000<CR>
(ii) After executing the program, check the content of location
C050H. It should contain data 04.
(iii) Instruction LJMP 6000H, returns to the sign on prompt.

4.1.16 T Trace Command

Syntax: T strt_addr <CR>


Or
T <CR> (To continue single stepping from the exited address.)

Dynalog 4-11
Dyna-51 Local Mode

Trace command executes one or more instructions, breaking after each


instruction. After executing each instruction, the contents of the
accumulator (acc), the program status word (PSW), the stack pointer (SP),
the data pointer (DPTR), the program counter (PC) and the registers R0-
R7 is displays on LCD display.

EX. T C000 <CR>


C000: 00 nop
A=00 PSW=00 SP=4C DPTR=0380 PC=C001
R0-R7: 02 03 04 00 00 05 08 09

In the above example trace command, executes the instruction at address


C000h and displays the values of the updated program counter,
accumulator, data pointer, PSW, stack pointer. Press Space Bar to check
the content of registers R0-R7. To continue the single stepping, press
'enter'.

RULES:

1. Press 'ENTER' to continue or 'ESC' to exit.


2. Press 'SPACE BAR' to toggle between sets of registers display.

Dynalog 4-12
Dyna-51 Local Mode

) NOTE: After pressing 'ESC' you can edit register.

4.1.17 BREAKPOINT COMMANDS

Breakpoint commands allows to set the breakpoint anywhere in the


program stored in RAM. Total 32 numbers of breakpoints can be set. After
entering breakpoint address, run the program using GO command. When
the program reaches the break point address control is transferred to the
monitor program. The display will show the breakpoint address with the
instruction and the present register contents. Register contents can be
modified after exiting using ESC key. The execution the program can be
continued from the breakpoint address. Program will be executed till next
breakpoint if set.

a) BR ENTER BREAKPOINT

Syntax: BR partition [,partition].

To set one or more breakpoints or partitions of breakpoints. This command


allows to set the breakpoint anywhere in the program stored in RAM. After
entering breakpoint address run the program using the [GO] command.

Dynalog 4-13
Dyna-51 Local Mode

EX: BR C009 C012 C01B C024 C02D<CR>

This examples sets breakpoints at addresses C009H, C012H, C01BH,


C024H, C02DH
.
RULES:

1. A maximum of 5 Breakpoint can be given on the command


line at a time.
2. A maximum of 32 Breakpoints can be set.

b) BRD DISPLAY BREAKPOINT

Syntax: BRD<CR>

Individual addresses are displayed one after the other wherever


breakpoints are set.

RULES:
1. Press 'ENTER' to continue or 'ESC' to exit.

c) BRE DELETE BREAKPOINT

Syntax: BRE BRno.<CR>

Dynalog 4-14
Dyna-51 Local Mode

This command is used delete the particular breakpoint specified by the


breakpoint number (Brno).

EX: BR C009 C012 C01B C024<CR>


BRE 3<CR>

The command BRE 3 deletes the 3rd breakpoint i.e. C01Bh.

d) BRC CLEAR BREAKPOINT

Syntax: BRC<CR>
This command clears any breakpoints previously set.

4.1.18 R REGISTER DISPLAY

Syntax: R<CR>
This command is used to examine the contents of ACC, PSW, SP, DPTR,
PC and registers R0 to R7.

EX. R <CR>
R0- R7 : 02 04 05 06 07 09 01 00

Dynalog 4-15
Dyna-51 Local Mode

RULES:
1. Press 'SPACE BAR' to toggle display.

4.1.19 Rno. EDIT REGISTER

Syntax: Rno.= DATA<CR>


This command is used to modify the contents of register R0 to R7, ACC,
SP, PSW, DPTR, PC individually.

EX. 1. R0=12<CR>
2. R4=09<CR>
3. PSW=40<CR>
4. DPTR=D000<CR>
5. PC=C009<CR>

Dynalog 4-16
Dyna-51 Remote Mode

Chapter 5
Remote Mode

This mode is used for serial I/O communication. The serial communication takes
place through RS-232C compatible port that can be integrated with a computer
terminal. The IC 8250, controls the serial I/O interface in the DYNA-51with the
following setting.
Baudrate: 9600, 8bits, 1start bit, 1 stop bit, no parity

The REMOTE mode of DYNA-51 contains almost all the commands available in
the LOCAL mode. On Power-on or Reset, Remote terminal shows sign-on
message
Dynalog (I) Ltd.
and LCD display shows, sign-on message.

DYNALOG (INDIA) LTD.


Press S for Serial or CR for Key Mode

Press 'S' key from keyboard to switch to serial mode.

The message 'Serial Mode' will appear on the LCD display and prompt DYNA-51
will appear on the terminal. This indicates that DYNA-51 system is now ready to be

Dynalog 5-1
Dyna-51 Remote Mode

used in the remote mode from the terminal. You can now type command from
terminal keyboard. Each command to be terminated by a carriage return. In case
any wrong entry is entered, the screen will show ' Invalid Command ' message.
Press ESC key and type valid command.

The later paragraph will explain the operation of various commands supported
under the Remote Mode.

5.1 COMMAND SET FOR DYNA_51:

5.1.1 D Display Memory

Syntax: D strt end <CR>


or
D strt

Selected area of addressable memory may be accessed and displayed by


the D command.: The D command produces a formatted listing of the
memory contents between strt (starting address) and end (end address)
inclusive on the display.

Each line of the listing begins with the address of the first memory location
displayed on that line, represented as 4 hexadecimal digits, followed by
contents of 8 memory locations, each one represented by 2 hexadecimal
digits.

Dynalog 5-2
Dyna-51 Remote Mode

EX. D 1000 1020 <CR>


1000: 75 F0 0A E5 1B A4 25 1C ...........
1008: 90 81 CE 12 4C 9D EF F0 ...........
1010: 05 1D 05 1C 90 80 3B 74 ...........
1018: 01 F0 90 80 39 F0 90 80 ...........
1020: 38

RULES:
1. Strt address < End address.
2. Addresses are accepted as hex value
3. If strt address lies in program memory, then end address should
not lie in data memory.

5.1.2 E Edit Memory

Syntax: E strt<CR>

The E command allows you to examine and modify memory locations


individually.

EX. E 9400 <CR>


9400: 02.04 22.08

Dynalog 5-3
Dyna-51 Remote Mode

In the above example old contents of memory locations 9400 and 9401
was 02,22.This contents was change to 04,08 resp.

RULES:
1. Press 'Space bar' key to edit next location or Press 'Enter' key to
exit edit mode.

5.1.3 C Copy memory

Syntax: C strt end destination<CR>

When using C command, the contents of the memory block from the "strt
address" to "end address" are moved to consecutive memory locations
beginning at "destination address".

EX. C 9400 9403 9408 <CR>


9400: 04 22 32 02
9408: 04 22 32 02

In the above example contents of memory locations 9400 to 9403 are copied to
memory locations starting from 9408 to 940B.

RULES:
1. Destination should be greater than Strt address.

Dynalog 5-4
Dyna-51 Remote Mode

5.1.4 F Fill Memory

Syntax: F strt end Data<CR>

This command is used to fill an area of memory with a data byte.

EX. F 9400 940F 0AH <CR>

5.1.5 I Insert Byte

Syntax: I strt end Data <CR>

This command is used to insert a data byte in a given block of memory.


The remaining block shifts down by one position, up to the end address
specified.

EX. I 9400 9407 02 <CR>

This command will insert 02H at memory location 9400H.

RULES:
1. strt address should be less than end address
2. strt should lie in RAM area.

Dynalog 5-5
Dyna-51 Remote Mode

5.1.6 DL Delete Byte

Syntax : DL strt end <CR>


This command is used to delete a data byte in a given block of memory.
The remaining block shifts up by one position, up to the end address
specified.

EX. DL 9400 9406 <CR>

This command will delete byte at memory location 9400H.

5.1.7 S Search Byte

Syntax: S strt end Data <CR>


The Search command searches a block of memory for a given data byte
and lists the address where the data byte occurs.

EX. S 9400 9408 0Ah <CR>


9400:0A
9401:0A
....:..
....:..
....:..
9408:0A

Dynalog 5-6
Dyna-51 Remote Mode

5.1.8 CM Compare Block

Syntax: CM strt end Destination <CR>

This command is used to compare byte by byte a block of memory from


strt address to end address with a given block of memory starting from
destination address. If there is mismatch then address and bytes are
displayed. If there is no mismatch then "Compare OK" message will be
displayed.

EX. CM 9400 9405 9410 <CR>


9400:0A 9410:FF
9401:0A 9411:FF
9402:06 9412:FF
9403:0D 9413:06
9404:01 9414:00
9405:05 9415:0C

5.1.9 HD Hex to decimal conversion

Syntax: HD Hexvalue <CR>

This command is used to convert a Hexadecimal number to decimal


equivalent.

Dynalog 5-7
Dyna-51 Remote Mode

EX. 1. HD FFFF <CR>


65535
2. HD 0DFA <CR>
3578

5.1.10 DH Decimal to hex conversion

Syntax: DH decimalvalue <CR>

This command is used to convert a decimal number to its hexadecimal


equivalent.

EX. 1. DH 4095 <CR>


0FFF
2. DH 65535 <CR>
FFFF

5.1.11 A Assemble Command

Syntax: A strt address <CR>

The A command accepts assembly language statements and assembles


each statement into executable machine code. These assembled machine

Dynalog 5-8
Dyna-51 Remote Mode

codes are stored in a specified memory on line-by-line basis at the time of


entry.

EX. A 9400 <CR>


9400: MOV A,#04<CR>
9402: INC A<CR>
9403: MOV R1,A<CR>
9404: <CR>

5.1.12 U Disassemble Command

Syntax: U strt end <CR>

The U command followed by the address disassembles the program from


the specified location. The U command translates machine instruction into
assembly language mnemonics.

EX. U 9400 9406 <CR>


9400: 7407 MOV A,#04h
9402: 04 INC A
9403: 02900A MOV R1, A

Dynalog 5-9
Dyna-51 Remote Mode

5.1.13 13. IN Port Input

Syntax: IN addr <CR>

The Port Input (IN) command is used to display a byte or word at an input
port. The Port Input command inputs a byte from the port specified by "port
address" and displays the byte.
EX. IN 100 <CR>
0100:00
This command reads location 100h and displays the byte.

5.1.14 O Port Output

Syntax: O addr Data <CR>


The port output command is used to output a byte to an output port. The
Port Output command outputs the byte entered as "Data" to the output
port specified by "port address".

EX. O 103 80 <CR>


0103:80
This command outputs data 80h at 103h location.

Dynalog 5-10
Dyna-51 Remote Mode

5.1.15 GO Run Program

Syntax: GO Addr<CR>

The GO command is used to execute user program from the address


stated in this command.

To illustrate the operation of [GO] command the sample program is given


below.

C000: MOV A,#02h


C002: MOV R0,#02h
C004: ADDA, R0
C005: MOV DPTR, # C050H
C008: MOVX @ DPTR, A
C009: LJMP 6000H ;control is transferred to signon prompt

) Notes: (i) To execute this program syntax is,


GO C000<CR>
(ii) After executing the program, check the content of location
C050H. It should contain data 04.
(iv) Instruction LJMP 6000H, transfers he control to sign on
prompt.

Dynalog 5-11
Dyna-51 Remote Mode

5.1.16 L Load File

Syntax: L <CR>

The load file command allows the monitor to read a Intel Hex file from a
terminal (Downloading process) and load it into DYNA_51 memory.
The procedure is as follows:
The following explanation assumes that the user is using Terminal
emulation utility Tango and the IBM PC compatible machine.
1. Enter L command on the DYNA_51
2. The DYNA_51 responds with the following message: LOADING
3. Press F9 and Enter the command to transmit a file in the development
system.
4. Enter file Intel hex file name to be downloaded.
5. Press F9 and downloading starts.

When transfer of data is complete, the DYNA_51 returns to command


prompt. The program is downloaded at the location specified in the Hex
file.

The L command sets the DYNA_51 program counter to the start of


execution address in the file.

Dynalog 5-12
Dyna-51 Remote Mode

5.1.17 W Write File

Syntax: W strt end <CR>

The write command allows a block of memory from DYNA_51 to be


transferred to a terminal (uploading process) in Intel hex file formats.
To use the write command, enter W "start address" and "end address" of
the memory block to be transferred.

) NOTE: The target system (Terminal) should be ready to accept hex data before
execution of this command.

EX. W 0C000 0C010<CR>


:10C0000012055912054CF599F050F0F074029004D5
:01C01000032C
:00000001FF

5.1.18 T Trace Command

Syntax: T strt_addr <CR>

T <CR> (To continue single stepping from the exited address.)

Trace command executes one or more instructions, breaking after each


instruction. After executing each instruction, the contents of the

Dynalog 5-13
Dyna-51 Remote Mode

accumulator (acc), the program status word (PSW), the stack pointer (SP),
the data pointer (DPTR), the program counter (PC) and the registers R0-
R7 are displayed on LCD display.

EX. T C000 <CR>


C000: 00 nop
A=00 PSW=00 SP=4C DPTR=0380 PC=C001
R0-R7 08 09 06 07 00 00 01 03

In the above example trace command, executes the instruction at


address C000h and displays the values of the updated program
counter, accumulator, data pointer, PSW, stack pointer and
registers R0-R7. To continue the single stepping, press 'enter'.

RULES:
1. Press 'ENTER' to continue or 'ESC' to exit.
2. Press 'SPACE BAR' to toggle display.

) NOTE: After pressing 'ESC' you can edit register.

5.1.19 BREAKPOINT COMMANDS

Breakpoint commands allows to set the breakpoint anywhere in the


program stored in RAM. Total 32 numbers of breakpoints can be set. After
entering breakpoint address, run the program using GO command. When

Dynalog 5-14
Dyna-51 Remote Mode

the program reaches the break point address control is transferred to the
monitor program. The display will show the breakpoint address with the
instruction and the present register contents. Register contents can be
modified after exiting using ESC key. The execution the program can be
continued from the breakpoint address. Program will be executed till next
breakpoint if set.

a) BR ENTER BREAKPOINT

Syntax: BR partition [,partition]..

To set one or more breakpoints or partitions of breakpoints. This command


allows to set the breakpoint anywhere in the program stored in RAM. After
entering breakpoint address run the program using the [GO] command.

EX: BR C009 C012 C01B C024 C02D<CR>

This examples sets breakpoints at addresses


C009H, C012H, C01BH, C024H, C02DH.

RULES:

Dynalog 5-15
Dyna-51 Remote Mode

1. A maximum of 5 Breakpoint can be given on the command


line at a time.
2. A maximum of 32 Breakpoints can be set.

b) BRD DISPLAY BREAKPOINT

Syntax: BRD<CR>
Individual addresses are displayed one after the other wherever
breakpoints are set.

RULES:
1. Press 'ENTER' to continue or 'ESC' to exit.

c) BRE DELETE BREAKPOINT

Syntax: BRE BRno.<CR>


This command is used delete the particular breakpoint specified by the
brek point number BRno.

EX: BR C009 C012 C01B C024<CR>


BRE 3<CR>

The command BRE 3 deletes the 3rd breakpoint i.e. C01Bh.

Dynalog 5-16
Dyna-51 Remote Mode

d) BRC CLEAR BREAKPOINT

Syntax: BRC<CR>
This command clears any breakpoints previously set.

5.1.20 R REGISTER DISPLAY

Syntax: R<CR>
This command is used to examine the contents of ACC, PSW, SP, DPTR,
PC and registers r0 to r7.

EX. R<CR>
R0-R7 : 02 04 05 06 07 09 01 00

RULES:
1. Press 'SPACE BAR' to toggle display.

5.1.21 Rno. EDIT REGISTER

Syntax: RNO.= DATA<CR>


This command is used to modify the contents of register R0 to R7, ACC,
SP, PSW, DPTR, PC individually.

Dynalog 5-17
Dyna-51 Remote Mode

EX. 1. R0=12<CR>
2. R4=09<CR>
3. PSW=40<CR>
4. DPTR=D000<CR>
5. PC-C009<CR>

Dynalog 5-18
Dyna-51 System Subroutines

Chapter 6
System Subroutines
The following subroutines in the DYNA-51 system monitor program can be called
by the user program. You may borrow several monitor routines to simplify your
task of programming and to minimize RAM used. You have to take care of the
parameters required by these routines and the registers modified by these
routines. The routines can be used as a subroutine using LCALL instruction
followed by address of the routine. These routines are divided into two groups:

1. LOCAL MODE routines


I) LCD Routines
II) KEYBOARD routines

2. REMOTE MODE routines

6.1 LIST OF SUBROUTINES


The important subroutines which user can borrow from the section of monitor
are:

ADDRESS USED FOR


0388H CLEAR SCREEN
0410H R5,R7 ROWCOL POSITION
047AH R7 DISPLAY CHARACTER ON LCD DISPLAY
04C2H READ COLUMN
04C9H READ ROW

Dynalog 6-1
Dyna-51 System Subroutines

04D0H R6,R7 PRINT STRING


054CH CURSOR_OFF
0559H CURSOR_ON
O2C9H READ KEYBOARD
02CDH READ KEYBOARD AND DISPLAY
02DAH READ KEYBOARD STATUS
02EAH R6, R7 READ STRING AND DISPLAY
0375H KEYBOARD_FLUSH
0E2BH RX_STS
0E33H TX_STS
0E3BH RX_FLUSH
0E3FH CONSOLE INPUT
0E4BH R7 CONSOLE OUTPUT
0E5EH R6,R7 PRINT STRING ON CONSOLE
0EADH R6,R7 READ STRING FROM TERMINAL AND DISPLAY

Dynalog 6-2
Dyna-51 System Subroutines

6.1 LOCAL MODE ROUTINES

6.1.1 LCD Routines

6.1.1.1 Clear Screen (Clrscr)

The clrscr routine clears the LCD display and positions the cursor at first
row and first column position. Insert a call to the CLRSCR routine as
follows:
LCALL 0388h

No parameters are required.

6.1.1.2 Rowcol Position

This routine positions the cursor at the specified column, row position. To
call this routine from the user program, the sequence is:

MOV R7, BYTE ;move col no. to reg. r7


MOV R5, BYTE ;mov row no. to reg. r5
LCALL 0410H ;call the routine

Note: R7=col valid column value = 1 to 40.


R5=row valid row value = 1,2.

Dynalog 6-3
Dyna-51 System Subroutines

For example, to position the cursor at 15th col and 2nd row position:

MOV R7,#0FH
MOV R5,#02H
LCALL 0410H

6.1.1.3 Display Character

This routine takes a 7-bit ASCII byte passed in register r7, and sends it
to the LCD display. To call this routine from the user program, the
sequence is:

MOV R7,BYTE ;immediate ch_data


LCALL 047AH ;Calls the monitor routine

For example, to display the character A:

MOV R7,#41H
LCALL 047AH

6.1.1.4 Read Column

This routine returns the current column position of the cursor in


accumulator. Insert a call to this routine as follows:

Dynalog 6-4
Dyna-51 System Subroutines

LCALL 04C2H

No parameters are required.

6.1.1.5 Read Row

This routine returns the current row position of the cursor in accumulator.

LCALL 04C9h

No parameters are required.

6.1.1.6 Display A Message (Print String)

Routine PRINT STRING displays a message stored as ASCII bytes in


external memory. To use this routine, first load the string into memory. To
call the routine, move the high byte of the string's address into R6 and the
low byte of the address into R7, then call the routine. The sequence is:
MOV R6, BYTE ;High byte of string address
MOV R7, BYTE ;Low byte of string address
LCALL 04D0H ;Call the routine

For example, suppose we wish to have a user display the sign-on


message HELLO. First, we load the string with that message into data
memory from the starting address D000H by using edit command:
DYNA-51>E D000<CR>

Dynalog 6-5
Dyna-51 System Subroutines

D000: 02.48 22.45 01.4C 09.4C 05.4F


Here,
D000h=48
D001h=45
D002h=4C
D003h=4C
D004h=4F
To display this message, the user program contains the following
sequence:

MOV R6,#0D0H ;High byte of the string address


MOV R7,#00H ;Low byte of the string address
LCALL 04D0H ;Display the message

6.1.1.7 Cursor_Off

This routine puts the cursor_off. Insert a call to the CURSOR_OFF routine
as follows:
LCALL 054CH
No parameters are required.

Dynalog 6-6
Dyna-51 System Subroutines

6.1.1.8 Cursor_On

This routine puts the cursor on. Insert a call to the CURSOR_ON routine
as follows:

LCALL 0559H

No parameters are required.

6.1.2 Keyboard Routines

6.1.2.1 Read Keyboard

This routine waits until a key stroke is entered and on return, places the
ASCII value of the key stroke in accumulator. The call is:

LCALL 02C9H

No parameters are required.

6.1.2.2 Read Keyboard and Display

This routine waits until a key stroke is entered and on return, places the
ASCII value of the keystroke in accumulator. It also display the key
pressed on the LCD display. The call to this routine is as follows:

Dynalog 6-7
Dyna-51 System Subroutines

LCALL 02CDH

No parameters are required.

6.1.2.3 Read Keyboard Status

This routine sets ACC=1 if any key is pressed or ACC=0 if no key is hit.
The call to this routine is as follows:

LCALL 02DAH

No parameters are required.

For example, to terminate the execution of program if ESC key is pressed:

CONT: LCALL 02DAH ;Call routine and check if ACC=1


CJNE A,#01H,CONT ;if ACC = 0 remain in loop.
LCALL 02C9H ;Call routine and check if key
CJNE A,#01BH,CONT ;pressed is ESC key. if no goto cont
LJMP 6000H ;stop execution.

Dynalog 6-8
Dyna-51 System Subroutines

6.1.2.4 Read String and Display

This routine receives a string from keyboard and displays it on LCD


display. It also stores ASCII value key pressed in accumulator and at
defined memory location. The call to this routine is as follows:

MOV R6,BYTE ;High byte of the starting address


MOV R7,BYTE ;Low byte of the starting address
LCALL 02EAH ;Call the routine

For example, to display message READY:

MOV R2,#05H ;set counter=05 for five character


MOV R6,#0D0H ;High byte of the starting address
MOV R7,#10H ;Low byte of the starting address
UP: LCALL 02EAH ;Call the routine
DJNZ R2,UP ;jump if r2 is not zero to up

Enter string READY from keyboard. The ASCII value of key pressed
will get stored at loc. starting from address D010h.

Dynalog 6-9
Dyna-51 System Subroutines

6.1.2.5 Keyboard_Flush (Kbd_Flush)

This routine empties the keyboard buffer. Insert a call to this routine as
follows:

LCALL 0375H

No parameters are required.

6.2 REMOTE MODE ROUTINES

6.2.1 Receiver Status(Rx_sts)

The Rx_sts routine returns the receiver status in accumulator.


ACC = 0 :Indicates Receiver Ready
ACC = 1 :Indicates Receiver Empty

The call is :

LCALL 0E2BH

No parameters are required.

Dynalog 6-10
Dyna-51 System Subroutines

6.2.2 Transmitter Ready(Tx_sts)

The Tx_sts routine returns the transmitter status in accumulator.


ACC = 0 :Indicates Transmitter is not ready
ACC = 1 :Indicates Tranamitter ready

The call is :

LCALL 0E33H

No parameters are required.

6.2.3 Receiver_Flush(Rx_flush)

The Rx_flush routine clears receiver buffer. Call to this routine is :

LCALL 0E3BH

No parameters are required.

Dynalog 6-11
Dyna-51 System Subroutines

6.2.4 Console Input(CI)

The console input routine reads the keystroke and stores the ASCII value
of key pressed in accumulator. It does all receiver status checking. The
call to this routine is as follows:

LCALL 0E3FH

No parameters are required.

6.2.5 Console Output (CO)

The console output routine takes a 7-bit ASCII byte passed in register R7
and sends it to the terminal. It does all transmitter status checking. To
call this routine from the user program,the sequence is:

MOV R7,BYTE ;Immediate ch_data


LCALL 0E4BH ;Call the routine

For example,to display the character J:

MOV R7,#4AH
LCALL 0E4BH

Dynalog 6-12
Dyna-51 System Subroutines

6.2.6 Display A Message (PRINT STRING)

Routine PRINT STRING displays a message stored as ASCII bytes in


external memory. To use this routine, first load the string into memory. To
call the routine, move the high byte of the string's address into R6 and the
low byte of the address into R7,then call the routine. The sequence is:

MOV R6,BYTE ;High byte of string address


MOV R7,BYTE ;Low byte of string address
LCALL 0E5EH ;Call the routine

For example, suppose we wish to have a user display the sign-on


message HELLO. First, we load the string with that message into data
memory from the starting address D400H by using edit command:

DYNA-51>E D400<CR>

D400: 02.48 22.45 01.4C 09.4C 05.4F


Here,
D400h=48
D401h=45
D402h=4C
D403h=4C
D404h=4F

Dynalog 6-13
Dyna-51 System Subroutines

To display this message, the user program contains the following


sequence:

MOV R6,#0D4H ;High byte of the string address


MOV R7,#00H ;Low byte of the string address
LCALL 0E5EH ;Display the message on console

6.2.7 Read String And Display

This routine receives a string serially from terminal keyboard and displays
it on console. It also stores ASCII value key pressed in accumulator and at
defined memory location. The call to this routine is as follows:

MOV R6,BYTE ;High byte of the starting address


MOV R7,BYTE ;Low byte of the starting address
LCALL 0EADH ;Call the routine

For example, to display message READY :


MOV R2,#05H ;set counter=05 for five character
MOV R6,#0D0H ;High byte of the starting address
MOV R7,#10H ;Low byte of the starting address
UP:

Dynalog 6-14
Dyna-51 System Subroutines

LCALL 0EADH ;Call the routine


DJNZ R2,UP ;jump if r2 is not zero to up

Enter string READY from terminal keyboard. The ASCII value of key
pressed will get stored at loc. starting from address D010h.

Dynalog 6-15
Dyna-51 Connector Details

Appendix A
Connector Details

CN4 8255#1

PIN NO SIGNAL PIN NO SIGNAL


1 PA3#1 14 PC0#1
2 PA2#1 15 PC1#1
3 PA1#1 16 PC2#1
4 PA0#1 17 PC3#1
5 VCC 18 PB0#1
6 PA7#1 19 PB1#1
7 PA6#1 20 PB2#1
8 PA5#1 21 PB3#1
9 PA4#1 22 PB4#1
10 PC7#1 23 PB5#1
11 PC6#1 24 PB6#1
12 PC5#1 25 PB7#1
13 PC4#1 26 GND

Dynalog A- 1
Dyna-51 Connector Details

CN2 8255#2

PIN NO SIGNAL PIN NO SIGNAL


1 PA3#2 14 PC0#2
2 PA2#2 15 PC1#2
3 PA1#2 16 PC2#2
14 PA0#2 17 PC3#2
5 VCC 18 PB0#2
6 PA7#2 19 PB1#2
7 PA6#2 20 PB2#2
8 PA5#2 21 PB3#2
9 PA4#2 22 PB4#2
10 PC7#2 23 PB5#2
11 PC6#2 24 PB6#2
12 PC5#2 25 PB7#2
13 PC4#2 26 GND

Dynalog A- 2
Dyna-51 Connector Details

CN1 LCD INTERFACE CONNECTOR

PIN NO SIGNAL PIN NO SIGNAL


1 GND 9 DB2
2 VCC 10 DB3
3 BRT_ADJ 11 DB4
4 RS 12 DB5
5 R/W* 13 DB6
6 E 14 DB7
7 DB0 15 BRT_ADJ1
8 DB1 16 GND

CN3 POWER CONNECTOR

PIN NO SIGNAL PIN NO SIGNAL


1 GND 4 +12V
2 VCC 5 -12V
3 VCC 6 +30V

Dynalog A- 3
Dyna-51 Connector Details

CN5 TIMER CONNECTOR 10 PIN FRC MALE

PIN NO SIGNAL PIN NO SIGNAL


1 CLK1 6 OUT2
2 CLK2 7 GND
3 GATE1 8 OUT0
4 GATE2 9 GND
5 OUT1 10 VCC

CN6 SERIAL CONNECTOR 9 PIN DTM

PIN NO SIGNAL PIN NO SIGNAL


1 DCD 6 DSR
2 RXD 7 RTS
3 TXD 8 CTS
4 DTR 9 NC
5 GND

Dynalog A- 4
Dyna-51 Connector Details

P1 DYNA Bus

PIN NO SIGNAL PIN NO SIGNAL


1 VCC 26 BA10
2 VCC 27 BA1
3 GND 28 BA9
4 GND 29 BA0
5 NC 30 BA8
6 ALE 31 WR*
7 AD3 32 RD*
8 AD7 33 NC
9 AD2 34 NC
10 AD6 35 IOEXP
11 AD1 36 IOEXP1
12 AD5 37 IOEXP2
13 AD0 38 IOEXP3
14 AD4 39 INT0
15 BA7 40 NC
16 BA15 41 NC
17 BA6 42 NC
18 BA14 43 NC
19 BA5 44 NC
20 BA13 45 CLK
21 BA4 46 NC

Dynalog A- 5
Dyna-51 Connector Details

PIN NO SIGNAL PIN NO SIGNAL


22 BA12 47 RST
23 BA3 48 RST*
24 BA11 49 INT1
25 BA2 50 INT0

Dynalog A- 6
Dyna-51 List Of PIO Cards

Appendix B
List Of PIO Cards

Code Card Function

1) ADC-01 A/D Card with ADC-0809 converter chip. The


card supports one channel of 8 bit resolution and
100 micro seconds conversion time. Voltage
range is 0-5V.

2) DAC-01 D/A card with DAC-0800 converter chip. The card


supports one channel of 8 bit resolution and 100
nano seconds setting time.

3) HEX-PAD Hex Keypad Card with 24 keys arranged as 4 x 6


matrix. It is very useful for testing routines for key
closure and debounce.

4) ELV-SIM Elevator Simulator card with LED indicators and


push buttons for ground plus three floors

5) LCI-5528-11 Logic Indicator Card with 16 LED indicators for


output ports and 8 numbers of supply and ground

Dynalog B-1
Dyna-51 List Of PIO Cards

strapping connectors each to be used for input


ports.

6) STP Stepper Motor Diver Card. It has all the driver


circuits required to interface one DC stepper
motor.

7) SER-DISP Provides 4 seven segment LED displays


controlled by serial data output on a PIO line from
the kit. Serial to parallel conversion is done by
using 74164 shift registers.

8) TRAFFIC-PIO Is it used to simulate the traffic control sequence


at a junction.

Dynalog B-2
Dyna-51 DYNA-51 Series Study Cards

Appendix C
DYNA-51 Series Study Cards

DYNA-PIO/1 Study of 8212


Consists of one8212, buffers to drive LEDs and VCC, GND tags.

DYNA-PIO/2 Study of 8255


Consists of 8255 with tags for all I/O ports, buffers to drive LEDs,
VCC and GND tags.

DYNA-TIMER Study of 8253


Consists of one 8253 with tags for all the counters, buffers,
LEDs, VCC and GND tags.

DYNA-SERIAL Study of USART 8251


Consists of two USARTs (Universal Synchronous Asynchronous
Receiver Transmitter), buffers to drive LEDs, Interrupts and
GND tags.

DYNA-LBDR Study of Latch, Buffer, Decoder and RAM.


Consists of buffers, decoders, latches, RAM, GND tags and
LEDs.

Dynalog C- 1
Dyna-51 DYNA-51 Series Study Cards

DYNA-KBDISP Study of 8279.


Consists of one 8279, buffers, LEDs, VCC and GND tags.

DYNA-THUMBWHEEL V2.1
Consists of a latch, 8 bit magnitude comparator, two 7
segment displays, pair of THUMBWHEELS, one LED etc.

DYNA-TRAFFIC C0ONTROLLER V2.1


Consists of a buffer, 4 Latches, LEDs etc.

DYNA-DCM
Consists of latch, DC motor, LEDs etc.

For detail refer to Study Cards User's Manual.

Dynalog C- 2
Dyna-51

Appendix D
Intel Hex Format

The Intel Hex Format is one of the standards defined to transfer data between a
target system and the host computer. This is used in the SERIAL mode of STAR-
86 when it is connected to the host computer like the IBM PC.

Each record in the INTEL HEX FORMAT contains information about the record
type, length, memory load address and checksum in addition to data. Each
transfer is limited to 128 bytes of program data. The general format of a record,
shown with spaces separating each field, is:

Record Record Load Record Program Checksum


Mark Length Address Type Data
: ## aaaa tt dddd cc

Record Mark Field : This field signifies the start of the record and
consists of an ASCII COLON(:)

Record Length Field : This field consists of two ASCII characters which
Indicate the number of two data bytes in this

Dynalog D-1
Dyna-51

record. The characters are the result of converting


the number of data bytes in binary to ASCII
characters, high digit first.

An end of file record contains two ASCII zeros in


this field. The maximum number of data bytes in
record is 255.

Local Address Field : This field consists of the four ASCII characters
which result from converting the binary value of
the address in which to begin loading this record.
The order is as follows:

High digit of high byte of address.


Low digit of high byte of address.
High digit of low byte of address.
Low digit of low byte of address.
In an end of file record, this field consists of either
four ASCII zeros, or the program entry address.

Record Type Field : This field identifies the record type, which is either
00 for data record or 01 for an end of the record. It
consists of two characters, with the high digit of

Dynalog D-2
Dyna-51

record type first, followed by the low digit of the


record type.

Data Field : This field consists of the actual data converted to


two ASCII characters, high digit first. There are no
data bytes in the end of the file record.

Checksum Field : The checksum field is the 8 bit binary sum of the
record length filed, the load address field, This
sum is then negated (2s complement) and
converted to two ASCII characters, high digit first.

Dynalog D-3
Dyna-51 8051 Instruction Set

Appendix E
8051 Instruction Set

ARITHMETIC OPERATIONS

Instruction Byte/Cycle Flags,Notes Description


ADD A,Rn 1/1 AC,CY,OV Add Register to
Accumulator
ADD A,direct 2/1 AC,CY,OV Add Direct Byte to
Accumulator
ADD A,@Ri 1/1 AC,CY,OV Add Indirect RAM to
Accumulator
ADD A,#data 2/1 AC,CY,OV Add Immediate Data to
Accumulator
ADDC A,Rn 1/1 AC,CY,OV Add Register to Acc with
Carry
ADDC A,direct 2/1 AC,CY,OV Add Direct Byte to Acc
with Carry
ADDC A,@Ri 1/1 AC,CY,OV Add Indirect RAM to Acc
with Carry
ADDC A,#data 2/1 AC,CY,OV Add Immediate Data to Acc
with Carry
DA A 1/1 CY,4 Decimal Adjust Accumulator

Dynalog E-1
Dyna-51 8051 Instruction Set

DEC A 1/1 Decrement Accumulator


DEC Rn 1/1 Decrement Register
DEC direct 2/1 Decrement Direct Byte
DEC @Ri 1/1 Decrement Indirect RAM
DIV AB 1/4 CY=0,OV,5 Divide Accumulator and B
Register
INC A 1/1 Increment Accumulator
INC Rn 1/1 Increment Register
INC direct 2/1 Increment Direct Byte
INC @Ri 1/1 Increment Indirect RAM
INC DPTR 1/2 Increment Data Pointer
MUL AB 1/4 CY=0,OV,7 Multiply Accumulator and
B Register
SUBB A,Rn 1/1 AC,CY,OV Subtract Register from
Acc w/borrow
SUBB A,direct 2/1 AC,CY,OV Sub Direct Byte from Acc
w/borrow
SUBB A,@Ri 1/1 AC,CY,OV Sub Indirect RAM from
Acc w/borrow
SUBB A,#data 2/1 AC,CY,OV Sub Immediate Data from
Acc w/borrow

Dynalog E-2
Dyna-51 8051 Instruction Set

8051 INSTRUCTION SET - LOGICAL OPERATIONS

Instruction Byte/Cycle Flags,Notes Description


ANL A,Rn 1/1 AND Register to
Accumulator
ANL A,direct 2/1 AND Direct Byte to
Accumulator
ANL A,@Ri 1/1 AND Indirect RAM to
Accumulator
ANL A,#data 2/1 AND Immediate Data to
Accumulator
ANL direct,A 2/1 AND Accumulator to
Direct Byte
ANL direct,#data 3/2 AND Immediate Data to
Direct Byte
CLR A 1/1 Clear Accumulator
CPL A 1/1 Complement Accumulator
ORL A,Rn 1/1 OR Register to
Accumulator
ORL A,direct 2/1 OR Direct Byte to
Accumulator
ORL A,@Ri 1/1 OR Indirect RAM to
Accumulator

Dynalog E-3
Dyna-51 8051 Instruction Set

ORL A,#data 2/1 OR Immediate Data to


Accumulator
ORL direct,A 2/1 OR Accumulator to Direct
Byte
ORL direct,#data 3/2 OR Immediate Data to
Direct Byte
RL A 1/1 Rotate Accumulator Left
RLC A 1/1 CY Rotate Acc Left through
Carry
RR A 1/1 Rotate Accumulator Right
RRC A 1/1 CY Rotate Acc Right through
Carry
SWAP A 1/1 Swap Nibbles within the
Accumulator
XRL A,Rn 1/1 Exclusive-OR Register to
Accumulator
XRL A,direct 2/1 Exclusive-OR Direct Byte
to Acc
XRL A,@Ri 1/1 Exclusive-OR Indirect
RAM to Acc
XRL A,#data 2/1 Exclusive-OR Immediate
Data to Acc
XRL direct,A 2/1 Exclusive-OR Acc to
Direct Byte

Dynalog E-4
Dyna-51 8051 Instruction Set

XRL direct,#data 3/2 Exclusive-OR Imm Data


to Direct Byte

8051 INSTRUCTION SET - DATA TRANSFER

Instruction Byte/Cycle Flags,Notes Description

MOV A,Rn 1/1 Move Register to


Accumulator
MOV A,direct 2/1 Move Direct Byte to
Accumulator
MOV A,@Ri 1/1 Move Indirect RAM to
Accumulator MOV
A,#data 2/1 Move Immediate Data to
Accumulator
MOV Rn,A 1/1 Move Accumulator to
Register
MOV Rn,direct 2/2 Move Direct Byte to
Register
MOV Rn,#data 2/1 Move Immediate Data to
Register
MOV direct,A 2/1 Move Accumulator to
Direct Byte
MOV direct,Rn 2/2 Move Register to Direct
Byte

Dynalog E-5
Dyna-51 8051 Instruction Set

MOV direct,direct 3/2 Move from Direct Byte to


Direct Byte
MOV direct,@Ri 2/2 Move Indirect RAM to
Direct Byte
MOV direct,#data 3/2 Move Immediate Data to
Direct Byte
MOV @Ri,A 1/1 Move Accumulator to
Indirect RAM
MOV @Ri,direct 2/2 Move Direct Byte to
Indirect RAM
MOV @Ri,#data 2/1 Move Immediate Data to
Indirect RAM
MOV DPTR,#data16 3/2 Load Data Pointer w/ 16-
bit Constant
MOVC A,@A+DPTR 1/2 Move Code Byte relative
DPTR to Acc
MOVC A,@A+PC 1/2 Move Code Byte relative
to PC to Acc
POP direct 2/2 Pop Direct Byte from
Stack
PUSH direct 2/2 Push Direct Byte onto
Stack
XCH A,Rn 1/1 Exchange Register with
Accumulator

Dynalog E-6
Dyna-51 8051 Instruction Set

XCH A,direct 2/1 Exchange Direct Byte


with Accumulator
XCH A,@Ri 1/1 Exchange Indirect RAM
with Acc
XCHD A,@Ri 1/1 Exchange Low Nibble Ind
RAM with Acc

8051 INSTRUCTION SET - BOOLEAN VARIABLE MANIPULATION

Instruction Byte/Cycle Flags,Notes Description


ANL C,bit 2/2 CY AND Direct Bit to Carry
ANL C,/bit 2/2 CY AND complement of
Direct Bit to Cy
CLR C 1/1 CY Clear Carry
CLR bit 2/1 Clear Direct Bit
CPL C 1/1 CY Complement Carry
CPL bit 2/1 Complement Direct Bi
JB bit,rel 3/2 Jump if Direct Bit is set
JNB bit,rel 3/2 Jump if Direct Bit is Not
Set
JBC bit,rel 3/2 AC,CY,OV,6 Jump if
Direct Bit set then Clear it
JC rel 2/2 Jump if Carry is set
JNC rel 2/2 Jump if Carry is Not set

Dynalog E-7
Dyna-51 8051 Instruction Set

MOV C,bit 2/1 CY Move Direct Bit to Carry


MOV bit,C 2/2 Move Carry to Direct Bit
ORL C,bit 2/2 CY OR Direct Bit to Carry
ORL C,/bit 2/2 CY OR complement o
Direct Bit to Carry
SETB C 1/1 CY Set Carry
SETB bit 2/1 Set Direct Bit

8051 INSTRUCTION SET - PROGRAM BRANCHINGInstruction

Instruction Byte/Cycle Flags,Notes Description


ACALL addr 11 2/2 1 Absolute Subroutine
Call, 11-bit addr
AJMP addr 11 2/2 2 Absolute Jump, 11-bit
Address
CJNE A,direct,rel 3/2 CY,3 Comp Dir Byte to Acc,
Jmp not equal
CJNE A,#data,rel 3/2 CY,3 Compare Immed to Acc
& Jump not equal
CJNE Rn,#data,rel 3/2 CY,3 Compare Immed to Reg
& Jump not equal
CJNE @Ri,#data,rel 3/2 CY,3 Comp Imm to Indir Ri,
Jump not equal
DJNZ Rn,rel 2/2 Decrement Register &

Dynalog E-8
Dyna-51 8051 Instruction Set

Jump if not zero


DJNZ direct,rel 3/2 Decrement Direct Byte
& Jump not zero
JMP @A+DPTR 1/2 Jump indirect relative to
the DPTR
JNZ rel 2/2 Jump if Accumulator is
Not Zero
JZ rel 2/2 Jump if Accumulator is
Zero
LCALL addr 16 3/2 Long Subroutine Call,
16-bit Address
LJMP addr 16 3/2 Long Jump, 16-bit
Address
NOP 1/1 No Operation
RET 1/2 Return from subroutine
RETI 1/2 Return from Interrupt
SJMP rel 2/2 Short Jump, relative
Address

Dynalog E-9
Dyna-51 8051 Instruction Set

NOTES ON THE INSTRUCTION SET AND THE ADDRESSING MODES

addr 11 - 11-bit destination address. Used by ACALL and AJMP. Branch


will be within the same 2K-byte page of Program Memory as the
first byte of the following instruction.

addr 16 - 16-bit destination address. Used by LCALL and LJMP. A branch


can be anywhere within the 64K-byte Program Memory address
space.

bit - Direct Addressed bit in Internal Data RAM or Special Function


Register.

direct - 8-bit internal data location's address. This could be an Internal


Data RAM location (0-127) or an SFR [i.e., I/O port, control
register, status register, etc.(128-255)].

rel - Signed (two's complement) 8-bit offset byte. Used by SJMP


and all conditional jumps. Range is -128 to +127 bytes
relative to first byte of the following instruction.

Rn - Register R0-R7 of the currently selected Register Bank. @ Ri


8-bit internal data RAM location (0-255) addressed indirectly
through register R0 or R1.

Dynalog E-10
Dyna-51 8051 Instruction Set

#data - 8-bit constant included in instruction.

#data 16 - 16-bit constant included in instruction.

SPECIAL FUNCTION REGISTER MAP

M: 80= P0 M: A0= P2 M: C0= M: E0= ACC


M: 81= SP M: A1= M: C1= M: E1=
M: 82= DPL M: A2= M: C2= M: E2=
M: 83= DPH M: A3= M: C3= M: E3=
M: 84= M: A4= M: C4= M: E4=
M: 85= M: A5= M: C5= M: E5=
M: 86= M: A6= M: C6= M: E6=
M: 87= PCON M: A7= M: C7= M: E7=
M: 88= TCON M: A8= IE M: C8= T2CON M: E8=
M: 89= TMOD M: A9= M: C9= M: E9=
M: 8A= TL0 M: AA= M: CA= RCAP2L M: EA=
M: 8B= TL1 M: AB= M: CB= RCAP2H M: EB=
M: 8C= TH0 M: AC= M: CC= TL2 M: EC=
M: 8D= TH1 M: AD= M: CD= TH2 M: ED=
M: 8E= M: AE= M: CE= M: EE=
M: 8F= M: AF= M: CF= M: EF=

Dynalog E-11
Dyna-51 8051 Instruction Set

M: 90= P1 M: B0= P3 M: D0= PSW M: F0= B


M: 91= M: B1= M: D1= M: F1=
M: 92= M: B2= M: D2= M: F2=
M: 93= M: B3= M: D3= M: F3=
M: 94= M: B4= M: D4= M: F4=
M: 95= M: B5= M: D5= M: F5=
M: 96= M: B6= M: D6= M: F6=
M: 97= M: B7= M: D7= M: F7=
M: 98= SCON M: B8= IP M: D8= M: F8=
M: 99= SBUF M: B9= M: D9= M: F9=
M: 9A= M: BA= M: DA= M: FA=
M: 9B= M: BB= M: DB= M: FB=
M: 9C= M: BC= M: DC= M: FC=
M: 9D= M: BD= M: DD= M: FD=
M: 9E= M: BE= M: DE= M: FE=
M: 9F= M: BF= M: DF= M: FF=

BIT ADDRESSABLE REGISTER MAP

B: 80= P0.0 B: A0= P2.0 B: C0= B: E0= ACC.0


B: 81= P0.1 B: A1= P2.1 B: C1= B: E1= ACC.1
B: 82= P0.2 B: A2= P2.2 B: C2= B: E2= ACC.2
B: 83= P0.3 B: A3= P2.3 B: C3= B: E3= ACC.3
B: 84= P0.4 B: A4= P2.4 B: C4= B: E4= ACC.4

Dynalog E-12
Dyna-51 8051 Instruction Set

B: 85= P0.5 B: A5= P2.5 B: C5= B: E5= ACC.5


B: 86= P0.6 B: A6= P2.6 B: C6= B: E6= ACC.6
B: 87= P0.7 B: A7= P2.7 B: C7= B: E7= ACC.7
B: 88= IT0 B: A8= EX0 B: C8= T2CP B: E8=
B: 89= IE0 B: A9= ET0 B: C9= T2C B: E9=
B: 8A= IT1 B: AA= EX1 B: CA= TR2 B: EA=
B: 8B= IE1 B: AB= ET1 B: CB= EXEN2 B: EB=
B: 8C= TR0 B: AC= ES B: CC= TCLK B: EC=
B: 8D= TF0 B: AD= ET2 B: CD= RCLK B: ED=
B: 8E= TR1 B: AE= B: CE= EXF2 B: EE=
B: 8F= TF1 B: AF= EA B: CF= TF2 B: EF=
B: 90= P1.0 B: B0= P3.0 B: D0= P B: F0= B.0
B: 91= P1.1 B: B1= P3.1 B: D1= B: F1= B.1
B: 92= P1.2 B: B2= P3.2 B: D2= OV B: F2= B.2
B: 93= P1.3 B: B3= P3.3 B: D3= RS0 B: F3= B.3
B: 94= P1.4 B: B4= P3.4 B: D4= RS1 B: F4= B.4
B: 95= P1.5 B: B5= P3.5 B: D5= F0 B: F5= B.5
B: 96= P1.6 B: B6= P3.6 B: D6= AC B: F6= B.6
B: 97= P1.7 B: B7= P3.7 B: D7= CY B: F7= B.7
B: 98= RI B: B8= PX0 B: D8= B: F8=
B: 99= TI B: B9= PT0 B: D9= B: F9=
B: 9A= RB8 B: BA= PX1 B: DA= B: FA=
B: 9B= TB8 B: BB= PT1 B: DB= B: FB=
B: 9C= REN B: BC= PS B: DC= B: FC=

Dynalog E-13
Dyna-51 8051 Instruction Set

B: 9D= SM2 B: BD= PT2 B: DD= B: FD=


B: 9E= SM1 B: BE= B: DE= B: FE=
B: 9F= SM0 B: BF= B: DF= B: FF=

SPECIAL FUNCTION REGISTER ASSIGNMENTS

Reg Byte Bit Address Byte / Bit

Name Addr 7 6 5 4 3 2 1 0 Description

P0 80 87 86 85 84 83 82 81 80 Port 0
P0.0 Port 0 bit 0
P0.1 Port 0 bit 1
P0.2 Port 0 bit 2
P0.3 Port 0 bit 3
P0.4 Port 0 bit 4
P0.5 Port 0 bit 5
P0.6 Port 0 bit 6
P0.7 Port 0 bit 7

SP 81 ------------------------------------------ Stack Pointer

DPL 82 ------------------------------------------ Data Pointer Low (DPTR)

DPH 83 ------------------------------------------ Data Pointer High (DPTR)

Dynalog E-14
Dyna-51 8051 Instruction Set

PCON 87 86 85 84 83 82 81 80 Power Control register


IDL Idle mode bit
PD Power down bit
GF0 General Purpose flag
GF1 General Purpose flag
GF2 General Purpose flag
GF3 General Purpose flag
GF4 General Purpose flag
SMOD Double Baud Rate bit

TCON 88 8F 8E 8D 8C 8B 8A 89 88 Timer / Counter control


IT0 INT0 edge control
IE0 INT0 edge detect flag
IT1 INT1 edge control
IE1 INT1 edge detect flag
TR0 Timer 0 run control
TF0 Timer 0 overflow flag
TR1 Timer 1 run control
TF1 Timer 1 overflow flag

Dynalog E-15
Dyna-51 8051 Instruction Set

TMOD 89 -- -- -- -- -- -- -- --
M0 Timer 0 operate mode
M1 Timer 0 operate mode
C/T Counter/Timer 0 slct
GATE Timer 0 gate
M0 Timer 1 operate mode
M1 Timer 1 operate mode
C/T Counter/Timer 1 slct
GATE Timer 1 gate

Reg Byte Bit Address Byte / Bit


Name Addr 7 6 5 4 3 2 1 0 Description

TL0 8A - - - - - - - - - - - - - - - -Timer / Counter 0 low byte

TL1 8B - - - - - - - - - - - - - - - -Timer / Counter 1 low byte

TH0 8C - - - - - - - - - - - - - - - -Timer / Counter 0 high byte

TH1 8D - - - - - - - - - - - - - - - -Timer / Counter 1 high byte

Dynalog E-16
Dyna-51 8051 Instruction Set

P1 90 97 96 95 94 93 92 91 90 Port 1
P1.0 Port 1 bit 0
P1.1 Port 1 bit 1
P1.2 Port 1 bit 2
P1.3 Port 1 bit 3
P1.4 Port 1 bit 4
P1.5 Port 1 bit 5
P1.6 Port 1 bit 6
P1.7 Port 1 bit 7

SCON 98 9F 9E 9D 9C 9B 9A 99 98 Serial Control


R1 Rcvr interrupt flag
TI Xmit interrupt flag
RB8 9th bit rcvd/stop bit
TB8 9th bit1 transmission
REN Receiver enable
SM2 Serial Port mode slct
SM1 Serial Port mode slct
SM0 Serial Port mode slct
SBUF 99 - - - - - - - - - - - - - - - -Serial Data Buffer

Dynalog E-17
Dyna-51 8051 Instruction Set

P2 A0 A7 A6 A5 A4 A3 A2 A1 A0 Port 2
P2.0 Port 2 bit 0
P2.1 Port 2 bit 1
P2.2 Port 2 bit 2
P2.3 Port 2 bit 3
P2.4 Port 2 bit 4
P2.5 Port 2 bit 5
P2.6 Port 2 bit 6
P2.7 Port 2 bit 7

Reg Byte Bit Address Byte / Bit


Name Addr 7 6 5 4 3 2 1 0 Description

IE A8 AF AE AD AC AB AA A9 A8 Interrupt Enable register


EX0 Enable interrupt INT0
ET0 Timer 0 overflow int.
EX1 Enable interrupt INT1
ET1 Timer 1 overflow int.
ES Serial Port interrupt
ET2 Timer 2 ovflow or Cap
EA Enable all interrupts

Dynalog E-18
Dyna-51 8051 Instruction Set

P3 B0 B7 B6 B5 B4 B3 B2 B1 B0 Port 3
P3.0 Port 3 bit 0
P3.1 Port 3 bit 1
P3.2 Port 3 bit 2
P3.3 Port 3 bit 3
P3.4 Port 3 bit 4
P3.5 Port 3 bit 5
P3.6 Port 3 bit 6
P3.7 Port 3 bit 7

IP B8 BF BE BD BC BB BA B9 B8 Interrupt Priority Control


PX0 INT0 priority
PT0 Timer 0 priority
PX1 INT1 priority
PT1 Timer 1 priority
PS Serial Port priority

PT2 Timer 2 priority

Dynalog E-19
Dyna-51 8051 Instruction Set

T2CON C8 CF CE CD CC CB CA C9 C8 Timer / Counter 2 control


T2CP Capture/reload flag
T2C Internal/Ext select
TR2 Timer 2 start/stop
EXEN2 Timer 2 ext enable
TCLK Transmit clock flag
RCLK Receive clock flag
EXF2 Timer 2 external flag
TF2 Timer 2 overflow flag

Reg Byte Bit Address Byte / Bit


Name Addr 7 6 5 4 3 2 1 0 Description

RCAP2L CA - - - - - - - - - - - - - - T/C 2 Capture reg. low byte

RCAP2H CB - - - - - - - - - - - - - - T/C 2 Capture reg. high byte

TL2 CC - - - - - - - - - - - - - - Timer / Counter 2 low byte

TH2 CD - - - - - - - - - - - - - - Timer / Counter 2 high byte

Dynalog E-20
Dyna-51 8051 Instruction Set

PSW D0 D7 D6 D5 D4 D3 D2 D1 D0 Program Status Word


P ACC parity flag
-- User definable flag
OV Overflow flag
RSO Reg bank select 0
RS1 Reg bank select 1
F0 Gen purpose Flag 0
AC Auxiliary carry Flag
CY Carry flag

ACC E0 E7 E6 E5 E4 E3 E2 E1 E0 Accumulator
ACC.0 Accumulator bit 0
ACC.1 Accumulator bit 1
ACC.2 Accumulator bit 2
ACC.3 Accumulator bit 3
ACC.4 Accumulator bit 4
ACC.5 Accumulator bit 5
ACC.6 Accumulator bit 6
ACC.7 Accumulator bit 7

Dynalog E-21
Dyna-51 8051 Instruction Set

B F0 F7 F6 F5 F4 F3 F2 F1 F0 B Register
B.0 B register bit 0
B.1 B register bit 1
B.2 B register bit 2
B.3 B register bit 3
B.4 B register bit 4
B.5 B register bit 5
B.6 B register bit 6
B.7 B register bit 7

E.9 INTERRUPT VECTORS & PRIORITY LEVELS

Event Vector Priority level


Reset 000
External INT0 003 - Highest priority
Counter / Timer 0 00B
External INT1 013
Counter / Timer 1 01B
Serial RCV & XMIT flag 023
Timer 2 & External 2 02B - Lowest priority

Dynalog E-22
Dyna-51 8051 Instruction Set

USER RAM MEMORY MAP

Reg Byte Bit Address Byte / Bit


Addr 7 6 5 4 3 2 1 0 Description
30 -> 7F - - - - - - - - - - - - - - - - - - - - - 80 bytes general user RAM
2F 7F 7E 7D 7C 7B 7A 79 78 Bit addressable RAM location
2E 77 76 75 74 73 72 71 70 Bit addressable RAM location
2D 6F 6E 6D 6C 6B 6A 69 68 Bit addressable RAM location
2C 67 66 65 64 63 62 61 60 Bit addressable RAM location
2B 5F 5E 5D 5C 5B 5A 59 58 Bit addressable RAM location
2A 57 56 55 54 53 52 51 50 Bit addressable RAM location
29 4F 4E 4D 4C 4B 4A 49 48 Bit addressable RAM location
28 47 46 45 44 43 42 41 40 Bit addressable RAM location
27 3F 3E 3D 3C 3B 3A 39 38 Bit addressable RAM location
26 37 36 35 34 33 32 31 30 Bit addressable RAM location
25 2F 2E 2D 2C 2B 2A 29 28 Bit addressable RAM location
24 27 26 25 24 23 22 21 20 Bit addressable RAM location
23 1F 1E 1D 1C 1B 1A 19 18 Bit addressable RAM location
22 17 16 15 14 13 12 11 10 Bit addressable RAM location
21 0F 0E 0D 0C 0B 0A 09 08 Bit addressable RAM location
20 07 06 05 04 03 02 01 00 Bit addressable RAM location

18 -> 1F - - - - - - - - - - - - - - - - - - - - Bank 3 registers R0 -> R7

10 -> 17 - - - - - - - - - - - - - - - - - - - - Bank 2 registers R0 -> R7

08 -> 0F - - - - - - - - - - - - - - - - - - - - Bank 1 registers R0 -> R7

00 -> 07 - - - - - - - - - - - - - - - - - - - - Bank 0 registers R0 -> R7

Dynalog E-23
Dyna-51 8051 Instruction Set

Appendix F
Component Layout & Circuit Diagrams

Das könnte Ihnen auch gefallen