Mitsubishi Motors DS5000TK User Manual

Page 160

Advertising
background image

USER’S GUIDE

050396 159/173

160

;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

Advertising
This manual is related to the following products: