circuit to control nRF24l01 CSN

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)

CSN.png

This is exactly what a monostable chip is for. There are a few in the 7400 series. 74xx122, 74xx123 for instance.

Or possibly a 555 ?

http://en.wikipedia.org/wiki/555_timer_IC#Monostable

Perhaps in a CMOS version?

MarkT: This is exactly what a monostable chip is for. There are a few in the 7400 series. 74xx122, 74xx123 for instance.

Yes, but that doesn't seem any simpler, and it's more expensive. After some more thought I've come up with a circuit using a diode, capacitor and resistor that I'm going to try.

If you may be making a number of these and get your circuit working, you should think about component tolerances -- capacitors can have quite a wide tolerance -- to ensure that the design is robust.

That could save you a headache in the future!