欢迎访问ic37.com |
会员登录 免费注册
发布采购

895132-UL 参数 Datasheet PDF下载

895132-UL图片预览
型号: 895132-UL
PDF下载: 下载PDF文件 查看货源
内容描述: USB微控制器,带有64K字节Flash存储器 [USB Microcontroller with 64K Bytes Flash Memory]
分类和应用: 存储微控制器
文件页数/大小: 182 页 / 1660 K
品牌: ATMEL [ ATMEL ]
 浏览型号895132-UL的Datasheet PDF文件第117页浏览型号895132-UL的Datasheet PDF文件第118页浏览型号895132-UL的Datasheet PDF文件第119页浏览型号895132-UL的Datasheet PDF文件第120页浏览型号895132-UL的Datasheet PDF文件第122页浏览型号895132-UL的Datasheet PDF文件第123页浏览型号895132-UL的Datasheet PDF文件第124页浏览型号895132-UL的Datasheet PDF文件第125页  
AT89C5132  
19.1 Description  
The SPI controller interfaces with the C51 core through three special function registers: SPCON,  
the SPI control register (see Table 98); SPSTA, the SPI status register (see Table 99); and  
SPDAT, the SPI data register (see Table 100).  
19.1.1  
Master Mode  
The SPI operates in master mode when the MSTR bit in SPCON is set.  
Figure 19-3 shows the SPI block diagram in master mode. Only a master SPI module can initiate  
transmissions. Software begins the transmission by writing to SPDAT. Writing to SPDAT writes  
to the shift register while reading SPDAT reads an intermediate register updated at the end of  
each transfer.  
The byte begins shifting out on the MOSI pin under the control of the bit rate generator. This  
generator also controls the shift register of the slave peripheral through the SCK output pin. As  
the byte shifts out, another byte shifts in from the slave peripheral on the MISO pin. The byte is  
transmitted most significant bit (MSB) first. The end of transfer is signalled by SPIF being set.  
In case of the AT89C5132 is the only master on the bus, it can be useful not to use SS pin and  
get it back to I/O functionality. This is achieved by setting SSDIS bit in SPCON.  
Figure 19-3. SPI Master Mode Block Diagram  
MOSI/P4.1  
I
Q
MISO/P4.0  
SCK/P4.2  
SS/P4.3  
8-bit Shift Register  
SPDAT WR  
SPDAT RD  
MODF  
SPSTA.4  
SSDIS  
SPCON.5  
Control and Clock Logic  
WCOL  
SPSTA.6  
PER  
Bit Rate Generator  
CLOCK  
SPIF  
SPSTA.7  
SPEN  
SPCON.6  
SPR2:0  
SPCON  
CPHA  
SPCON.2  
CPOL  
SPCON.3  
Note:  
MSTR bit in SPCON is set to select master mode.  
19.1.2  
Slave Mode  
The SPI operates in slave mode when the MSTR bit in SPCON is cleared and data has been  
loaded in SPDAT.  
Figure 19-4 shows the SPI block diagram in slave mode. In slave mode, before data transmis-  
sion occurs, the SS pin of the slave SPI must be asserted to low level. SS must remain low until  
the transmission of the byte is complete. In the slave SPI module, data enters the shift register  
through the MOSI pin under the control of the serial clock provided by the master SPI module on  
the SCK input pin. When the master starts a transmission, the data in the shift register begins  
shifting out on the MISO pin. The end of transfer is signaled by SPIF being set.  
121  
4173E–USB–09/07  
 复制成功!