Mitsubishi DS907x SIP, DS5000TK manual 160

Models: DS5000TK DS907x SIP

1 174
Download 174 pages 46.43 Kb
Page 160
Image 160

USER'S GUIDE

;Set Time

 

 

 

 

CLR

A

 

 

 

MOV

R0,

#0Bh

 

 

LCALL

WBYTE

 

; Freeze the registers.

MOV

DPTR,

#YEAR

 

 

LCALL

TEXT_OUT

 

 

 

LCALL

HEX_IN

 

 

 

LCALL

WBYTE

 

; Set the year.

MOV

DPTR,

#MONTH

 

 

LCALL

TEXT_OUT

 

 

 

LCALL

HEX_IN

 

 

 

LCALL

WBYTE

 

; Set the month.

MOV

DPTR,

#DAY

 

 

LCALL

TEXT_OUT

 

 

 

LCALL

HEX_IN

 

 

 

LCALL

WBYTE

 

; Set the day.

DEC

R0

 

 

 

MOV

DPTR,

#DAYW

 

 

LCALL

TEXT_OUT

 

 

 

LCALL

HEX_IN

 

 

 

LCALL

WBYTE

 

; Set day of the week.

DEC

R0

 

 

 

MOV

DPTR,

#HOUR

 

 

LCALL

TEXT_OUT

 

 

 

LCALL

HEX_IN

 

 

 

LCALL

WBYTE

 

; Set the hour.

DEC

R0

 

 

 

MOV

DPTR,

#MINUTE

 

 

LCALL

TEXT_OUT

 

 

 

LCALL

HEX_IN

 

 

 

LCALL

WBYTE

 

; Set the minute.

CLR

A

 

 

 

LCALL

WBYTE

 

; Set seconds

LCALL

WBYTE

 

;

to 00.00

MOV

DPTR,

#TRIGGER

 

 

LCALL

TEXT_OUT

 

 

 

LCALL

CHAR_IN

 

; Wait for trigger.

MOV

A,

#80H

 

 

MOV

R0,

#11

 

 

LCALL

WBYTE

 

; Un±freeze the registers.

;

 

 

 

 

TELL_TIME:

 

 

 

 

MOV

DPTR,

#TEXT4

 

 

LCALL

TEXT_OUT

 

; Invite user to read time.

CONTINUE:

 

 

 

 

;

 

 

 

 

LCALL

CHAR_IN

 

; Wait for read request.

CLR

A

 

 

 

MOV

R0,

#11

 

 

LCALL

WBYTE

 

; Freeze the registers.

MOV

DPTR,

#TEXT1

 

 

LCALL

TEXT_OUT

 

 

 

MOV

R0,

#9

 

 

LCALL

RBYTE

 

; Read the month.

ANL

A,

#1FH

; Isolate it.

LCALL

HEX_OUT

 

; Display month.

MOV

A,

#'/'

 

 

LCALL

CHAR_OUT

 

 

 

 

 

 

 

 

050396 159/173

 

 

 

 

160

Page 160
Image 160
Mitsubishi DS907x SIP, DS5000TK manual 160