Ответ:
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)

миниатюрный аудио-видеорекордер mAVR

Отправлено nestandart 12 марта 2005 г. 18:32
В ответ на: Кто работал с LCD модулями на HD44780 в режиме 4 бит? Не получается перейти в этот режим. В 8-разр. режиме получается все отправлено maxik_k 12 марта 2005 г. 18:02


Initialisation of the HD44780
Initialising by internal reset circuit

The HD44780 automatically initialises (resets) when power is turned on using the internal reset circuit. The following instructions are executed in initialisation. The busy flag (BF) is kept in busy state until initialisation ends. The busy state (BF=1) is 10ms after Vcc rises to 4.5volts.

1. Display clear

2. Function set ..... DL = 1: 8 bit interface
N = 0: 1 line display
F = 0: 5 x 7 dot character font

3. Display ON/OFF ... D = 0: Display OFF
C = 0: Cursor OFF
B = 0: Blink OFF

4. Entry mode set .. I/D = 1: +1 (increment)
S = 0: No shift

5. Write DD RAM
When the rise time of power supply (0.2 -> 4.5) is out
of the range 0.1ms - 10ms, or when the low level width
of power OFF (less than 0.2) is less than 1ms, the
internal reset circuit will not operate normally.
In this case, initialisation will not be performed
normally. Initialise by instruction, as detailed below.

If the power supply conditions for correctly operating the internal reset circuit are not met, initialisation by instruction is required.
Initialising by instruction

When interface is 8-bits wide


[Power ON]

[ Wait more than 15ms ]
[after Vdd rises to 4.5v]

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Can't check BF before this instruction
0 0 0 0 1 1 * * * * Function set (8-bit interface)

[Wait more than 4.1ms]

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Can't check BF before this instruction
0 0 0 0 1 1 * * * * Function set (8-bit interface)

[Wait more than 100us]

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Can't check BF before this instruction
0 0 0 0 1 1 * * * * Function set (8-bit interface)

BF can be checked after the following
instructions. When BF is not checked,
the waiting time between instructions
is longer than the execution time.
(See Instruction set)

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 1 1 N F * * Function set [8-bit Interface ]
[Specify display lines]
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 [and character font ]
0 0 0 0 0 0 1 0 0 0 Display OFF These cannot be
changed afterwards
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 0 0 0 1 Display ON

RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 0 1 I/D S entry mode set

[end of initialisation]


When interface is 4-bits wide
[Power ON]

[ Wait more than 15ms ]
[after Vdd rises to 4.5v]

RS R/W DB7 DB6 DB5 DB4 Can't check BF before this instruction
0 0 0 0 1 1 Function set (8-bit interface)

[Wait more than]
[ 4.1ms ]

RS R/W DB7 DB6 DB5 DB4 Can't check BF before this instruction
0 0 0 0 1 1 Function set (8-bit interface)

[Wait more than]
[ 100us ]

RS R/W DB7 DB6 DB5 DB4 Can't check BF before this instruction
0 0 0 0 1 1 Function set (8-bit interface)

BF can be checked after the following
instructions. When BF is not checked,
the waiting time between instructions
is longer than the execution time.
(See Instruction set)

RS R/W DB7 DB6 DB5 DB4
0 0 0 0 1 0 Function set (to 4-bit interface)

RS R/W DB7 DB6 DB5 DB4
0 0 0 0 1 0
0 0 N F * * Function set [4-bit Interface ]
[Specify display lines]
RS R/W DB7 DB6 DB5 DB4 [and character font ]
0 0 0 0 0 0 These cannot be
0 0 1 0 0 0 Display OFF changed afterwards

RS R/W DB7 DB6 DB5 DB4
0 0 0 0 0 0
0 0 0 0 0 1 Display ON

RS R/W DB7 DB6 DB5 DB4
0 0 0 0 0 0
0 0 0 1 I/D S entry mode set

[end of initialisation]




Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru