Lecture 17 - Logic Interfacing

We talk about why EE307 (semiconductors) is important for us.

Interfacing

We've been treating 0's and 1's as lows and high voltage. But the low and high are dependent on characteristics we want to control (namely VH).

For instance, VH has changed from 5V to 3.3V to 2.5V. Usually on-chip stuff is either 1V or is adjustable to be lower. We also have to consider current sinks and sources. There's CMOS vs. BJT:

For a microcontroller we need the help of external circuits to control voltage and current.

Transistor Basics

See EEO306 notes, from last quarter. So EE 306 PN Junctions Equation Sheet Fall 2023 and whatnot.

Overall, BJTs are better for amplifiers (due to their current draws), and MOS for lower power (since we can shrink them). BJTs are controlled by current, while MOS is via voltage.

Current on the STM32

We can only drive 20mA per IO pin. See Table 21 in the [[rm0351-stm32l47xxx-stm32l48xxx-stm32l49xxx-and-stm32l4axxx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf]]. But we can use a BJT to take this 20mA and amplify it (with a β=100) to make it 2A if needed.

One thing too, to drive an inductive load, is to use a fly-back diode. When we send current through a coil (perhaps for a motor) and cut the power, the electric field goes reverse to the slowdown of the magnetic field. We're usually not cool with that, so if you put a diode reverse of the direction of current you want in the load, and is rated at the current of your load, then that's fix issues of power rebooting or other issues of reverse current.