You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this site may not always be kept up to date.
16
14
17
-
Introduction
18
-
============
15
+
# Introduction
19
16
20
17
Welcome to GLCD, an open source graphic LCD library written by Andy Gock.
21
18
@@ -27,8 +24,9 @@ This library has been written cleanly, to allow easy modification for use with d
27
24
28
25
It is suitable for monochrome (black and white) LCDs with page by page data and command write style data transfer protocol. It is not suitable for color graphic LCDs.
29
26
30
-
Supported controllers and chipsets
31
-
----------------------------------
27
+
# Supported devices
28
+
29
+
## Controllers and chipsets
32
30
33
31
Works with:
34
32
@@ -43,10 +41,9 @@ The following Newhaven displays have been physically tested with and confirmed w
43
41
- NHD-C12832A1Z-FSW-FBW-3V3
44
42
- ZOLEN-12864-FFSSWE-NAA
45
43
46
-
Supported microcontrollers
47
-
--------------------------
44
+
## Microcontrollers
48
45
49
-
MCUs supported:
46
+
### MCUs supported
50
47
51
48
- Atmel AVR 8-bit
52
49
- NXP LPC111x ARM Cortex-M0
@@ -55,24 +52,25 @@ MCUs supported:
55
52
- ST STM32 F4 ARM Cortex-M4
56
53
- Microchip PIC24H (and probably other 16-bit MCUs)
57
54
58
-
Development boards tested on (with on-board LCD):
55
+
### Development boards tested on (with on-board LCD)
Development boards tested on (without on-board LCD):
59
+
### Development boards tested on (without on-board LCD)
63
60
64
61
- Microstick II with PIC24H and Nokia 3310/5110 LCD, ST7565R and ST7565P
65
-
- ST Nucleo F401RE.
62
+
- ST Nucleo F401RE
66
63
67
-
###Special note
64
+
## Special note
68
65
69
66
Not all combinations of microcontroller platform and LCD controllers are supported out of the box. However you can edit the files `devices/` and `controllers/` and add your desired combination. More information on how to do this can be read in the doxygen documentation.
70
67
71
-
Setup of symbols for compiler
72
-
-----------------------------
68
+
# Setup of symbols for compiler
73
69
74
70
The following symbols need to be defined for the compiler:
75
71
72
+
## Select microcontroller
73
+
76
74
Pick microcontroller type (pick one only):
77
75
78
76
GLCD_DEVICE_LPX111X
@@ -82,6 +80,7 @@ Pick microcontroller type (pick one only):
82
80
GLCD_DEVICE_STM32F4XX
83
81
GLCD_DEVICE_PIC24H
84
82
83
+
## Select LCD controller
85
84
Pick LCD controller type (pick one only):
86
85
87
86
GLCD_CONTROLLER_PCD8544
@@ -90,6 +89,8 @@ Pick LCD controller type (pick one only):
90
89
91
90
For ST7565P controllers, treat as ST7565R. For most if not all parts here, they behave the same way.
92
91
92
+
## Select SPI or parallel interface
93
+
93
94
If using a parallel interface LCD (e.g NT75451 on NGX BlueBoard):
94
95
95
96
GLCD_USE_PARALLEL
@@ -100,47 +101,52 @@ When using SPI controllers:
100
101
101
102
Note the SPI symbol isn't actually checked by the source at the moment, and it is fine if it is not used. It is for forward compatibility only. One day I may decide to check for it.
102
103
103
-
For the Newhaven displays using ST7565 based controllers listed above which have been tested as working, there
104
-
are certain initialisation sequences which should be followed, and this may vary
105
-
from display to display. To force a certain (and tested) initialisation
106
-
sequence, define one of the following:
104
+
## Initialisation sequence
105
+
106
+
For the Newhaven displays using ST7565 based controllers listed above which have been tested as working, there are certain initialisation sequences which should be followed, and this may vary from display to display. To force a certain (and tested) initialisation sequence, define one of the following:
107
107
108
108
GLCD_INIT_NHD_C12832A1Z_FSW_FBW_3V3
109
109
GLCD_INIT_NHD_C12864A1Z_FSW_FBW_HTT
110
110
GLCD_INIT_NHD_C12864WC_FSW_FBW_3V3_M
111
111
GLCD_INIT_ZOLEN_12864_FFSSWE_NAA
112
112
113
-
If you don't specify a NHD model, ST7565 controller selection will default to `GLCD_INIT_NHD_C12864WC_FSW_FBW_3V3_M` sequence.
114
-
This however may change in the future.
113
+
If you don't specify a NHD model, ST7565 controller selection will default to `GLCD_INIT_NHD_C12864WC_FSW_FBW_3V3_M` sequence. This however may change in the future.
114
+
115
+
## Reset time
115
116
116
117
To set a reset time, used by the `glcd_reset()` function, set `GLCD_RESET_TIME` to desired duration in milliseconds.
117
118
118
-
These symbols need to be set in the configuration options of your IDE, usually
119
-
in the "defined symbols" section, or they can be defined in a makefile
120
-
as `-D` options.
119
+
## Contrast
120
+
121
+
When using PCD8544 controllers, define a `PCD8544_CONTRAST` symbol with a 8-bit unsigned integer for the contast value. If this is not defined, a default value will be used.
122
+
123
+
## LCD dimensions
124
+
125
+
Set `GLCD_LCD_WIDTH` and `GLCD_LCD_HEIGHT` to define custom LCD dimensions. If these are not user defined, then a default width and height is used. The default dimensions are 128x64 except for PCD8544 controllers which is 84x48.
126
+
127
+
## Compiler setup
128
+
129
+
These symbols need to be set in the configuration options of your IDE, usually in the "defined symbols" section, or they can be defined in a makefile as `-D` options.
121
130
122
131
Example:
123
132
124
133
-DGLCD_DEVICE_LPC111X
125
134
126
-
Delay Timing
127
-
------------
135
+
## Delay Timing
128
136
129
-
Some operations such as sending a reset pulse, requires the use of a delay timer. The library will refer to a
130
-
external function called `delay_ms(t)` where t is the delay required in milliseconds. Please ensure you have
131
-
this function elsewhere in your program.
137
+
Some operations such as sending a reset pulse, requires the use of a delay timer. The library will refer to a external function called `delay_ms(t)` where t is the delay required in milliseconds. Please ensure you have this function elsewhere in your program.
132
138
133
-
If you are using avr-gcc with Atmel devices, you can force the library to use the built-in `_delay_ms()` function
134
-
by setting the compiler symbols:
139
+
### AVR devices
140
+
141
+
If you are using avr-gcc with Atmel devices, you can force the library to use the built-in `_delay_ms()` function by setting the compiler symbols:
135
142
136
143
GLCD_USE_AVR_DELAY
137
144
__DELAY_BACKWARD_COMPATIBLE__
138
-
139
-
Documentation
140
-
-------------
141
145
142
-
Refer to Doxygen generated pages for detailed documentation. You'll can generate the documentation yourself,
143
-
simply install Doxygen and load the doxygen file in the root directory of the library and generate the documents
144
-
in a file format of your choice (HTML, PDF, TEX etc).
146
+
`F_CPU` must be set to your clock frequency for the above AVR built-in delay routine to work.
147
+
148
+
# Documentation
149
+
150
+
Refer to Doxygen generated pages for detailed documentation. You'll can generate the documentation yourself, simply install Doxygen and load the doxygen file in the root directory of the library and generate the documents in a file format of your choice (HTML, PDF, TEX etc).
145
151
146
152
There is also a online version (link at top of this document)
0 commit comments