I want to control an nrf24l01 with 3 pins rather than the usual 5. The chip is controlled with CE, CSN, SCK, MOSI & MISO. I’m using the Mirf library, and it works fine when I tie CE high, and set Mirf.cePin = 7 (dummy pin on a Tiny85). CSN needs to be low during commands, but if I tie it low, and just use SCK, MOSI, & MISO it doesn’t work. No surprise since the datasheet section 8.3.1 states: Every new command must be started by a high to low transition on CSN.
So far what I’ve come up with is the attached circuit. The idea is when DO is idle (low), the transistor will be off and CSN will be pulled high. Before sending any commands, I’ll set DO high for a few microseconds to charge the capacitor, which will turn on the transistor and pull CSN low during the communication with the nrf. My “problem” is that I think there should be a simpler solution, but haven’t found it.
Any better ideas? (besides tossing the Tiny85’s and getting something with more pins)