4 Assignment 2: RTC Interrupts Triggers ADC and USART Print

In this assignment, the Real Time Counter (RTC) module will be used. The RTC overflow interrupt will be used to trigger an ADC conversion every half second. ADC Result Ready (RESRDY) interrupt will trigger a print of the ADC result to the USART terminal. When RTC overflow interrupt is not triggered, the device is kept in Sleep Standby mode in order to reduce the power consumption.

Atmel | START will be used to add the RTC module and to configure the RTC, ADC, CPUINIT, and SLEEPCTRL drivers. An Atmel Studio project will be regenerated afterward.

Peripherals used:
  • RTC
  • ADC (reconfigured from previous assignment)
  • USART (from previous assignment)
  • CPUINIT
  • SLPCTRL
Clock details:
  • CPU and USART - 5 MHz
  • ADC - 625 KHz (5 MHz/8)
  • RTC - 1 KHz