On this page
Logic Levels and Interface Physical Layers
Why Logic Levels Are Needed
When two chips communicate, they must agree on: What voltage counts as "1"? What counts as "0"? What is the drive capability? What is the noise margin? Mismatches lead to communication failures or even chip damage.
Single-Ended Signals
TTL (Transistor-Transistor Logic)
The oldest standard (74 series)
Vcc: 5V ± 10%
VOH > 2.4V, VOL < 0.4V
VIH > 2.0V, VIL < 0.8V
Noise margin is approx. 0.4V (small!)
Output drive: Weak sourcing (~0.4mA), Strong sinking (~16mA)
Being replaced by CMOS, but 3.3V is still common
CMOS (Complementary Metal-Oxide-Semiconductor)
Modern mainstream logic levels
Vcc = 5V:
VOH > Vcc-0.1V, VOL < 0.1V (Almost rail-to-rail!)
VIH > 0.7×Vcc, VIL < 0.3×Vcc
Vcc = 3.3V:
VIH > 2.0V, VIL < 0.8V
Vcc = 1.8V:
VIH > 0.65×Vcc, VIL < 0.35×Vcc
Large noise margin → Good interference immunity
Extremely low static power consumption (only consumes power during switching)
Note: 3.3V CMOS output can drive 5V TTL input (VIH=2.0V)
But 5V output cannot be directly connected to 3.3V CMOS input (may cause damage or latch-up)
Differential Signals
Why Differential
LVDS (Low Voltage Differential Signaling)
Swing: ~350mV (differential)
Common-mode voltage: ~1.2V
Speed: Hundreds of Mbps to several Gbps
Termination: 100Ω differential termination resistor
Power consumption: Extremely low (constant current drive ~3.5mA)
Applications: Displays (FPD-Link), Cameras (MIPI D-PHY), Backplanes
RS-232 — Classic Serial Port
Single-ended, Full-duplex
Logic: 1 = -3~-15V, 0 = +3~+15V
(Note: Negative voltage is Logic 1!)
Drive capability: Long-line drive (~15m)
High voltage, large noise margin, but slow speed (≤115.2kbps)
Level Shifter: MAX232 (TTL ↔ RS-232)
DB9 Pins:
Pin2: RXD (Receive)
Pin3: TXD (Transmit)
Pin5: GND
RS-485 — Mainstay of Industrial Communication
Differential, Half-duplex or Full-duplex
Swing: > 1.5V (differential)
Common-mode range: -7V ~ +12V (Large! Tolerates ground potential differences)
Distance: Up to 1200m (at low speeds)
Speed: Up to ~50Mbps (short distances)
Multi-point: 32~256 nodes can be connected on one bus
Termination: 120Ω differential termination resistor (one at each end)
Applications: MODBUS, PROFIBUS, DMX512
Chips: MAX485, SN75176
CAN Bus
Differential, Multi-master, Priority Arbitration
Dominant (0): CANH-CANL > 0.9V
Recessive (1): CANH-CANL ≈ 0V
Speed: Up to 1Mbps (CAN FD up to 8Mbps)
Fault Tolerance: Extremely strong (Error detection + Auto-retransmission + Fault isolation)
Termination: 120Ω at each end
Applications: Automotive (OBD-II), Industrial Control, Robotics
Open-Drain / Open-Collector
Vpullup
│
Rpullup
│
Internal ├── SDA/Signal Line
┌────┐ │
│ │───┐ │
│ GPIO│ NMOS │
│ │───┘ │
└────┘ │
GND
NMOS ON → Pulls Low (Strong drive capability)
NMOS OFF → Pulled High by Pull-up Resistor (Weak drive capability)
Applications:
- I2C (Multi-master shared bus)
- Wire-AND: Multiple open-drain outputs can be directly connected; if any pulls the bus low, it is low
- Level Shifting: Changing Vpullup changes the output high level
Level Shifting
Scenarios
3.3V MCU connecting to 5V Peripheral — Most Common!
1.8V Sensor connecting to 3.3V MCU
Solutions
1. Resistor Voltage Divider (Step-down only): 3.3→1.8, 5→3.3
──┤├───┬── Simple but weak pull-up, slow speed
├── Signal
──┤├───┘
2. Dedicated Level Shifter Chips:
TXB0104 (Auto-direction, Low Speed)
TXS0108E (Auto-direction, Open-Drain Compatible)
SN74LVC1T45 (Direction Control, High Speed)
3. MOSFET Solution (Bi-directional, Low Speed):
VCC_LOW VCC_HIGH
│ │
Rp Rp
│ │
LOW ─────┤ S D ├── HIGH
│ ──┬── │
│ │G │
│ │ │
GND GND GND
Quick Reference for Common Levels
| Standard | Diff/Single | Swing | Max Speed | Distance | Application |
|---|---|---|---|---|---|
| TTL 5V | Single-Ended | 0~5V | ~50MHz | PCB | Traditional Digital |
| CMOS 3.3V | Single-Ended | 0~3.3V | ~100MHz | PCB | Mainstream Digital |
| CMOS 1.8V | Single-Ended | 0~1.8V | ~200MHz | PCB | Low Power |
| LVDS | Differential | ±350mV | Gbps | ~10m | Display/High Speed |
| RS-232 | Single-Ended | ±12V | 115kbps | 15m | Debug Serial |
| RS-485 | Differential | >1.5V | 50Mbps | 1200m | Industrial |
| CAN | Differential | >0.9V | 8Mbps | ~1km | Automotive |
| USB 2.0 | Differential | ±400mV | 480Mbps | 5m | PC Peripherals |
Keywords: TTL, CMOS, LVDS, Differential Signals, Open-Drain, RS-232, RS-485, CAN, Level Shifting