EMAC PRIMER Instruction Manual page 90

Table of Contents

Advertisement

SERVICE 12
LEDHEX
INPUT
OUTPUT
SERVICE 13
LEDDEC
INPUT
OUTPUT
SERVICE 14
DELAY
INPUT
OUTPUT
SERVICE 15
PTBIN
INPUT
OUTPUT
SERVICE 16
KEYSTAT
INPUT
OUTPUT
SERVICE 17
DIGOUT
INPUT
OUTPUT
SERVICE 18
WRSCL
LED Hexadecimal output; This service routine displays the number in the DE register pair
in hex, in the four displays on the left.
REGISTER C: 12
REGISTER PAIR DE: 16 bit number to be displayed in HEX.
NONE
LED Decimal output; This service displays a number in the DE register pair in decimal, in
the four displays on the left. The maximum decimal value displayed is 9999.
REGISTER C: 13
REGISTER PAIR DE: number to be displayed in Decimal.
NONE
Delay according to the value of the HL register pair. The larger the value, the longer the
delay
REGISTER C: 14
REGISTER PAIR HL: Amount of delay.
NONE
Return the complement of input port B. This is similar to the DIPSWIN service.
REGISTER C: 15
REGISTER L: Complement of data input to port B
Return the status of the keypad in the HL register pair. If a key has been pressed H will
be 1 and L will contain the value of the key, otherwise HL will be 0. Keys "0-F" return 00-
0F hex respectively and the "Step", "Func.", "Dec.", and "Enter" keys return 14-17 hex
respectively.
REGISTER C:16
REGISTER PAIR HL: Keypad status
Show the hex digit in E on the display in D. The value for E must be less than 10 hex.
The value in D should be a number from 0 to 5, with 0 denoting the rightmost display and
5 the leftmost.
REGISTER C:17
REGISTER E: Hex digit to show
REGISTER D: Display to put digit
NONE
Write 8 bytes of memory, starting from the address in DE, to the optional real time clock.
The clock provides timekeeping information in BCD including hundredths of seconds,
seconds, minutes, hours, day, date, month and year information. The date at the end of
the month is automatically adjusted for months with less than 31 days, including
correction for leap years. The real time clock operates in either 24-hour or 12-hour
format with an AM/PM indicator. The data pointed to by DE will be stored in the real time
clock as follows:
BIT#
7
6
DE
DE+1
DE+2
0
(AM/PM MODE)
1
0
DE+3
(24 HOUR MODE)
0
0
DE+4
0
0
DE+5
0
0
DE+6
0
0
DE+7
If bit 7 of address DE + 3 is 0 the clock will be in 24 hour mode after WRSCLK is
executed. If it is 1 then AM/PM mode is selected and bit 5 of address DE + 3 will select
AM or PM (PM is selected if bit 5 is 1). When changing from AM/PM mode to 24 hour
5
4
3
0.1 SEC
10 SEC
10 MIN
AM/PM
10HR
10 HOUR
STOP
0
10 DATE
0
10MO
10 YEAR
90
2
1
0
RANGE
0.01 SEC
00-99
SECONDS
00-59
MINUTES
00-59
HOUR
01-12
HOUR
00-23
DAY
01-07
DATE
01-31
MONTH
01-12
YEAR
00-99

Advertisement

Table of Contents
loading

Table of Contents