How i can make an SPI communication between Raspberry Pi and PSOC?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello Every One,

   

I want to make a communication between Pi and PSOC. PSoc will be my slave and I want to use Mode zero, data bits would be 16 and my shift direction would be MSB first.

   

Can any body help me in making this communication?

   

Looking forward for your reply.

   

Regards

   

Awais

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Pi is running at 5V afaik. So do not forget to set the PSoCs power supply to the same value.

   

Test your master: connect Mosi to miso on your PI and check whether you read the same that you wrote.

   

Connect PSoC additionally to MOSI and check for the answers you programmed your PSoC for at PSoC miso

   

Keep in mind: for every bit (yes, bit) the master sends, the slave will return another bit at the same time.

   

 

   

Bob

View solution in original post

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Pi is running at 5V afaik. So do not forget to set the PSoCs power supply to the same value.

   

Test your master: connect Mosi to miso on your PI and check whether you read the same that you wrote.

   

Connect PSoC additionally to MOSI and check for the answers you programmed your PSoC for at PSoC miso

   

Keep in mind: for every bit (yes, bit) the master sends, the slave will return another bit at the same time.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Is there any example program that can help me?

   

Awais

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is a PSoc Program that is written for the PSOC 4 Pioneer board and would need to be converted to the PSOC 5lp. It has  Projects pictures and a Raspberry PI program.  Enjoy.

0 Likes
Anonymous
Not applicable

Thankyou bobgoar

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here is the program converted to Psoc 5LP. I have not tried it however. But it compiles without errors.

0 Likes