Getting STARTed with AVR® - Ep. 2 - Creating a New Project, Building and Testing RTC Functionality | Videos
Getting STARTed with AVR® - Ep. 2 - Creating a New Project, Building and Testing RTC Functionality
- Creating a new project for the ATtiny817 Xplained mini, either from START, or directly within studio (File _ New _ Atmel Start Project)
- In PINMUX view: configuring the user LED and Button (Named: USER_LED, USER_BUTTON)
- In the Project Dashboard: Adding and configuring the RTC, i.e. setting the clock source, prescaler and period.
- In the CLOCKS view: confirming the CPU and RTC Clock frequencies.
- How to use the question mark hoverover pop-ups next to configuration fields, in order to determine the REGISTER_NAME and BITFIELD the config field configures.
- Clicking the question mark to open the online datasheet, in order to make a decision between the RTC’s Compare Match- and Overflow-Interrupts.
- Configuring CPUINT system driver to enable global interrupts.
- Download the configured project and import into Atmel Studio 7
- Using atmel_start_pins.h to find generated functions for our configured GPIO pins, we use: USER_LED_toggle_level (), this is called in the RTC overflow ISR.
- Debug and break, demonstrating that we hit the ISR (RTC_CNT_vect)
- Remove the breakpoint and run, to demonstrate that the LED toggles every 500mS as expected.
http://start.atmel.com/