I am just starting to play around with some NRF24L01 modules and I have a question regarding some of the pins.
A lot of the examples mention the CE and CNS pins on the pinout diagram - however I am unsure as to what the function of these two pins are, even after a couple of Google searches.
Could someone provide me with some search terms to use, or a location that has the information explaining what these pins are?
CSN stands for chip select not. This is the enable pin for the SPI bus, and it is active low (hence the “not” in the name). You always want to keep this pin high except when you are sending the device an SPI command or getting data on the SPI bus from the chip. When this pin goes low, the 24L01 begins listening on its SPI port for data and processes it accordingly.
SCK is the serial clock for the SPI bus. When you configure your SPI bus, SCK should stay low normally (rising edges are active), and the clock samples data in the middle of data bits.
MOSI stands for “master out, slave in,” and from both the microcontroller’s and the 24L01’s perspectives, the master is the microcontroller and the slave is the 24L01. This is because the 24L01 never sends data without first being requested by the microcontroller. Essentially, this pin is the side of the bus on which the master (the microcontroller) sends data to the slave (the 24L01). It is also connected to the MOSI pin on your microcontroller’s SPI interface.
MISO pin is like the MOSI pin, but backwards. This pin is the side of the bus on which the slave (the 24L01) sends data to the master (the microcontroller).
IRQ is the interrupt pin, and is active-low. There are three internal interrupts that can cause this pin to go low when they are active.