You are on page 1of 1

ATtiny817 XPLAINED MINI demo program

(C) 2016-2017 Copyright Pavel Haiduc, HP InfoTech Srl

The program demonstrates:


- clock divisor initialization
- I/O port initialization
- Timer TCA0 initialization and operation
- USART initialization and communication
- TWI initialization as master
- DS3231 RTC library functions
- SPI initialization and communication
- EEPROM access.

It requires an Atmel ATtiny817 XPLAINED MINI development board


and a DS3231 Arduino shield.

Connections:
XPLAINED DS3231 shield
PB1 - SDA
PB0 - SCL
GND - GND
+3V - VCC

The program outputs data using the CDC serial port emulated
by the mEDBG interface present on the XPLAINED MINI board.
This data will be displayed in the Tools|Terminal program
present in the CodeVisionAVR IDE.
The Terminal must be configured using the Settings|Terminal menu:
- Port: COM port emulated by the XPLAINED MINI
- Baud rate: 9600
- Data bits: 8
- Stop bits: 1
- Parity: None
- Emulation: TTY
- Handshaking: RTS/CTS

The data transmitted by the SPI0, every 100ms, can be watched


with a scope on XPLAINED MINI's pin PA1 (MOSI signal).
The SPI0 SCK signal is present during transmission on the
PA3 pin.

Notes:
- Please make sure that the Atmel mEDBG programmer is selected
in the Settings|Programmer menu of the CodeVisionAVR IDE
- Usage of the mEDBG programmer requires that Atmel Studio 7
is installed.

You might also like