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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

4,962 Views
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!
Labels (1)
0 Kudos
Reply
4 Replies

751 Views
eckhard
Contributor V
Hello,
 
have you read this ?
 
you can download the code too at the product page.
 
Eckhard
0 Kudos
Reply

751 Views
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 Kudos
Reply

751 Views
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 Kudos
Reply

751 Views
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 Kudos
Reply