#include "fw_hal.h"Go to the source code of this file.
Data Structures | |
| struct | FontDef_t |
Macros | |
| #define | PCD8544_CS P35 |
| #define | PCD8544_MOSI P34 |
| #define | PCD8544_SCK P32 |
| #define | PCD8544_RES P37 |
| #define | PCD8544_DC P36 |
| #define | PCD8544_BL P12 |
| #define | PCD8544_WIDTH 84 |
| #define | PCD8544_HEIGHT 48 |
| #define | PCD8544_PAGES 6 |
| #define | PCD8544_FUNCTIONSET 0x20 |
| #define | PCD8544_POWERDOWN 0x04 |
| #define | PCD8544_ENTRYMODE 0x02 |
| #define | PCD8544_EXT_INSTRUCTION 0x01 |
| #define | PCD8544_DISPLAY_CONTROL 0x08 |
| #define | PCD8544_DISPLAY_BLANK 0x00 |
| #define | PCD8544_DISPLAY_NORMAL 0x04 |
| #define | PCD8544_DISPLAY_ALLON 0x01 |
| #define | PCD8544_DISPLAY_INVERTED 0x05 |
| #define | PCD8544_SET_YADDR 0x40 |
| #define | PCD8544_SET_XADDR 0x80 |
| #define | PCD8544_SET_TEMP 0x04 |
| #define | PCD8544_SET_BIAS 0x10 |
| #define | PCD8544_SET_VOP 0x80 |
Functions | |
| void | PCD8544_SetBackLightState (HAL_State_t state) |
| Turn PCD8544 LCD backlight on or off. | |
| void | PCD8544_WriteData (uint8_t dat) |
| Writes single byte data to PCD8544. | |
| void | PCD8544_WriteSameData (uint8_t dat, uint32_t size) |
| void | PCD8544_WriteCommand (uint8_t command) |
| Write a single byte command to PCD8544. | |
| void | PCD8544_Reset (void) |
| Hardware reset PCD8544 LCD. | |
| void | PCD8544_SetPowerDownMode (HAL_State_t state) |
| Powerdown mode control. | |
| void | PCD8544_SetBias (uint8_t val) |
| Set bias system level. | |
| void | PCD8544_SetTemperatureCoef (uint8_t val) |
| Set TCx (temperature coefficient) | |
| void | PCD8544_SetContrast (uint8_t bias, uint8_t val) |
| Set the contrast level by adjusting Vlcd. | |
| void | PCD8544_SetDisplayAllOn (void) |
| Set PCD8544 To Turn On All Segments. | |
| void | PCD8544_SetDisplayInverted (void) |
| Set PCD8544 Display Mode to Inverted. | |
| void | PCD8544_SetDisplayBlank (void) |
| Set PCD8544 Display Mode to Blank. | |
| void | PCD8544_SetDisplayNormal (void) |
| Set PCD8544 Display Mode to Normal. | |
| void | PCD8544_Init (void) |
| Initializes PCD8544 Display. | |
| void | PCD8544_Fill (uint8_t color) |
| Fills entire LCD with specified color. | |
| void | PCD8544_UpdateScreen (void) |
| Update LCD display with changes. | |
| void | PCD8544_DrawPixel (uint8_t x, uint8_t y, uint8_t color) |
| Draws pixel at desired location. | |
| void | PCD8544_DrawLine (uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t color) |
| Draws line on LCD. | |
| void | PCD8544_GotoXY (uint8_t x, uint8_t y) |
| Sets cursor pointer to desired location for strings. | |
| char | PCD8544_Putc (char ch, FontDef_t *font, uint8_t color) |
| Put one character to internal RAM. | |
| char | PCD8544_Puts (char *str, FontDef_t *Font, uint8_t color) |
| Puts string to internal RAM. | |
Variables | |
| __CODE FontDef_t | Font_3x5 |
| __CODE FontDef_t | Font_5x7 |
| #define PCD8544_CS P35 |
PCD8544
Philips – PCD8544 is a single-chip low-power CMOS LCD driver controller The chip is designed to drive a graphic display of 84×48 pixels with SPI interface. Display Data RAM = 6 banks x 84 segments x 8 bits = 4032 bits = 504 bytes Each bank contains 84 columns/segments (from 0 to 83) Each column can store 8 bits of data (from 0 to 7)
Draws line on LCD.
| x0 | Line X start point, value between [0, PCD8544_WIDTH) |
| y0 | Line Y start point, value between [0, PCD8544_HEIGHT) |
| x1 | Line X end point, value between [0, PCD8544_WIDTH) |
| y1 | Line Y end point, value between [0, PCD8544_HEIGHT) |
| color | Color to be used. 0x00 or 0x01 |
| None |
Definition at line 177 of file pcd8544.c.
Draws pixel at desired location.
| x | X location, value between [0, PCD8544_WIDTH) |
| y | Y location, value between [0, PCD8544_HEIGHT) |
| color | Color to be used for screen fill, 0x00 or 0x01 |
| None |
Definition at line 159 of file pcd8544.c.
| void PCD8544_Fill | ( | uint8_t | color | ) |
Fills entire LCD with specified color.
| Color | Color to be used for screen fill, 0x00 or 0x01 |
| None |
Definition at line 141 of file pcd8544.c.
| void PCD8544_Init | ( | void | ) |
Initializes PCD8544 Display.
| None |
| None |
Definition at line 129 of file pcd8544.c.
Put one character to internal RAM.
| ch | Character to be written |
| *Font | Pointer to FontDef_t structure with used font |
| color | Color used for drawing. 0x00 or 0x01 |
| value | of ch |
Definition at line 281 of file pcd8544.c.
Puts string to internal RAM.
| *str | String to be written |
| *Font | Pointer to FontDef_t structure with used font |
| color | Color used for drawing. 0x00 or 0x01 |
| Zero | on success or character value when function failed |
Definition at line 328 of file pcd8544.c.
| void PCD8544_Reset | ( | void | ) |
Hardware reset PCD8544 LCD.
| None |
| None |
| void PCD8544_SetBackLightState | ( | HAL_State_t | state | ) |
| void PCD8544_SetBias | ( | uint8_t | val | ) |
Set bias system level.
| val | bias value, [0x00,0x07], small value may lead to totally blank display |
| None |
Definition at line 79 of file pcd8544.c.
Set the contrast level by adjusting Vlcd.
| bias,bias | value, [0x00,0x07], small value may lead to totally blank display |
| val | contrast level, [0x00, 0x7F] |
| None |
Definition at line 87 of file pcd8544.c.
| void PCD8544_SetDisplayAllOn | ( | void | ) |
| void PCD8544_SetDisplayBlank | ( | void | ) |
| void PCD8544_SetDisplayInverted | ( | void | ) |
| void PCD8544_SetDisplayNormal | ( | void | ) |
| void PCD8544_SetPowerDownMode | ( | HAL_State_t | state | ) |
| void PCD8544_SetTemperatureCoef | ( | uint8_t | val | ) |
| void PCD8544_UpdateScreen | ( | void | ) |
Update LCD display with changes.
| None |
| None |
Definition at line 147 of file pcd8544.c.
| void PCD8544_WriteCommand | ( | uint8_t | command | ) |
Write a single byte command to PCD8544.
| command | command to be written |
| None |
Definition at line 40 of file pcd8544.c.
| void PCD8544_WriteData | ( | uint8_t | dat | ) |
Writes single byte data to PCD8544.
| dat | data to be written |
| None |