CALENDAR/CLOCK
DESCRIPTION
An optional DS1216DM calendar/clock module m ay be installed in U5. The DS1216D M also battery backs
R A M .
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 P rocessing for de tails.
Battery life depends greatly upon the ambient temperature . Battery life degrades up to 50% at 50°C, using 25°C as a refer ence. 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.
Hour s are exp ressed in 2
Refer to the RPBASIC
The cloc k module is installed by first r emoving the IC in U5. Then, install the DS1 216DM into the socket. Install the RAM chip into the socket. W hen installing a 32K RAM chip, the top two pins in the DS1216DM ar e left open.
Refer to CHAPTER 5 for information about using battery backed RAM and jumper setting when installing a 512K R A M .
WARNING: An additional modification to the DS1216DM is necessary when installing a 512K RAM. C ontact Remote P rocessing for de tails.
SETTING DATE AND TIME
Set the date to turn on the clock module . Date and time are set w hile runnin g a progr am or in the imm ediate mode. Date and time are treated as number s 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 .
SECTION 7
NOTE: The clock module is turned off as shipped from the factory. DATE and TIME functions return a HA RDW ARE erro r until DA TE is se t 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 mo dule is missing , de fective, or the date has not been set, a HARD WARE er ror (code 50 at address 101H) is returned by RPBASIC when a DATE or TIM E function is performed. Use ONE RR to trap for this error and report the problem .
COMMANDS
The following is a list of
Comm and | Function |
DATE | Sets date and tur ns on mod ule |
DAT E(n) | Return s date |
T I M E | Sets time |
TIME (n) | Returns time |
Page