EM78452
8-Bit Microcontroller
Fig. 4-13 SPI Mode with /SS Enable
5.5.6 Software Application of SPI
Example for SPI:
For Master
ORG 0X0
Setting:
CLRA
IOW 0X05
IOW 0X06
MOV 0X05,A
MOV A,@0B11001111
CONTW
MOV A,@0B00010001
IOW 0X0E
MOV A,@0B00000000
IOW 0X0F
MOV A,@0x07
IOW 0x09
MOV A,@0B10000000
MOV 0x0C,A
MOV A,@0B11100000
MOV 0X0D,A
; Set Port 5 output
; Set Port 6 output
; Set prescaler for WDT
; Disable wake-up function
; Disable interrupt
; SDI input and SDO, SCK output
; Clear RBF and RBFIF flag
; Select clock edge and enable SPI
26
•
Product Specification (V1.0) 10.18.2007
(This specification is subject to change without further notice)