- Sat Oct 28, 2006 9:05 am
#21107
I have a question regarding interfacing PICs to the nRF24L01 -- specifically in a situation where the PIC is operating at 5 volts and the nRF24L01, of course, is operating at 3.3 volts. While I understand that the nRF's inputs are 5-volt-tolerant so that accepting inputs from the PIC is not a problem, my question deals with the reverse case; that is, when an nRF output is attempting to drive a PIC input.
The nRF datasheet notes that the output voltage for any output is at least Vdd-0.3v and no greater than Vdd. Since Vdd cannot be greater than 3.6 volts, no output can source a signal greater than 3.6 volts, and would likely output less than this since Vdd is probably closer to 3.3 volts and the output can be less than maximum. However, every PIC datasheet I've examined states that the minimum high input voltage (Vih) is 0.8 Vdd for inputs with Schmitt-trigger buffers. (Inputs such as SPI In and INT all utilize Schmitt-trigger buffers.) Since Vdd for the PIC is nominally 5 volts, that means that the minimum Vih is 4 volts, which is greater than the maximum output of the nRF.
I have built a couple of test circuits with 5-volt PICs and 3.3-volt nRFs, and these specific implementations work; however, I'm leery of actually going to production with such an arrangement knowing that the "official" specifications say it won't work. In the planned production device, space and power consumption must be kept to an absolute minimum, so additional circuitry to level-shift these signals is not attractive.
Even so, I've looked at a number of schemes for "simple" level shifting. One simple expedient would appear to be use pull-up resistors on the PIC inputs (or built-in weak pull-ups if available), but I'm hesitant to take this approach since the nRF datasheet is silent on the issue of imposing a higher-than-Vdd voltage on the outputs. Since no information is provided regarding the actual structure of the outputs, I can't assess whether over-voltage would cause harm. I've also read the Phillips Application Note AN97055 presenting MOSFET-based level shifting, but using that approach would require extra parts and current as well as requiring a slower SPI speed. Bipolar or MOSFET transistors could also be used in more conventional ways, but again with parts, space, and power costs.
So... I'm wondering if I've misinterpreted the specs in some way that makes this seem like a problem when it actually is not, or if others out there have any helpful advice to mitigate the issue. Any insight would be greatly appreciated.
Thanks much.
The nRF datasheet notes that the output voltage for any output is at least Vdd-0.3v and no greater than Vdd. Since Vdd cannot be greater than 3.6 volts, no output can source a signal greater than 3.6 volts, and would likely output less than this since Vdd is probably closer to 3.3 volts and the output can be less than maximum. However, every PIC datasheet I've examined states that the minimum high input voltage (Vih) is 0.8 Vdd for inputs with Schmitt-trigger buffers. (Inputs such as SPI In and INT all utilize Schmitt-trigger buffers.) Since Vdd for the PIC is nominally 5 volts, that means that the minimum Vih is 4 volts, which is greater than the maximum output of the nRF.
I have built a couple of test circuits with 5-volt PICs and 3.3-volt nRFs, and these specific implementations work; however, I'm leery of actually going to production with such an arrangement knowing that the "official" specifications say it won't work. In the planned production device, space and power consumption must be kept to an absolute minimum, so additional circuitry to level-shift these signals is not attractive.
Even so, I've looked at a number of schemes for "simple" level shifting. One simple expedient would appear to be use pull-up resistors on the PIC inputs (or built-in weak pull-ups if available), but I'm hesitant to take this approach since the nRF datasheet is silent on the issue of imposing a higher-than-Vdd voltage on the outputs. Since no information is provided regarding the actual structure of the outputs, I can't assess whether over-voltage would cause harm. I've also read the Phillips Application Note AN97055 presenting MOSFET-based level shifting, but using that approach would require extra parts and current as well as requiring a slower SPI speed. Bipolar or MOSFET transistors could also be used in more conventional ways, but again with parts, space, and power costs.
So... I'm wondering if I've misinterpreted the specs in some way that makes this seem like a problem when it actually is not, or if others out there have any helpful advice to mitigate the issue. Any insight would be greatly appreciated.
Thanks much.