EMAC PRIMER Instruction Manual page 91

Table of Contents

Advertisement

INPUT
OUTPUT
SERVICE 19
RDSCL
INPUT
OUTPUT
SERVICE 1A
LEDSTR
INPUT
OUTPUT
SERVICE 1B
DDATA
INPUT
OUTPUT
mode and vice-versa you must change the hours to match the selected mode. Once the
hours are correct, the real time clock will maintain the correct hour for the selected mode.
If bit 5 of address DE + 4 is set to 1 and WRSCL is executed, the real time clock will be
stopped. The clock may be restarted by resetting the bit to 0 and executing WRSCL.
REGISTER C: 18
REGISTER PAIR DE:
Address of the first of 8 bytes to be written to the real time clock.
NONE
Read 8 bytes of data from the optional real time clock and store them in the 8
consecutive bytes starting at the address in the DE register pair. The 8 bytes are
formatted the same as the data passed to WRSCL.
REGISTER C: 19
REGISTER PAIR DE:
Starting address to store the 8 bytes read from the real time clock.
NONE
LED String output; This service routine allows you to individually turn off, or on, any of the
segments on one or more of the numeric displays. The HL register pair will point to a
section of data for display bit patterns. The bit patterns stored here control the displays
the same as the service LEDOUT (service 11). For example, the following program will
send a pattern to displays 4, 3 and 2 , leaving the others unchanged.
LEDSTR EQU
1AH
MOS
EQU
1000H
org
0ff01h
mvi
c,LEDSTR
mvi
e,3
mvi
d,4
lxi
h,bitpat
call
MOS
loop:
jmp
loop
bitpat: db
00010000b,00000100b,10000000b
MACHINE LANGUAGE
ADDRESS DATA
FF01
FF02
FF03
FF04
FF05
FF06
FF07
FF08
FF09
FF0A
FF0B
FF0C
FF0D
FF0E
FF0F
FF10
FF11
FF12
REGISTER C: 1A
REGISTER E: Number of displays to change ( 1 to 6)
REGISTER D: Starting display (numbered 5-0 from left to right).
REGISTER PAIR HL: Address of string of bit pattern data to be shown on the displays
NONE
Display the hex byte in E on the DATA/OP displays
REGISTER C: 1B
NONE
; address of MOS services
; select LEDSTR service
; change 3 digits
; starting at display 4, going right
; point to table of bit patterns
; loop here so we can see displays
INSTRUCTION
0E
MVI C,1A
1A
1E
MVI E,3
03
16
MVI D,4
04
21
LXI H,FF10
10
FF
CD
CALL 1000
00
10
C3
JMP FF03
03
FF
10
BIT PATTERN DATA
04
80
91

Advertisement

Table of Contents
loading

Table of Contents