Remote Technologies RPC-320 manual Setting Date and Time, M E

Page 30

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 4-hour fo rma t.

Refer to the RPBASIC -52 Software Supplement for more com mand information.

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 RPBASIC-52 commands for the calendar/clock.

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 7-1 RPC-320

Image 30
Contents REV TrademarksRevision Table of Contents Interrupt Characteristics Sect ION 11 Watchdog Timer DescriptionExternal Reset Sect ION 13 Multi Mode Counter DescriptionSoftware Revision History Description OverviewSection Manual OrganizationSymbols and Term inology Technical SupportOverview Section System layoutOperating Precautions IntroductionEquipment First Time Operation Using a PCUsing a Terminal Uploading and Downloading ProgramsEditing programs and program ming hints Where to GO from Here TroubleshootingEprom Saving ProgramsSaving a Program W3 autorun jumperLoading a Program AutorunningPreventing Autorun Changing Eprom SizeBload CommandsAlternate Eproms BsaveSerial Ports COM0 Serial PortCOM1 Serial Port Serial Ports Section RS-422/485 Operating InformationRS-422/485 Termination network Accessing Serial Buffers Two wire RS-485Multidrop Network Accessing COM0 and COM1 Disabling CONTROL-CSerial Port PIN OUT RXD CTS RAM Memory Battery BackupChecking the battery Changing MemoryReserved Memory Storing Variables in RAMAssembly Language Interface Block Data TransferDigital and Opto Ports Digital I/O PortsDigital Por t J3 High Current Port L8 Digital I/O CommandsDigital Port P6 Optically Isolated InputHigh Current Output Interfacing to switches and other devices Interfacing Digital I/O to an opto-module rackDigital I/ O prog ramm ing exam ple Ls e Width Modulation PWM Digital and Opto Ports Section Conne ctor pin ou t J3Line Config LineCount Line BSetting Date and Time DateM E Section Connecting Displays Writing to the DisplayProgramming Example Display Connector PIN OUT Display TypesKeypad Port Program explanationKeypad Port PIN OUT J5 Initialization Connecting Analog InputsAnalog Input Overvoltage conditionsDifferential Mode Examples u sing CON FIG AINAcquiring Analog Data Temperature Measurement Noise NotesAnalog Input Section Data logging on a timer tick Measuring Higher VoltagesConverting Analog Measurements AmplifiersMeasuring 4-20 mA current loops Calibration Watchdog Timer External ResetInterrupt Characteristics Optically Isolated InterruptProgram Example Optically isolated and TTL interrup ts Load ProgrammingGND GateCOU NT0 Power Management Further Power ReductionPower Management Section Program Examp leElectrical Specifications Technical InformationJumper Descriptions Mechanical SpecificationsMemory and I/O Bank MAP Bank