This repository provides an Atmel Studio solution with a bare metal code example for an RTC implementation. This example implements a desktop clock built using the AVR-DA's RTC and an OLED Click. The clock can be set to the correct time through the use of the on-board user button connected to PC7 (on-board SW0). Long pressing (at least 1 second) SW0 will switch between seconds, minutes and hours to be changed and short pressing SW0 will increase the value of the selected time unit.
More details and code examples on the AVR128DA48 can be found at the following links:
The AVR128DA48 Curiosity Nano Development Board is used as test platform
The following configurations must be made for this project:
RTC:
TCB0:
SPI0:
OLEDC_Click:
CPUINT:
Pin | Configuration |
---|---|
PA4 (MOSI) | Digital Output |
PA5 (MISO) | Digital Input (internal pull-up disabled) |
PA6 (SCK) | Digital Output |
PA7 (OLED CS) | Digital Output |
PC7 (SW0) | Digital Input (internal pull-up enabled) |
PD0 (OLED DC) | Digital Output |
PD3 (OLED RW) | Digital Output |
PD6 (OLED EN) | Digital Output |
PD7 (OLED RST) | Digital Output |
Open the avr128da48_RTC_OLED_example.atsln solution in Atmel Studio
Build the solution: right click on avr128da48_RTC_OLED_example solution and select Build
Select the AVR128DA48 Curiosity Nano on-board debugger in the Tool section of the project settings:
Demo:
This example represents a implementation of a desktop clock built using the AVR-DA's RTC and an OLED Click. The clock can be set to the correct time through the use of the on-board user button connected to PC7 (on-board SW0).
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。