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

MPC82G516A 参数 Datasheet PDF下载

MPC82G516A图片预览
型号: MPC82G516A
PDF下载: 下载PDF文件 查看货源
内容描述: 8位微控制器 [8-bit microcontroller]
分类和应用: 微控制器
文件页数/大小: 144 页 / 1527 K
品牌: MEGAWIN [ MEGAWIN TECHNOLOGY CO., LTD ]
 浏览型号MPC82G516A的Datasheet PDF文件第73页浏览型号MPC82G516A的Datasheet PDF文件第74页浏览型号MPC82G516A的Datasheet PDF文件第75页浏览型号MPC82G516A的Datasheet PDF文件第76页浏览型号MPC82G516A的Datasheet PDF文件第78页浏览型号MPC82G516A的Datasheet PDF文件第79页浏览型号MPC82G516A的Datasheet PDF文件第80页浏览型号MPC82G516A的Datasheet PDF文件第81页  
15.2 Configuring the SPI  
Table 15-1 shows configuration for the master/slave modes as well as usages and directions for the modes.  
Table 15-1. SPI Master and Slave Selection  
/SS  
-pin  
MISO MOSI SPICLK  
SPEN  
SSIG  
MSTR  
(SPCTL.4)  
Mode  
Remarks  
(SPCTL.6) (SPCTL.7)  
-pin  
-pin  
-pin  
P1.4~P1.7 are used as general  
port pins.  
0
1
1
X
0
0
X
0
1
X
0
0
SPI disabled input input  
input  
Salve  
Selected as slave.  
Not selected.  
output input  
(selected)  
input  
input  
Slave  
(not selected)  
Hi-Z  
input  
Mode change to slave  
Slave  
(by mode  
change)  
if /SS pin is driven low, and MSTR  
will be cleared to ‘0’ by H/W  
automatically.  
1
1
0
0
0
1
1 Î 0  
output input  
input  
Hi-Z  
MOSI and SPICLK are at high  
impedance to avoid bus  
contention when the Master is  
idle.  
Master  
(idle)  
Hi-Z  
1
input  
MOSI and SPICLK are push-pull  
when the Master is active.  
Master  
(active)  
output output  
1
1
1
1
X
X
0
1
Slave  
output input  
input  
Master  
input output output  
“X” means “don’t care”.  
15.3 Additional Considerations for a Slave  
When CPHA is 0, SSIG must be 0 and /SS pin must be negated and reasserted between each successive serial  
byte transfer. Note the SPDAT register cannot be written while /SS pin is active (low), and the operation is  
undefined if CPHA is 0 and SSIG is 1.  
When CPHA is 1, SSIG may be 0 or 1. If SSIG=0, the /SS pin may remain active low between successive  
transfers (can be tied low at all times). This format is sometimes preferred for use in systems having a single  
fixed master and a single slave configuration.  
15.4 Additional Considerations for a Master  
In SPI, transfers are always initiated by the master. If the SPI is enabled (SPEN=1) and selected as master,  
writing to the SPI data register (SPDAT) by the master starts the SPI clock generator and data transfer. The data  
will start to appear on MOSI about one half SPI bit-time to one SPI bit-time after data is written to SPDAT.  
Before starting the transfer, the master may select a slave by driving the /SS pin of the corresponding device low.  
Data written to the SPDAT register of the master is shifted out of MOSI pin of the master to the MOSI pin of the  
slave. And, at the same time the data in SPDAT register of the selected slave is shifted out on MISO pin to the  
MISO pin of the master.  
After shifting one byte, the SPI clock generator stops, setting the transfer completion flag (SPIF) and an interrupt  
will be created if the SPI interrupt is enabled. The two shift registers in the master CPU and slave CPU can be  
considered as one distributed 16-bit circular shift register. When data is shifted from the master to the slave, data  
is also shifted in the opposite direction simultaneously. This means that during one shift cycle, data in the master  
and the slave are interchanged.  
77  
MPC82G516A Data Sheet  
MEGAWIN  
 
 复制成功!