embello

Embedded software from JeeLabs

Embello Home Page
Hardware Documentation
Forth Library Documentation

ADC interface

This interfaces to the built-in 1 Msps 12-bit ADC of the STM32F4xx ┬ÁC.

API

: adc-init ( -- )  \ initialise ADC
: adc-calib ( -- )  \ not needed on F4, retained for compatibility
: adc ( pin -- u )  \ read ADC value
: adc-once ( -- u )  \ read ADC value once
: adc-vcc ( -- mv )  \ return estimated Vcc, based on 1.2V internal bandgap

Examples

adc-init
adc .
adc-vcc .