2019년 5월 24일 금요일

AVR LCD display in 4-bit-mode (필요한 부분만 발췌)



LCD 16x2 can be used in 4BitMode or 8BitMode
depending on requirement of application.

LCD command 0x28 is for 4-Bit Mode



Programming LCD 16x2 4-bit mode with AVR ATmega16/ATmega32

Initialization
1. Wait for 15ms or more, Power on initialization time for LCD 16x2.
2. Send 0x02 command which is initializes LCD 16x2 in 4-bit mode.
3. Send 0x28 command which configures LED in 2-line, 4-bit mode and 5x8 bits
4. Send any Display ON command (0x0E, 0x0C)
5. Send 0x06 command (increment cursor) (=커서가 오른쪽으로 계속 Shift)