I am planning to control a IC (CD74HCT299E). I have currently GPIO-pins directly hooked up to the IC. My Question is, does the Raspberry pi have resistors before the GPIO-pin, or do I have to or should I add my own resistor between the chip and the GPIO-pin. (If anyone is interested, I'm using this programm to try to read the chip: Github CD74HCT299)

2 Answers 2


Your question is a bit unclear as you don't say whether you're using the GPIO as 1) input, 2) output, or 3) both. Your options will depend upon your usage - i.e. 1), 2) or 3).

First Recommendation:

Replace the CD74HCT299E with a CD74HC299E (note the missing T). The CD74HC299E has a Supply Voltage Range (VCC) from 2V to 6V. Therefore it will interface directly with the RPi GPIO pins at 3.3V without need for voltage dividers or level shifters. See this data sheet for further details on your *299 shift register.

This recommendation will cover all cases: 1), 2) & 3).

Other Recommendations:

If for some reason you are wedded to the 4.5V-5.5V part - CD74HCT299E, and your usage case is 1) ONLY (GPIO as input), then a resistive voltage divider should work. Note this IS NOT a single series resistor as implied in your question, but a voltage divider.

If your usage case is 2) ONLY (GPIO as output), you should add a level shifter (some examples sourced by Adafruit and TI) to get the GPIO outputs up to 4.5V.

The T in the part number indicates this part was built (and presumably guaranteed) to meet TTL levels which would probably cover the RPi's GPIO specs for high and low. However, the RPi is not a TTL device, and I believe a level shifter will improve the reliability across this interface.

Note also that in general level shifters may be uni-directional or bi-directional. Using a bi-directional shifter will cover use cases 1) AND 2).

If you need help sizing the resistors for the voltage divider, please let us know.

  • There is a Line in the Documentation for the HCT variation saying: V_IH = 2V Commented Jun 2, 2020 at 17:59
  • Whelp, just build a couple level uni-directional level shifters, and everything is working as expected. Thanks Commented Jun 2, 2020 at 19:12
  • @C0D3M4513R: Re V_IH - I stand corrected! I'll edit my answer. But I'll stick by my recommendation. The T in the part number was used for an entire class of CMOS devices that were developed to be compatible with TTL logic. Happy to hear you got it working.
    – Seamus
    Commented Jun 2, 2020 at 19:43

The HCT variants are 4.5-6V. They may not be controllable from the Pi's 3V3 GPIO.

You don't need in-line resistors between the chip pins and the Pi pins.

However if the chip is being driven from more than 3V3 you will need to construct a voltage divider between the chip's output pin and the corresponding Pi input GPIO (to drop the voltage to a Pi safe 3V3).

  • In the Documentation of that chip is stated, that a pin is considered high, if V>2. So 3V3 shouldn't be a problem, right? Commented Jun 1, 2020 at 13:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.