Master-Slave implementation between a GB60 and a GT16 MCU

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Master-Slave implementation between a GB60 and a GT16 MCU

1,793 次查看
jccastaneda
Contributor I
We would like to implement a Master-Slave system between a GB60 and a GT16 MCU;  what would be the best serial channel (SPI or SCI)?
 
Thanks.
标签 (1)
0 项奖励
回复
2 回复数

777 次查看
peg
Senior Contributor IV
Hi jccastaneda,
 
That would depend a lot on what you are trying to do... But the biggest problem with SPI is that the slave cannot initiate a message on its own.
 
0 项奖励
回复

777 次查看
bigmac
Specialist III
Hello,
 
The main advantage that SPI has, compared with SCI, is that generally the data transfer will be much faster.  But this assumes that the two MCU are typically located on the same board, or perhaps on different boards within the same equipment.
 
The primary advantage of SCI is that it will usually consume less pins on the MCU, and transmission distances can be much greater with the use of buffers (RS232 or RS485).
 
As Peg explained, the SPI slave cannot initiate a data transfer, so you might require an additional handshake connection between the two devices (in addition to slave select SS), for the slave to signal the master that it has data to send.
 
Another approach is to use a dual SPI master arrangement.  Here, each end of the link would default to being a slave device, to be able to receive any data sent (and return response data).  However, operation would revert to master operation when either end requires to initiate the sending of data.
 
Whether you use SPI or SCI you will likely need a basic communications protocol.  This would be devised to suit the type of data being transferred.
 
Regards,
Mac
 
0 项奖励
回复