summaryrefslogtreecommitdiff
path: root/display/hd44780/README
blob: 611228568f460faabb3e5ad9c93937ead4d7f37b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
-------------------------------------------------------------------------------
Hitachi HD44780 display controller, 4-bit mode, initialization sequence
-------------------------------------------------------------------------------

This capture contains the initialization sequence of an Hitachi HD44780
display controller which is very popular for 2x16, 4x20, and similar
character oriented display modules.

The specific hardware setup that got recorded uses 4-bit mode, which
means that data gets communicated on lined D4-D7 only, and D0-D3 are
not connected.


Logic analyzer setup (hd44780-reset-init-hello.sr)
--------------------------------------------------

The capture was taken with an ASIX Sigma2 logic analyzer, sampling 8
logic channels at a rate of 50MHz:

  Probe       HD44780
  -------------------
  1           IR (infrared remote control, idle, not HD44780 related)
  2           RS (selects "commands" and "display data" mode)
  3           RW (read/write, always low for write, fixed in HW)
  4           E (enable, falling edge clocks data transfers)
  5           D4 (data lines ...)
  6           D5
  7           D6
  8           D7


hd44780-reset-init-hello.sr
---------------------------

See https://en.wikipedia.org/wiki/Hitachi_HD44780_LCD_controller for a
list of display controller commands, and especially the 'Mode Selection'
section which discusses the synchronization phase.

The sequence demonstrates the following steps:
- Synchronize to the LCD controller, cope with it being in any arbitrary
  state from previous execution.
- Configure the LCD controller hardware to 4-bit mode, clear the screen
  and setup other parameters.
- Print two text labels: "Hello LCD" and "counter", start printing
  counter values.

When a dedicated HD44780 decoder is not available, the 'parallel' decoder
can extract the most basic information: Clock on E (falling edge), D4-D7
of the display corresponds to D0-D3 of the decoder (D4-D7 of the decoder
are not connected). Words consist of 8 bits (span 2 bus cycles), and are
in big endian format.


Logic analyzer setup (other files)
----------------------------------

The capture was taken with a Saleae Logic clone (mostly at 200kHz):

  Probe       HD44780
  -------------------
  0           RS (selects "commands" and "display data" mode)
  1           E (enable, falling edge clocks data transfers)
  2           D4 (data lines...)
  3           D5
  4           D6
  5           D7


hd44780-blink.sr
----------------

Arduino firmware based on the LiquidCrystal example Arduino Sketch.

This is what the decoded data should look like:

 - initialization
 - write "hello, world!"
 - toggle blinking every 3 seconds


hd44780-cursor.sr
-----------------

Arduino firmware based on the LiquidCrystal example Arduino Sketch.

This is what the decoded data should look like:

 - initialization
 - write "hello, world!"
 - toggle cursor every 0.5 seconds


hd44780-customcharacter.sr
--------------------------

Arduino firmware based on the LiquidCrystal example Arduino Sketch.

This is what the decoded data should look like:

 - initialization
 - define special characters: heart, smiling face, unhappy face, stickman
   with arms low, stickman with arms up
 - write "I {heart} Arduino {smiling face}" and "    {stickman with arms low}"
 - toggle second line between "    {stickman with arms low}" and
   "    {stickman with arms up}" about (!) every 0.9 seconds


hd44780-font.sr
---------------

Arduino firmware based on the LiquidCrystal example Arduino Sketch.

This is what the decoded data should look like:

 - initialization
 - define special characters: heart, smiling face, unhappy face, stickman
   with arms low, stickman with arms up
 - every about 250ms a set of 2 * 16 characters are written to the display,
   starting at 0


hd44780-power.sr
----------------

Arduino firmware based on the LiquidCrystal example Arduino Sketch.

This is what the decoded data should look like:

 - initialization
 - write "hello, world!"
 - toggle display power every 0.5 seconds


hd44780-shift.sr
----------------

Arduino firmware based on the LiquidCrystal example Arduino Sketch.

This is what the decoded data should look like:

 - initialization
 - write "hello, world!"
 - repeats:
   - shift text to the left until it is outside the view
   - shift text to the right until it is outside the view
   - shift text to the left until it is where it was before shifting


hd44780-shiftcursor_204.sr
--------------------------

This is what the decoded data should look like:

 - initialization
 - write "hello, world!"
 - using cursor shifts it replaces the ! by ?, w by W and h by H, so it is
   "Hello, World?" in the end


hd44780-textdirection.sr
------------------------

Arduino firmware based on the LiquidCrystal example Arduino Sketch.

This is what the decoded data should look like:

 - initialization
 - write "abcdefghijklm"
 - continue to the left until "s"
 - continue to the right until "z"