GLCD Library
A C Library for Embedded Applications
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups Pages
PCD8544.h
Go to the documentation of this file.
1 
7 /*
8  Copyright (c) 2012, Andy Gock
9 
10  All rights reserved.
11 
12  Redistribution and use in source and binary forms, with or without
13  modification, are permitted provided that the following conditions are met:
14  * Redistributions of source code must retain the above copyright
15  notice, this list of conditions and the following disclaimer.
16  * Redistributions in binary form must reproduce the above copyright
17  notice, this list of conditions and the following disclaimer in the
18  documentation and/or other materials provided with the distribution.
19  * Neither the name of Andy Gock nor the
20  names of its contributors may be used to endorse or promote products
21  derived from this software without specific prior written permission.
22 
23  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26  DISCLAIMED. IN NO EVENT SHALL ANDY GOCK BE LIABLE FOR ANY
27  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34 
35 #ifndef PCD8544_H_
36 #define PCD8544_H_
37 
42 #define PCD8544_NOP 0
43 #define PCD8544_FUNCTION_SET (1<<5)
44 #define PCD8544_POWER_DOWN (1<<2)
45 #define PCD8544_HORIZONTAL_ADDRESSING 0
46 #define PCD8544_VERTICAL_ADDRESSING (1<<1)
47 #define PCD8544_EXTENDED_INSTRUCTION (1<<0)
48 
54 #define PCD8544_DISPLAY_CONTROL (1<<3)
55 #define PCD8544_DISPLAY_BLANK 0x0
56 #define PCD8544_DISPLAY_NORMAL (1<<2)
57 #define PCD8544_DISPLAY_ALL_ON (1<<0)
58 #define PCD8544_DISPLAY_INVERTED (1<<2|1<<0)
59 #define PCD8544_SET_Y_ADDRESS 0x40
60 #define PCD8544_SET_X_ADDRESS 0x80
61 
67 #define PCD8544_SET_TEMP (1<<2)
68 #define PCD8544_TEMPCO_0 0b00
69 #define PCD8544_TEMPCO_1 0b01
70 #define PCD8544_TEMPCO_2 0b10
71 #define PCD8544_TEMPCO_3 0b11
72 
74 #define PCD8544_SET_BIAS (1<<4)
75 #define PCD8544_SET_VOP (1<<7)
76 
78 #define PCD8544_MAX_BANKS 6
79 #define PCD8544_MAX_COLS 84
80 
81 #endif /* PCD8544_H_ */