Specifications

59
TIME
OF
DAY
The
fo11owinQ
BASIC
program:
SETS
UP
THE
AMO
9S13
TIMER
I.C.
FOR
TIME
OF
DAY
OPERATION.
The
initial
time
and
day
1s
inserted
at
the
locations
marked
by
a
"."
in
the program. These
values
are
the
decimal
equivalents
of
the
values indicated, in
HEX
form.
For
example. in
line
90,
if
the
initial
value
of
the seconds
is
to
be
30. the
number
used
in the
program
would
be
48.
Nine
seconds
would
be
a 9 in the
program
and
43
seconds
would
be
a
67
in the
program.
BASIC:
10
OUT(30)=255
20
OUT(30)=23
30
OUT(28)'255
40
OUT(28)=138
50
OUT(30)=01
60
OUT(28)=57
70
OUT(28)=15
80
OUT(28)'
90
OUT(28)=
100
OUT(30)=02
110
OUT(28)=61
120
OUT(28)'00
130
OUT(28)'
140
OUT(28)=
150
OUT(30j=03
160
OUT(28)=57
170
OUT(280=00
180
OUT(28)=
*
190
OUT(28)=
*
200
OUT(30)=67
HEX
"rF
17
FF
8A
01
39
OF
02
3D
00
03
39
00
43
Master
Mode
Reset
Set
Data
Pointer to
Master
Mode
Register
Set
Master
Mode
Register
to:BCD.
Data
Pointer Increment. 8 Bit
Bus.
FOUT
ON.
FOUT
flO.
FOUT
SOURCE
F5.
Compare
1 &2 Enabled.
TOO
Enabled
.
10
Set
D~ta
Pointer to
Counter
Mode-
Re9i
ster
1
Set Counter
Mode
to:
SOURCE=F5.
ACTIVE
HI
TC.
BCD.
COUNT
UP
Tenths
and
Hundreths-Seconds
Tens
and
Ones-Seconds
Set
Data
Pointer to
Counter
Mode
Register 2
Set counter
Mode
to:
SOURCE·TCI.
ACTIVE
LO
TC.
8CO.
COUNT
UP
Tens
and
Ones-Minutes
Tens
and
Ones-Hours
Set
Oa
ta
Poi
nter to
Counter
Mode
Register 3.
Set Counter
Mode
to:SOURCE=TC2.
ACTIVE
HI
TC.
BCD.
COUNT
UP
Tens
and
Ones-Days
Thousands
and
Hundreds-Days
Load
Counter
1
and
2 with Contents
of
Load
Registers