https://github.com/eadf/esp8266_pcd8544_example
Demo of the pcd8544 driver
https://github.com/eadf/esp8266_pcd8544_example
Last synced: 8 months ago
JSON representation
Demo of the pcd8544 driver
- Host: GitHub
- URL: https://github.com/eadf/esp8266_pcd8544_example
- Owner: eadf
- License: gpl-3.0
- Created: 2015-02-16T13:52:15.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-01T13:45:44.000Z (over 11 years ago)
- Last Synced: 2025-02-01T12:11:14.266Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 250 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esp8266_pcd8544
[PCD8544 LCD driver](https://github.com/eadf/esp8266_pcd8544) example for esp8266 (Nokia 5110 & 3110 display)
The driver is a direct port of code found at [arduino playground.](http://playground.arduino.cc/Code/PCD8544)
Good news, the interface no longer requires 5 available GPIO outputs so an ESP-01 will indeed work. (But only if the RX pin of the esp is used.)
This is how the code is hooked up by default:
PCD8544| ESP8266
-------|------------------
RST Pin 1 | GPIO4
CE Pin 2 | GPIO5
DC Pin 3 | GPIO12
Din Pin 4 | GPIO13
Clk Pin 5 | GPIO14
Some ESP-12 have GPIO4 & GPIO5 reversed.
The RST pin is optional, set it to a negative value and tie PCD8544 reset to ESP reset via a resistor.
The CE pin is optional, set it to a negative value and tie PCD8544 CE pin to GND via a resistor.
All of the pins are configurable, you just set the pins you want to use in the setting struct.
I don't know if it is required but i put 1KΩ resistors on each GPIO pin, and it does not seem to cause any problems.
Take a look at [esp_mqtt_lcd](https://github.com/eadf/esp_mqtt_lcd) to see another example on how the pcd8544 driver can be used as a library module (git subtree) in your own project.
The makefile is copied from [esp_mqtt.](https://github.com/tuanpmt/esp_mqtt)
###Building and installing:
First you need to install the sdk and the easy way of doing that is to use [esp_open_sdk.](https://github.com/pfalcon/esp-open-sdk)
You can put that anywhere you like (/opt/local/esp-open-sdk, /esptools etc etc)
Then you could create a small ```setenv.sh``` file, containing the location of your newly compiled sdk and other platform specific info;
```
export SDK_BASE=/opt/local/esp-open-sdk/sdk
export PATH=${SDK_BASE}/../xtensa-lx106-elf/bin:${PATH}
export ESPPORT=/dev/tty.usbserial
```
(or setup your IDE to do the same)
To make a clean build, flash and connect to the esp console you just do this in a shell:
```
source setenv.sh # This is only needed once per session
make clean && make test
```
You won't be needing ```esptool```, the makefile only uses ```esptool.py``` (provided by [esp_open_sdk](https://github.com/pfalcon/esp-open-sdk))
I have tested this with sdk v0.9.5 and v0.9.4 (linux & mac)