AVR-LibC
2.3.0
Standard C library for AVR-GCC
AVR-LibC Manual
AVR-LibC Sources
Main Page
User Manual
Library Reference
FAQ
Example Projects
Index
Loading...
Searching...
No Matches
source
avr-libc-onlinedocs
doc
examples
stdiodemo
defines.h
1
/*
2
* ----------------------------------------------------------------------------
3
* "THE BEER-WARE LICENSE" (Revision 42):
4
* <joerg@FreeBSD.ORG> wrote this file. As long as you retain this notice you
5
* can do whatever you want with this stuff. If we meet some day, and you think
6
* this stuff is worth it, you can buy me a beer in return. Joerg Wunsch
7
* ----------------------------------------------------------------------------
8
*
9
* General stdiodemo defines
10
*/
11
12
/* CPU frequency */
13
#define F_CPU 16000000UL
14
15
/* UART baud rate */
16
#define UART_BAUD 9600
17
18
/* HD44780 LCD port connections */
19
#define HD44780_RW B, 0
// D8 on Arduino Nano
20
#define HD44780_RS D, 7
// D7 on Arduino Nano
21
22
#define HD44780_E D, 6
// D6 on Arduino Nano
23
/* The data bits D4-D7 have to be not only in ascending order but also
24
consecutive. The LCD is operated in 4-bit mode, so D0-D4 remain
25
unconnected. */
26
#define HD44780_D4 D, 2
// D2 through D5 on Arduino Nano
27
28
/* Whether to read the busy flag, or fall back to
29
worst-time delays. */
30
#define USE_BUSY_BIT 1
31
32
/* Arduino Nano onboard LED */
33
#define LED_PORT PORTB
34
#define LED_DDR DDRB
35
#define LED_PIN _BV(5)
Generated on Sun Dec 28 2025 13:38:37 for AVR-LibC by
1.9.6