- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all, i have been working in a custom component, it's to drive the nRF24 wireless transceiver from Nordic Semi. I have done some of the basic functions with it.
I attach the project i did for testing it (both based on the 059 board), it basically send packets from the Tx side to the Rx, while the Rx ACKs each packet with another packet.
Tx Packet consist on a count of presses on the onboard switch, a counter for the number of times the packet has been sent and the rest is a read of a ADC input.
Rx Packet is just the count of presses on the onboard switch, a counter for the number of times the packet has been sent.
You can find the same project (up to date) in this Github repository: https://github.com/C47D/PSoC_nRF24_CustomComponent
I would like to know if you find it useful, and some feedback on the implementation.
Carlos
PD: Now i'm working on the same component based on the SCB blocks on PSoC 4.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's the symbol and schematic implementation (i have not been able to figure out how to control both SS and CE pins with one Control Reg, i mean is easy but the CE pin must be high all the time on the Rx side or just pulses 15ms wide if it's Tx side).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately I do not have nRF24 now to test the component module.
I also tried to make friends with nRF24. It's here(Russian).
Perhaps you would be interested.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi pavloven,
Thanks for the link, i will check your implementation and see if i forgot to add something to mine.
This component is still under development, so any feedback will be very welcome 😄
Carlos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it really necessary -- to read register via writing 0xFF to SPI?
Is writing 0xFF to SPI does reading from slave to receive buffer?
Why Pavloven's psoc4 (scb spi) implementation works without that, just reading from SPI?
I have to dig into SPI component, how it behaves when reading slave with empty transmit buffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
To read the content of the nRF24 registers you need to send the command+register_address, and then a (dummy) byte to get the information from the chosen register. So the second byte can be 0xFF, or 0x20, or whatever 8bit number you want.
It has been like two months that i do not work on improving the component, i almost forgot everything about the nRF24 chip.
Will check pavloven implementation again next weekend.
Carlos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
payload reading is performed by separate SPI command, not by register. and while you read data, you are sending data via spi.
it's a little complicated from my point of view: payload data is stored into software (component local) buffer, then it is copied to the user's buffer.
what if to add OR gate on a MOSI line with a bit from control register? then it will be possible to read payload data directly, and to configure SPI to use less FIFO buffers (say, 4 instead of 32), which are in hardware. it may lead to more compact implementation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, but this is the definition of the SPI protocol. For every bit you send you get a bit back, just within the same clock cycle. That is the reason why SPI could be made so fast.
Of course you may build your own communication component that is "alike" SPI and maybe it is a bit (or even a byte 😉 faster.
Bob