beautypg.com

Calendar/clock chapter 7 – Remote Processing RPC-150 User Manual

Page 20

background image

CALENDAR/CLOCK

CHAPTER 7

Page 18

RPC-150

Figure 7-1 Calendar/clock ins tallation

DESCRIPTION

The RPC-150 has a battery backed Calendar/clock
option using the DS-1216EM. When used in conjunction
with the D ATE $ and TIM E$ com mands, the curr ent date
and time c an be set and r ead. The D S-1216E M is
accurate to 1 m inute/mon th at 25°C. Battery life is a
mi nim um of 5 ye ar s at 25 °C a nd 2 y ea rs wh en at 5 0°C .

INSTALLATION

The real time clock is installed in socket U3. Remove
the IC in U3. Install the DS-1216EM in U3. Install the
IC previously removed into the top of the DS-1216EM.

SETTING DATE AND TIME

The clock must be turned on before it is used. This need
be done only once. To turn on the clock, type:

CONFIG CLOCK ON

The date and time can be set while running a program or
in the immediate mode. Date and time are treated as
strings and not numbers. T o set the date and time:

date$="07-25-94"
time$="15:03:00"

T o r et r ie v e d a te a nd ti m e a s pa r t o f a p r o gr a m :

2000 DA$ = DATE$(0)
2010 TI$ = TIME$(0)

You can also print the d ate and time in the imm ediate
mode:

pr time$(0)
15:04:03

The clock is turned on and off using the CONFIG
CLO CK statem ent.

COMMANDS

The following is a list of CAMBASIC com mands for the
calendar/clock.

Comm and

Function

C O N F I G C L OC K

Configures clock

DATE$

Sets date

DAT E$(0)

Return s date

TIME$

S e ts ti m e

TIME $(0)

R e tu r n s t im e