|
Serial Musical Organ 1.0
Buzzer controller and musical organ
|
CPU configuration and definitions for ATmega168. More...

Go to the source code of this file.
Macros | |
| #define | __AVR_ATmega168__ |
| ATmega168 microcontroller selection. | |
| #define | BAUD 9600UL |
| Default USART baud rate for serial communication. | |
| #define | F_CPU 16000000UL |
| CPU clock frequency in Hertz. | |
CPU configuration and definitions for ATmega168.
This header file centralizes all CPU-specific configurations for the ATmega168 microcontroller. It defines the processor type, clock frequency, and default serial communication baud rate.
Include this file before any AVR-specific headers or other modules that depend on CPU definitions:
Definition in file CPU.h.
| #define __AVR_ATmega168__ |
ATmega168 microcontroller selection.
Ensures the compiler uses the correct memory map, register definitions, and hardware-specific optimizations for the ATmega168.
This macro is:
| #define BAUD 9600UL |
Default USART baud rate for serial communication.
Sets the serial communication speed to 9600 bits per second. This is a standard baud rate commonly used for microcontroller communication and terminal interfaces.
Range of typical baud rates for ATmega168 @ 16MHz:
Calculation formula:
| #define F_CPU 16000000UL |
CPU clock frequency in Hertz.
Defines the operating frequency of the ATmega168 microcontroller as 16 MHz. This macro is critical for timing functions and peripheral configuration.
Important uses:
For ATmega168 typical clock configurations:
Derivation for UBRR calculation: