3 Source Code Overview
One application with four use cases has been developed and tested on the ATtiny817 Xplained Pro board. Here are the general system configurations which are common for all four use cases:
- CPU clock: 3.33 MHz
- Peripherals used:
- ADC, VREF, and USART
- Details of the peripheral
configurations:
- ADC
- Resolution at 10 bits
- Input channel is AIN 6: pin PA6
- VREF set to 2.5V
- USART
- TXEN: Transmission Enable is set
- Baud Rate: 9600
- GPIO output pin PB4: LED0
- ADC
The projects available in Atmel START generate peripheral driver functions
and files, as well as a ‘main()
’ function that initializes all
drivers.
- Driver header and source files are in the src and include folder.
- In the
atmel_start.c
file, ‘atmel_start_init()
’ initializes MCU, drivers, and middleware in the project.
In the following section, the macro configurations used in
main.c
file and the source code for the four cases application will
be explained.