
CALENDAR/CLOCK SECTION 7
Page 7-1 RPC-320
DESCRIPTION
An optional DS1216DM calendar/clock module may be
installed in U5. The DS1216DM also battery backs
RAM.
The DS1216DM from Remote Processing is a modified
version of the Dallas DS1216D. An internal reset line
has been cut. When a 512K RAM is installed, an
additional line is cut and another soldered. Contact
Remote Processing for details.
Battery life depends greatly upon the ambient
temperature. Battery life degrades up to 50% at 50°C,
using 25°C as a reference. RAM size and type also
affect battery life. Generally, you can expect a battery
life of 3 to 5 years.
Accuracy is about 1 minute/month and is not adjustable.
Hours are expressed in 24-hour format.
Refer to the RPBASIC-52 Software Supplement for
more command information.
The clock module is installed by first r emoving the IC in
U5. Then, install the DS1216DM into the socket. Install
the RAM chip into the socket. When installing a 32K
RAM chip, the top two pins in the DS1216DM are left
open.
Refer to CHAPTER 5 for information about using battery
backed RAM and jumper setting when installing a 512K
RAM.
WARNING: An additional modification to the
DS1216DM is necessary when
installing a 512K RAM. Contact
Remote Processing for details.
SETTING DATE AND TIME
Set the date to turn on the clock module. Date and time
are set while running a progr am or in the immediate
mode. Date and time are treated as numbers and not
strings. To set the date and time:
DATE 95,11,28
TIME 13,23,43
The time is set to 1:23:43 PM.
NOTE: The clock module is turned off as shipped from
the factory. DATE and TIME functions return
a HARDW ARE error until DATE is set first.
To retrieve date and time as part of a program:
100 PRINT "Time: ",
110 FOR N=0 TO 2
120 PRINT TIME(N),
130 NEXT
140 PRINT "Date: ",
150 FOR N=0 TO 2
160 PRINT DATE(N),
170 NEXT
180 PRINT CR,
190 GOTO 100
run
Time: 13 24 12 Date: 94 11 14
When the clock module is missing, defective, or the date
has not been set, a HARD WARE error (code 50 at
address 101H) is returned by RPBASIC when a DATE
or TIME function is performed. Use ONERR to trap for
this error and report the problem.
COMMANDS
The following is a list of RPBASIC-52 commands for
the calendar/clock.
Command Function
DATE Sets date and tur ns on module
DATE(n) Returns date
TIME Sets time
TIME(n) Returns time