參數(shù)資料
型號: MR80C52TXXX-30SBD
廠商: ATMEL CORP
元件分類: 微控制器/微處理器
英文描述: 8-BIT, MROM, 30 MHz, MICROCONTROLLER, CQCC44
封裝: LCC-44
文件頁數(shù): 22/141頁
文件大?。?/td> 7628K
代理商: MR80C52TXXX-30SBD
202
8021G–AVR–03/11
ATmega329P/3290P
20.3.3
SPI Slave Operation Example
The following code demonstrates how to use the USI module as a SPI Slave:
init:
ldi
r16,(1<<USIWM0)|(1<<USICS1)
sts
USICR,r16
...
SlaveSPITransfer:
sts
USIDR,r16
ldi
r16,(1<<USIOIF)
sts
USISR,r16
SlaveSPITransfer_loop:
lds
r16, USISR
sbrs
r16, USIOIF
rjmp
SlaveSPITransfer_loop
lds
r16,USIDR
ret
The code is size optimized using only eight instructions (+ ret). The code example assumes that
the DO is configured as output and USCK pin is configured as input in the DDR Register. The
value stored in register r16 prior to the function is called is transferred to the master device, and
when the transfer is completed the data received from the Master is stored back into the r16
Register.
Note that the first two instructions is for initialization only and needs only to be executed
once.These instructions sets Three-wire mode and positive edge Shift Register clock. The loop
is repeated until the USI Counter Overflow Flag is set.
相關(guān)PDF資料
PDF描述
MQ80C52EXXX-36/883D 8-BIT, MROM, 36 MHz, MICROCONTROLLER, CQFP44
MD83C154CXXX-16P883D 8-BIT, MROM, 16 MHz, MICROCONTROLLER, CDIP40
MR83C154CXXX-25P883R 8-BIT, MROM, 25 MHz, MICROCONTROLLER, CQCC44
MR83C154XXX-25/883D 8-BIT, MROM, 25 MHz, MICROCONTROLLER, CQCC44
MD80C32E-16/883 8-BIT, 16 MHz, MICROCONTROLLER, CDIP40
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MR80C86 制造商:INTERSIL 制造商全稱:Intersil Corporation 功能描述:CMOS 16-Bit Microprocessor
MR80C86/B 制造商:Rochester Electronics LLC 功能描述:- Bulk 制造商:Harris Corporation 功能描述:Microprocessor, 16 Bit, 44 Pin, Ceramic, LCC
MR80C86-2 制造商:INTERSIL 制造商全稱:Intersil Corporation 功能描述:CMOS 16-Bit Microprocessor
MR80C86-2/883 制造商:Rochester Electronics LLC 功能描述:- Bulk
MR80C86-2/B 制造商:Intersil Corporation 功能描述:MPU 80C86 16BIT CMOS 8MHZ 44PLCC - Rail/Tube