Intel 80C188EC User Manual page 358

Hide thumbs Also See for 80C188EC:
Table of Contents

Advertisement

$mod186
name
;**************************************************************;
;
;
; FUNCTION:
This function represents a slave unit connected to a multi-
;
processor master/slave network. This slave responds to two
;
commands:
;
Flash the LEDs on the EVAL Board, and
;
Disconnect from the Network.
;
Other commands are easily added.
;
; SYNTAX:
extern void far slave_1(void);
;
; INPUTS:
None
;
; OUTPUTS:
None
;
; NOTE:
Parameters are passed on the stack as required by high-level
;
languages. The slave should be running this code before the
;
master calls the slave. Example assumes PCB is in I/O space.
;**************************************************************
;substitute register offsets in place of xxxxh
P1CON
equ
P1LTCH
equ
P2CON
equ
S1CON
equ
S1STS
equ
S1TBUF
equ
S1RBUF
equ
lib_80186
segment public 'code'
assume cs:lib_80186
My_Address
equ
TriStateEna
equ
TriStateDis
equ
FlashLEDs
equ
Disconnect
equ
public
_slave_1
_slave_1
proc far
push ax
push bx
push cx
push dx
Example 11-5. Master/Slave — The slave_1 Routine
example_slave_1_routine
slave_1
xxxxh
;Port 1 Control register
xxxxh
;Port 1 Latch register
xxxxh
;Port 2 Control register
xxxxh
;Serial Port 1 Control register
xxxxh
;Serial Port 1 Status register
xxxxh
;Serial Port 1 Transmit Buffer
xxxxh
;Serial Port 1 Receive Buffer
01h
;slave 1 network address
08h
;Tri-state buffer enable
00h
;Tri-state buffer disable
01h
;list of commands unit 1 responds to
0fh
;save registers that will be modified
SERIAL COMMUNICATIONS UNIT
11-29

Advertisement

Table of Contents
loading

This manual is also suitable for:

80c186ec

Table of Contents