« first day (12 days earlier)      last day (50 days later) » 

8:44 AM
Good. My first thought was to start with single SPI bus, to make it more newbie friendly. On second thought I would start with multiple SPI buses. Now I have soldered a dual nRF24 module board, and open/short tests are OK. Next step is to try to ping the modules.
 
 
1 hour later…
9:59 AM
Now I am tidying up my old SPI signal routing lego board to test the two nRF24 modules.
 
10:27 AM
Now I looking at the nRF24 library more closely, version 0.5 of nRF24 learning notes: penzu.com/public/09bf5314. There are a couple of reasons: I hope to: (1) Modify the big library to make a smaller and simplified version, for easy troubleshooting, (2) Modify some basic functions to make them more newbie friendly.
(3) Modify some special functions such as SPI, send/receive functions to make them more flexible for future applications. Now I need to first read the datasheet to understand how to read the nRF24 registers, how to config, initialize etc.
 
 
1 hour later…
11:28 AM
Now I am reading the nRF24 Library's SPI setup method and found a big problem: SPI1 is NOT supported, module B is also NOT supported. I forgot what is the difference of SPI between Model A and Model B, but I will definitely be using Rpi4B (and perhaps also Rpi3B+ later. I remember the library is using a spidev compiled in its setup procedure. Since the library is NO longer supported by the author.
So I feel uncomfortable to use this old SPI method for Rpi Model A only, with the old complied spidev. My decision is to use Rpi4B buster (2019sep26 release)'s preinstalled SpiDev, which has many more (six, to be precise) SPI channels (or buses, I forgot which term I should use :))
 
11:44 AM
Rpi4B's six SPI channels is too messy, and too easy to go wrong. So I think I better be humble and use only two of the six, ie, SPI0, SPI1. And with three CS pins, I can control 5 nRF24 modules. I will also be using python's "list" and "dictionary" data structure. So it should be "easy" to later to scale up to all six SPI channels.
 
 
3 hours later…
2:23 PM
Now I am trying to build a minimal nrf24 library which consists of the very basic functions: (1) SPI setup, (2) nrf24 module configuration, (3) nrf24 register read write functions. With the above three basic functions, I can then config, and perform the nrf24 functions.
I am now do the top down design of the using the big library as a blueprint. The startup sections are in the top part of the following file: penzu.com/p/772fa292. Next step is reading the datasheet a couple of times and modify the template functions for nrf24.
First thing first is to read the block diagram of the nrf24 module.
Then a brief description.
Then a state diagram.
The state diagram show TX mode and Rx mode. So I think I need to get a rough picture of what is TX and Rx modes.
Then we need to check out the register map to see which registers to config, which to give commands etc. I think I should start with the config register, never mind other not so important registers.
Then we need to read the command set to know how to load a message, how to send, how to receive etc etc.
It is indeed very messy. Bed time. So I will call it a day. See you tomorrow.
 
3:42 PM
Whoa man, indeed this is a mess
I am so grateful for everything you are doing!!
I lost it when you started talking about the block diagram etc haha
I don't know how you're doing all this but thank you so much in advance! :)
 

« first day (12 days earlier)      last day (50 days later) »