Fujitsu SK-AMAPOLLO-BASE-V11 Manual do utilizador - Página 21
Procurar online ou descarregar pdf Manual do utilizador para Placa-mãe Fujitsu SK-AMAPOLLO-BASE-V11. Fujitsu SK-AMAPOLLO-BASE-V11 46 páginas. Ambiq micro apollo 1 / 2 evaluation board
2.7.2 Using ADC
Digital IOs are available as A0...5.
The Naming is: ARDUINO_A<n>
Start with the FEEU MCU Temlate for Apollo 1 or Apollo 2. Enable GPIO FEEU Low-Level-
Driver for Apollo in RTE_Device.h (in example\source\config):
#define APOLLOADC_ENABLED 1
#define APOLLOGPIO_ENABLED 1
Add apollogpio.c and apolloadc.c to your project and include apolloadc.h and
skamapollobase.h in you C-file. Following code gives an example how to poll the ADC:
#include "mcu.h"
#include "skamapollobase.h"
#include "apolloadc.h"
int main(void)
{
float32_t f32AdcValue = 0.0f;
while(1)
{
f32AdcValue = ApolloAdc_SimpleReadByPin(ARDUINO_A0);
}
}
© Fujitsu Electronics Europe GmbH
FEEU Ultra-Low-Power Apollo Evaluation Kit Platform
Chapter 2 Using the Hardware
- 21 -
EEU-UG-2017120001-10