Tag
mcu
5 articles.
- Crystal, oscillator or ceramic resonator: which clock?
A crystal is ±120 ppm over ten years, a ceramic resonator ±1.1 %, an RC oscillator ±2 %, and each is right for something. What UART, USB and a radio need.
- Level shifters: one MOSFET per line, or a translator IC
A 3.3 V device and a 5 V device can share a line safely. For open-drain buses one MOSFET per line does it, with no direction pin: AN10441's circuit.
- SPI vs I2C: which is faster, and why the answer is both
SPI is faster because nothing caps its clock and it spends 8 clocks per byte; I2C spends 9 and stops at 3.4 Mbit/s. Four reasons the choice is not about speed.
- Pull-up vs pull-down resistors: which one, and what value
Which direction, and what value: top set by leakage and bottom by the driver's sink current, 1.8 kΩ to 727 kΩ in TI's case, which is why 10 kΩ works.
- Switch debounce: the RC, the Schmitt trigger and the numbers
A switch bounces up to 10 ms; logic answers in nanoseconds. Würth's RC and a Schmitt input fix it, but the 1 µF crosses the SN74HC14's threshold mid-bounce.