PaxInstruments / PaxInstruments-LabWiz-firmware

Firmware for the Pax Instruments LabWiz board.
0 stars 1 forks source link

VBAT_DIV2 #11

Closed charlespax closed 8 years ago

charlespax commented 8 years ago

How should PB0 be configured? It is connected to the BL-5C battery to measure battery voltage. Should it be GPIO_Analog or ADC1_IN8, or other value? screen shot 2016-08-14 at 21 52 23

charlespax commented 8 years ago

Should be ADC. I have removed the voltage divider circuit in favor of a series diode to drop the voltage a bit.

The term "GPIO_Analog" is a bit confusing. In the STM32 there is a Schmitt trigger on each GPIO pin. This gives a more digital input as the internal signal will be stable at either HIGH or LOW. "GPIO_Analog" will disable the Schmitt trigger and allow the signal directly on the pin to be input into the microcontroller. This saves a little power.