Register-level STM32L051 C firmware that combines an Ohmmeter, a capacitance meter, and a continuity probe.
- Register-Level Bring-Up: Configured GPIO modes, output types, pull-ups, analog input, ADC clocking, calibration, auto-off mode, and long ADC sample time directly through STM32L051 peripheral registers.
- Continuity Detection: Used a weak internal pull-up on PB6 so a grounded probe pulls the input low, then drove PB5 for buzzer/LED feedback; the continuity check runs continuously, including inside measurement wait loops.
- Resistance Measurement: Sampled the PB1 analog divider with the 12-bit ADC, calculated unknown resistance against a 330 ohm reference, detected open-circuit readings near full scale, and supported ohm/kohm display modes.
- Frequency-Based C/L Measurement: Timed 10 oscillator cycles with SysTick edge polling, computed capacitance from a calibrated 555 timer equation, and computed inductance from LC resonance using measured stray-capacitance compensation.
- User-Facing Firmware: Built the 4-bit LCD driver, formatted R/C/L readings into fixed-width rows, and handled pull-up button inputs for resistance, capacitance, and inductance display modes.