template<BOARD::pin_t SCE_PIN, BOARD::pin_t DC_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
class PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >
Device driver for PCD8544 48x84 pixels matrix LCD controller/driver.
- Parameters
-
[in] | SCE_PIN | screen chip enable pin. |
[in] | DC_PIN | data/command select pin. |
[in] | SDIN_PIN | screen data pin. |
[in] | SCLK_PIN | screen clock pin. |
Circuit
PCD8544 is a low voltage device (3V3) and signals require level shifter (74HC4050 or 10K resistor).
+------------+
(RST)--------[ > ]--1-|RST |
(D5)---------[ > ]--2-|SCE |
(D4)---------[ > ]--3-|DC |
(D3)---------[ > ]--4-|SDIN |
(D2)---------[ > ]--5-|SCLK |
(3V3)---------------6-|VCC |
(GND)--------[220]--7-|LED |
(GND)---------------8-|GND |
+------------+
References
- Product Specification, Philips Semiconductors, 1999 Apr 12. https://www.sparkfun.com/datasheets/LCD/Monochrome/Nokia5110.pdf
Definition at line 62 of file PCD8544.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t DC_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
Instruction set (table 1, pp. 14).
Enumerator |
---|
NOP |
No operation.
|
SET_FUNC |
Set function.
|
BASIC_INST |
Basic instruction set.
|
EXTENDED_INST |
Extended instruction set control.
|
HORIZONTAL_ADDR |
Horizontal addressing.
|
VERTICAL_ADDR |
Vertical addressing.
|
POWER_UP_MODE |
Power up mode.
|
POWER_DOWN_MODE |
Power down mode.
|
DISPLAY_CNTL |
Display control.
|
DISPLAY_OFF |
Turn display off.
|
DISPLAY_ON |
Turn display on.
|
NORMAL_MODE |
Normal display mode.
|
INVERSE_MODE |
Inverse display mode.
|
SET_Y_ADDR |
Sets Y-address of RAM (0..5).
|
Y_ADDR_MASK |
Mask Y-address.
|
SET_X_ADDR |
Sets X-address of RAM (0..83).
|
X_ADDR_MASK |
Mask X-addres.
|
SET_TEMP_COEFF |
Set temperature coefficient (0..3).
|
SET_BIAS_SYS |
Set Bias System (0..7).
|
SET_VOP |
Write Vop to register (0..127).
|
VOP_MASK |
Mask Vop.
|
SCRIPT_END |
Init script end.
|
Definition at line 355 of file PCD8544.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t DC_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::PCD8544 |
( |
const uint8_t * |
font = NULL | ) |
|
|
inline |
Construct display device driver and initiate pins. The parameter should a 5x7 font in program memory or NULL for the default font.
- Parameters
-
[in] | font | in program memory (Default NULL). |
Definition at line 76 of file PCD8544.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t DC_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
virtual bool PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::begin |
( |
| ) |
|
|
inlinevirtual |
Start interaction with display.
- Returns
- true(1) if successful otherwise false(0)
Implements LCD::Device.
Reimplemented in LCD4884.
Definition at line 187 of file PCD8544.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t DC_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
virtual void PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::display_contrast |
( |
uint8_t |
level | ) |
|
|
inlinevirtual |
Set display contrast (0..127).
- Parameters
-
Reimplemented from LCD::Device.
Definition at line 226 of file PCD8544.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t DC_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
virtual bool PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::end |
( |
| ) |
|
|
inlinevirtual |
Stop interaction with device and power down.
- Returns
- true(1) if successful otherwise false(0)
Reimplemented from LCD::Device.
Definition at line 213 of file PCD8544.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t DC_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
virtual size_t PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::write |
( |
uint8_t |
c | ) |
|
|
inlinevirtual |
Write character to display. Handles carriage-return, line-feed, backspace, alert, horizontal tab and form-feed. Returns number of characters(1) or zero(0) on error.
- Parameters
-
- Returns
- number of characters written(1) or zero(0) for error.
Definition at line 304 of file PCD8544.h.
template<BOARD::pin_t SCE_PIN, BOARD::pin_t DC_PIN, BOARD::pin_t SDIN_PIN, BOARD::pin_t SCLK_PIN>
const uint8_t* PCD8544< SCE_PIN, DC_PIN, SDIN_PIN, SCLK_PIN >::m_font |
|
protected |
Font (5x7), program memory pointer.
Definition at line 393 of file PCD8544.h.