Any sample code for S08QG8 to use SCI & SPI port?

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

Any sample code for S08QG8 to use SCI & SPI port?

5,483 次查看
TonyLin
Contributor I
Hi, I would like to make S08QG8 working as an UART-SPI interface, so that I can communicate from PC to SPI devices. Is there any sample code for this application available?
Thanks a lot!
标签 (1)
0 项奖励
回复
4 回复数

1,272 次查看
eckhard
Contributor V
Hello,
 
have you read this ?
 
you can download the code too at the product page.
 
Eckhard
0 项奖励
回复

1,272 次查看
TonyLin
Contributor I
In the document, I saw there was a sample project named SCI.mcp. But I can find it inside the HCS08QRUGSW.zip.
Do you have any idea where I can find it? Thanks!
0 项奖励
回复

1,272 次查看
TonyLin
Contributor I
ya, I have read it. However, it provides codes for SCI and SPI individually. What I need it is actually a bridge from SCI-to-SPI.
Thanks anyway.
0 项奖励
回复

1,272 次查看
bigmac
Specialist III

Hello TonyLin,

The SPI code, and therefore the SCI-to-SPI bridge will be dependent on whether the SPI facility is a master or a slave.  If SCI receive traffic exceeds the transmit traffic, I would tend to choose a SPI master.  If the SCI transmit traffic is greater, the SPI would operate as a slave.  It will also depend on whether the other end of the SPI link is master or slave.  If the other end is existing equipment, you will also need to match the SPI parameters CPHA and CPOL.

The slave SPI would generally be interrupt driven, whereas the master operation might be polled.

Regards,
Mac

 

0 项奖励
回复