Atmel 8bit MCUs (AVR) Libraries
Based on ATmega48/88/168/328(P), may not perform properly on other chips.
Usage
Every folder contains files named like: main.c
HAL_ADC.c
DEV_ADXL345.c
APP_Clock.h
, copy these .h & .c files except main.c
to your project.
USART
The USART serial hardware abstract library, normally used to transfer data with Computers.
You should define the frequency of crystal F_CPU
and BAUD
at Project> Properties> Toolchain> AVR/GNU C Complier> Symbols
(Don't include whitespaces) like this:
F_CPU=8000000
ADC
The Analog-Digital-Converter hardware abstract library.
Clock
The Clock application library, employs TIMER1 to count time 1 second per tick.
You should define the frequency of crystal at Project> Properties> Toolchain> AVR/GNU C Complier> Symbols
.
TIMER
The TIMER0&2 hardware abstract library, uses macro to calculate TCCRxB
and TCNTx
for TIMER0 and TIMER2 with the period you set.
This library contains only a .h file.
You should define the frequency of crystal F_CPU
, TIMER0_Period
and TIMER2_Period
(unit: microsecond μs) at Project> Properties> Toolchain> AVR/GNU C Complier> Symbols
.
TWI
The TWI (IIC, I2C) hardware abstract library.
ADXL345
The ADXL345 acceleration sensor device library. Based on TWI library.
License
This library is licensed under MIT, a really permissive license. Feel free to clone, contribute, or use it to your project for either non-commercial or commercial purpose.