EM78452
8-Bit Microcontroller
ORG 0X30
INIT:
CLRA
IOW 0X05
IOW 0X06
MOV 0x05,A
MOV 0X06,A
MOV A,@0XFF
IOW 0X08
MOV A,@0B11001111 ; Set prescaler for WDT
CONTW
MOV A,@0B00010001 ; Disable wakeup function
IOW 0X0E
MOV A,@0B00000010 ; Enable external interrupt
IOW 0XF
ENI
MOV A,@0B00110111
IOW 0x09
BC 0X3F,1
NOP
; Clear RBFIF flag
JBS 0X3F,1
; Polling loop for checking interrupt
; occurrences
JMP $-2
JMP INTERRUPT
SPI:
BS 0X0D,4
WDTC
; Keep SSE enabled as long as possible
; Show a signal when entering SPI loop
; Choose P81 as a signal button
MOV A,@0X0F
MOV 0X06,A
JBC 0X08,1
JMP SPI
MOV A,@0X5A
; Move 5A into write buffer when P81 button
; is pushed
MOV 0X0B,A
NOP
JBC 0X0D,4
; Polling loop for checking SPI
; transmission completed
JMP $-2
BS 0XD,4
NOP
NOP
MOV A,@0XF0
;DisplayatPort6whenP81buttonispushed
Product Specification (V1.0) 10.18.2007
(This specification is subject to change without further notice)
• 29