This repository contains training examples on the Microchip tinyAVR® 1-series. Follow the Training Manual - Getting Started with the tinyAVR® 1-series from Microchip for full step-by-step description. The training is carried out on a ATtiny817 Xplained Pro board.
This training includes three assignments covering topics such as:
- Driver Configuration in Atmel START
- PINMUX driver configuration and check LED toggle on button press
- Generate a PWM by using timer counter A (TCA) and implement Variable-Pulse-Width by using the RTC interrupt
- Duty cycle and frequency measurement using input capture mode of TCB
- USART configuration
- CCL (Configurable Custom Logic): A programmable logic peripheral, which can be connected to the device pins, events, or peripherals, which allows the user to eliminate external logic gates for simple glue logic functions.
The code in this repository is configured for the last assignment. Refer to the Training Manual - Getting Started with the tinyAVR® 1-series for additional information on how to configure from scratch.
This training manual is based on using Atmel Start with Atmel Studio. It can, with some adjustments, be used with MPLAB X IDE. When the traning manual re-configures the project using Atmel Studio: go back to the Atmel Start website where the project was created and exported to MPLAB X IDE. Re-configure the original project before exporting it to MPLAB X IDE again. You can now copy and move all the new files, except main.c, over in your old project folder. In this way changes you have made in main.c are kept, but the system is re-configured.
- MPLAB® X IDE 5.40 or later
- ATtiny DFP 2.2.89 or later
- MPLAB® XC8 2.20 or a later
- AVR/GNU C Compiler 5.4.0 or later
- ATtiny817 Xplained Pro
- Micro-USB cable (Type-A/Micro-B)
- One female-to-female wire
- Internet connection
-
Connect the ATtiny817 Xplained Pro board to the PC using the USB cable.
-
Download the zip file or clone the example to get the source code.
-
Open the project in MPLAB X IDE.
-
Refer to the Training Manual - Getting Started with the tinyAVR® 1-series for step-by-step description on how to program each of the assignments.
-
Build the solution and program the ATtiny817.
This training exercise demonstrated the different peripherals of tinyAVR 1-series, how to use the Event System to generate Event and how to use CCL to generate output.