Japanese
HARDWARE ManualSMPC User's Manual
BackForward
SMPC User's Manual/Chapter 2 SMPC Commands

■2.5 RTC commands

Details of RTC commands are shown in table format. The table of each command and notes are as follows. In addition, by using status flags in all commands, you can manage double issuing of commands.

●SMPC interrupt
Items marked as "occurrence" generate an SMPC interrupt to the SH-2 via the SCU at the end of the command. Additionally, interrupts can be enabled/disabled by setting the SCU.

●IREG, OREG

By using it together with status flag (SF),

can be judged.

●Execution time
The execution time is calculated from the number of steps in the SMPC internal firmware. If there is a conflict with an internal task such as RTC increment, the command execution time will change, so it is described in the range of minimum and maximum values.


List |▲ Back | ■

No.1

SETTIME

Time setting

Command code 16H
SMPC interrupt generation disabled
IREG 0 to 6
OREG 31
Execution time max=xxx
        min=70μsec

Functional details
Set RTC time.

command parameters
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
OREG0 20100001H Year 1000 (BCD) Year 100 (BCD)
OREG1 20100003H Year number 10 (BCD) First place in the Western calendar (BCD)
OREG2 20100005H Day of the week (hexadecimal) Note 1 Month (hexadecimal) Note 2
OREG3 20100007H 10th place per day (BCD) No. 1 per day (BCD)
OREG4 20100009H 10th position (BCD) 1st place (BCD)
OREG5 2010000BH Tenth place (BCD) Minute 1st place (BCD)
OREG6 2010000DH Ten seconds (BCD) Second place (BCD)

Note 1
day of week Sunday Monday Tuesday Wednesday Thursday Friday Saturday
value 0H 1H 2H 3H 4H 5H 6H

Note 2
Month January February March April May June July August September October November December
value 1H 2H 3H 4H 5H 6H 7H 8H 9H AH BH CH

Result parameters
OREG31 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
2010005FH 0 0 0 1 0 1 1 0

remarks
●The time is initialized to " 23:59:59, Friday, December 31, 1993 " at the time of SMPC cold reset and starts counting.

SMPC cold reset occurs under the following conditions
  1. When you press the reset switch inside the battery box on the back of Sega Saturn
  2. When the main power is turned on (ON) when the battery is not installed or when the battery is exhausted
  3. When the battery is inserted while the power is OFF

●If you set data that does not actually exist, a day of the week 7 or more, a month 13 or more, a date that does not correspond to a month (leap year correction is corrected up to 2099), a time 24 or more, minutes and seconds 60 or more, The set value and subsequent count will be undefined.

●If the power is turned OFF while the SETTIME command is being issued,

  1. If the internal processing of the SETTIME command can be executed before the power OFF sequence, all data will be updated.
  2. If the power OFF sequence is executed first, the data before the command is issued will be retained.


BackForward
HARDWARE ManualSMPC User's Manual
Copyright SEGA ENTERPRISES, LTD., 1997