On Fri, 08 Feb 2013 12:52:55 +0000, Simon Clubley wrote:
> On 2013-02-07, Mark Borgerson <
mborg...@comcast.net> wrote:
>>
>> Why are you worried about bi-directional shifters? IIRC, MISO always
>> goes in just one direction. Depending on your SPI speed requirements,
>> you might be able to protect the MISO input in one of two ways:
>>
>>
> I will be using a level shifter to down shift the other SPI lines from
> the 5V MCU to the 3.3V SPI devices. As the level shifter is not
> bi-directional, I cannot use a spare channel on the same device to level
> shift MISO in the other direction.
>
> MISO does always go in one direction; from the SPI slave to the SPI
> master. My goal here is to protect against my dropping 5V onto the line
> in the other direction (ie: _from_ the MCU) because I configured the MCU
> for output by mistake. I also wanted to do it without having to use
> another 16 pin level shifter.
Put something like a SN74AHCT1G08 between the uC and the SPI. It will
run at 5V and level shift the SPI to the uC. The SPI device will
normally tri-state the MISO line if it's not active so you could put
a pull-up to 3V3 on the input side and that would assure a +5 output
back to the uC. So if the uC did drive the pin you should be OK.
You could also put a resistor between the uC and the buffer
output to limit any current that might be driven back into the
'1G08 output pin
You can get these little logic guys in SOT-23, sc-70 and SOT-553
>
>> 1. a serial resistor to limit currents to/from MISO. This will affect
>> rise time on the signal dependent on the input capacitance of the
>> buffer.
>>
>> 2. Use another pin to enable the output of the buffer driving MISO.
>> A transient output on MPU MISO that is not accompanied by an
>> appropriate level on the enable line will cause no harm.
>>
>>
> Thanks.
>
> In the circuits I have seen, the 3.3V slave MISO is directly connected
> into the 5v master. Given enough tolerance on what is seen as logic 1 on
> the MCU input, that works just fine if the code works perfectly.
>
> However, it just felt "unsafe" if the code was wrong, hence my posting.
>
> Simon.
--
Chisolm
Republic of Texas