5.1 Source Code Overview
Source code overview using ATmega4809 Xplained Pro:
- CPU clock: (default) 3.33 MHz.
- Peripherals used:
- ADC, TCA, USART, VREF.
- ADC input channel is AIN 5: Pin PD5, 10-bit ADC resolution.
- TCA: PWM signal is generated on pin PA0: 62 kHz, 50% duty cycle.
- USART: TXD PC0, Baud rate: 19200, ADC result is sent to serial terminal.
- VREF selects the ADC reference voltage to 2.5V.
The project configured in Atmel START generates 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
atmel_start.c
file, the function ‘atmel_start_init()
’ initializes MCU, drivers, and middleware in the project.
Source code overview using ATtiny817 Xplained Pro:
- CPU clock: (default) 3.33 MHz.
- Peripherals used:
- ADC, TCA, USART, VREF.
- ADC input channel is AIN 5: Pin PA5, 10-bit ADC resolution.
- TCA: PWM signal is generated on pin PB0: 62 kHz, 50% duty cycle.
- USART: TXD PB2, Baud rate: 19200, ADC result is sent to the serial terminal.
- VREF selects the ADC reference voltage to 2.5V.
The project configured in Atmel START generates 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
atmel_start.c
file, the function ‘atmel_start_init()
’ initializes MCU, drivers, and middleware in the project.