- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Friends,
I've CY8CKIT-042 Pioneer Kit, I tried to interface RFID Reader RC522 via SPI.
In this, I need to configure my PSoC 4 as an SPI Master Receiver, I tried by modifying the demo example code, SCB_SpiCommMaster, but I didn't succeed.
Can anyone help by giving me a way where I can get a video or demo example code for PSoC 4 as an SPI Master Receiver?
Chinmay
Solved! Go to Solution.
- Labels:
-
ispn:39611:1:0
-
l1:314:1:0
- Tags:
- spi master receiver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think the code example is the proper one for you, but you need to find another SPI master code example, please follows the below steps.
1) Open your 'PSoC Creator' (I am using 4.2 version)
2) Click 'File' -> 'Code Example'
3) Search 'SPI' as shown in the attached below image.
Thank you,
Teddy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I think the code example is the proper one for you, but you need to find another SPI master code example, please follows the below steps.
1) Open your 'PSoC Creator' (I am using 4.2 version)
2) Click 'File' -> 'Code Example'
3) Search 'SPI' as shown in the attached below image.
Thank you,
Teddy.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Teddyy,
Thanks! Your sugestion works
But, still I didn't get correct value of Slave data, always I got 0x000000FF or dummy byte sent to receive data from salve.
One more thing I surprised is that, if I connect SalveSel pin and map it appropriately, then I didn't receive any byte on MISO, but If I select Slave Device = 0, then only this works.
FYI: I've connected RC522 (RFID Reader) via SPI, as I move RFID tag close to reader, I either receive 0x000000FF or dummy byte I sent!
I used UART to display byte I received from slave.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi chsh_4442971
Please share the project and the pin connection details so that we can reproduce the issue that you are facing.
Also can you please explain this statement 'If I select Slave Device = 0, then only this works'.
Thanks and Regards,
Rakshith M B
Rakshith M B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rakshith,
If I configure Slave Device = 00, then only I get the response byte (of course false byte!).
If I configure Slave Select pin = 1 and then map it to the appropriate line, then nothing I received as a response byte.
But, I need to study the query-response cycle of RC522 that I need to interface with PSoC 4.
Let me give some time, I'll further update you if I shall face the issue again.
Thanks for the support!
-Chinmay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi chsh_4442971
Sure, let us know if you need any help. You can also refer to these threads on RC522 which might help you with your issue -
https://community.cypress.com/thread/34607
https://community.cypress.com/thread/29840
Regards,
Rakshith M B
Rakshith M B