programming SPI

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
3,003件の閲覧回数
rockillos
Contributor I

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.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
1,423件の閲覧回数
bigmac
Specialist III

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

 

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
1,423件の閲覧回数
stanish
NXP Employee
NXP Employee

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

0 件の賞賛
返信
1,423件の閲覧回数
rockillos
Contributor I
Ok, they are not ProcessExpert examples but I will use them. Thank you
0 件の賞賛
返信
1,424件の閲覧回数
bigmac
Specialist III

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

 

0 件の賞賛
返信