hello,
At first I apologize for my bad English. I am new programming microcontrollers and I have a problem. I must program the SPI communication for a slave using CodeWarrior and ProcessExpert. I have the configuration of the I/O ports and the source code automatically built by ProcessExpert, but now I need to complete the source code: events.c, main.c, ... Could anybody pass an example to me? I can not find one in Internet.
Thank you very much.
已解决! 转到解答。
Hello,
The examples referenced are rather simplistic, and cover one-way data transfer from master to slave only. They will not be particularly useful if you require that data be returned from slave back to master.
I suggest that you outline what you require to achieve with the SPI link. How is the SPI master implemented? The operation of the slave end will need to be compatible with the setup of the master (or vice versa).
Regards,
Mac
Hello rockillos,
there are some Processor Expert examples (including SPI) available within CodeWarrior Example directory.
(e.g. "<CodeWarrior for Microcontrollers V6.x>\(CodeWarrior_Examples)\HCS08\Device Initialization C Examples\GB60_Modules\Sources\SPI_SLAVE_GB60\main.c" )
Stanish
Hello,
The examples referenced are rather simplistic, and cover one-way data transfer from master to slave only. They will not be particularly useful if you require that data be returned from slave back to master.
I suggest that you outline what you require to achieve with the SPI link. How is the SPI master implemented? The operation of the slave end will need to be compatible with the setup of the master (or vice versa).
Regards,
Mac