4.3 ADC (PB7)

The ADC input pin is a dedicated pin where the analog signal can be provided as an input to the RNBD350 module. The RNBD350 module does the ADC conversion using a fixed reference and provides the digital value that can be read using the Read ADC input voltage (@,4) command. Prior to initiating the Read ADC input voltage (@,4) command, the user must configure the factors of voltage detection using the Set ADC Reference Factor (S@,<hex16>,<hex8>) command. The factors are used to get the actual ADC voltage. This command expects the reference voltage and bias voltage percentages as input parameters. For more details, refer to Read ADC Input Voltage or Query Battery Voltage and Set ADC Reference Factors or Set Battery Voltage Factors.

The first step is to supply the analog signal to the PB7 pin, then the Set ADC Reference Factors (S@,<hex16>,<hex8>) command sets the reference voltage and bias voltage percentage. Use the Read ADC (@,4) command to read the voltage.