Guillaumeb28
New member
Hi,
I need to connect multiple devices than run at 5V to a Teensy 4.1 through an SPI bus (slave devices) but I encountered some problems with level shifting.
I use an SN74AHCT1G125 to shift the CLK line from 3,3V to 5V and an SN74LVC1G125 to shift the DATA line from 5V to 3,3V.
SN74AHCT1G125 : https://www.ti.com/lit/ds/symlink/sn74ahct1g125.pdf
SN74LVC1G125 : https://www.ti.com/lit/ds/symlink/sn74lvc1g125.pdf
On the SN74AHCT1G125, my wiring is the following :
OE grounded
A (in) connected to the Teensy CLK pin
Y (out) connected to device CLK pin
VCC connected to a 5VDC voltage source, also used to power the device.
On the SN74LVC1G125 :
OE grounded
A (in) connected to the device DATA pin
Y (out) connected to the Teensy DATA pin
VCC connected to 3,3V Teensy pin.
The SPI interface doesn't work.
I ran some basic test :
- When I set the CLK pin high or low, the output on the Y pin of the 74AHCT is correct (high 5V/low).
- But when I connect the 5V source directly to the A pin of the 74LVC, the output on the Y pin is not at 3,3V.
However, according to the datasheet of the 74LVC, when OE is low and A is high, Y should be HIGH.
Is there anything that I am missing in my wiring ? Does anyone already used this setup ?
Thanks !
I need to connect multiple devices than run at 5V to a Teensy 4.1 through an SPI bus (slave devices) but I encountered some problems with level shifting.
I use an SN74AHCT1G125 to shift the CLK line from 3,3V to 5V and an SN74LVC1G125 to shift the DATA line from 5V to 3,3V.
SN74AHCT1G125 : https://www.ti.com/lit/ds/symlink/sn74ahct1g125.pdf
SN74LVC1G125 : https://www.ti.com/lit/ds/symlink/sn74lvc1g125.pdf
On the SN74AHCT1G125, my wiring is the following :
OE grounded
A (in) connected to the Teensy CLK pin
Y (out) connected to device CLK pin
VCC connected to a 5VDC voltage source, also used to power the device.
On the SN74LVC1G125 :
OE grounded
A (in) connected to the device DATA pin
Y (out) connected to the Teensy DATA pin
VCC connected to 3,3V Teensy pin.
The SPI interface doesn't work.
I ran some basic test :
- When I set the CLK pin high or low, the output on the Y pin of the 74AHCT is correct (high 5V/low).
- But when I connect the 5V source directly to the A pin of the 74LVC, the output on the Y pin is not at 3,3V.
However, according to the datasheet of the 74LVC, when OE is low and A is high, Y should be HIGH.
Is there anything that I am missing in my wiring ? Does anyone already used this setup ?
Thanks !
Last edited: