Logic Level Interfacing
Connecting different logic families and voltage domains - level shifting, fan-out, open-collector, and pull-ups.
Modern systems often mix different voltage levels - a 3.3V microcontroller talking to a 5V sensor, or a 1.8V FPGA driving 3.3V logic. Proper interfacing prevents damage to components and ensures reliable communication. This topic covers the techniques and circuits used to bridge different logic families and voltage domains.
Objectives
- Calculate fan-out for different logic family combinations
- Design pull-up resistor circuits with proper resistance values
- Understand open-collector/open-drain outputs and wired-AND logic
- Implement level shifting using resistor dividers, MOSFETs, and dedicated ICs
- Identify when bidirectional level shifting is needed
- Safely interface 5V and 3.3V systems
Key Takeaways
- Fan-out limits how many inputs one output can drive - exceed it and signals degrade
- Open-collector/drain outputs need pull-up resistors and enable wired-AND connections
- Tri-state outputs allow bus sharing but only one driver should be active at a time
- Resistor dividers work for unidirectional high-to-low shifting only
- MOSFET level shifters (BSS138) provide bidirectional shifting for I²C and similar
- Pull-up/pull-down resistors establish default states: lower R = faster but more power
- 74HCT is the simplest way to interface 3.3V CMOS to 5V systems
Applications
- Arduino + Sensors: 5V Arduino interfacing with 3.3V sensors and displays.
- I²C Bus: Open-drain with pull-ups enables multi-device communication.
- Multi-Voltage PCB Design: Modern boards often have 1.8V, 2.5V, 3.3V, and 5V domains.
- FPGA I/O: FPGAs use low voltages internally but must interface with higher-voltage peripherals.
Practice Problems
Problem 1: Design a voltage divider to convert a 5V signal to 3.3V. If R2 = 10kΩ, what should R1 be?
Problem 2: An open-drain output sinks up to 8 mA. The pull-up goes to 3.3V and V_OL = 0.4V. What is the minimum pull-up resistance?
Problem 3: Why can't you connect two tri-state outputs to the same bus with both enabled?
Problem 4: An I²C bus operates at 3.3V with 4 devices, each with 10pF input capacitance. The bus wiring adds 20pF. If you need 400 kHz operation, what pull-up resistance should you use?
Problem 5: Can a 3.3V CMOS output drive a 74HCT input directly? Explain.