參數(shù)資料
型號: MR83C154CXXX-25P883R
廠商: TEMIC SEMICONDUCTORS
元件分類: 微控制器/微處理器
英文描述: 8-BIT, MROM, 25 MHz, MICROCONTROLLER, CQCC44
文件頁數(shù): 21/141頁
文件大小: 7628K
代理商: MR83C154CXXX-25P883R
201
8021G–AVR–03/11
ATmega329P/3290P
rjmp
SPITransfer_loop
lds
r16,USIDR
ret
The code is size optimized using only eight instructions (+ ret). The code example assumes that
the DO and USCK pins are enabled as output in the DDRE Register. The value stored in register
r16 prior to the function is called is transferred to the Slave device, and when the transfer is com-
pleted the data received from the Slave is stored back into the r16 Register.
The second and third instructions clears the USI Counter Overflow Flag and the USI counter
value. The fourth and fifth instruction set Three-wire mode, positive edge Shift Register clock,
count at USITC strobe, and toggle USCK. The loop is repeated 16 times.
The following code demonstrates how to use the USI module as a SPI Master with maximum
speed (fsck = f
ck/4):
SPITransfer_Fast:
sts
USIDR,r16
ldi
r16,(1<<USIWM0)|(0<<USICS0)|(1<<USITC)
ldi
r17,(1<<USIWM0)|(0<<USICS0)|(1<<USITC)|(1<<USICLK)
sts
USICR,r16 ; MSB
sts
USICR,r17
sts
USICR,r16
sts
USICR,r17
sts
USICR,r16
sts
USICR,r17
sts
USICR,r16
sts
USICR,r17
sts
USICR,r16
sts
USICR,r17
sts
USICR,r16
sts
USICR,r17
sts
USICR,r16
sts
USICR,r17
sts
USICR,r16 ; LSB
sts
USICR,r17
lds
r16,USIDR
ret
相關(guān)PDF資料
PDF描述
MR80C52TXXX-30SBD 8-BIT, MROM, 30 MHz, MICROCONTROLLER, CQCC44
MR80C52EXXX-12/883:R 8-BIT, MROM, 12 MHz, MICROCONTROLLER, CQCC44
MR80C52XXX-12 8-BIT, MROM, 12 MHz, MICROCONTROLLER, CQCC44
MF180C51T-12D 8-BIT, MROM, 12 MHz, MICROCONTROLLER, PQFP44
MR80C32-12:D 8-BIT, 12 MHz, MICROCONTROLLER, CQCC44
相關(guān)代理商/技術(shù)參數(shù)
參數(shù)描述
MR83C154-L16 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MR83C154T-12 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MR83C154T-16 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MR83C154T-20 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
MR83C154T-25 制造商:TEMIC 制造商全稱:TEMIC Semiconductors 功能描述:CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller