Comments (6)
To be honest I would just source a different LCD board from ebay or aliexpress ... one where you wire it yourself
from luma.lcd.
By default PCD8544 driver is SPI compatible, hence the reason it is fixed to use the RPIs SPI interface pins.. this allows us to use the SPI hardware and the Linux kernel to drive the device efficiently. If you have bought a board which interfaces those lines to non-SPI griot header pins, then that is a poor decision by the board designer!
The only choice you have really is therefore to do what is called bit-banging in software .. this is what
https://github.com/pevandenburie/node-pcd8544-rpi/blob/master/src/PCD8544.cc#L812 does.
Luma.lcd will support bitbanging but I havenβt tried it for a while. Instead of SPI, you would need to look at using this serial interface instead:
https://github.com/rm-hull/luma.core/blob/master/luma/core/interface/serial.py#L118
from luma.lcd.
Thank you for your quick reply! π
I tried bitbang in your core before, seems not working.
I will take another look when I have time.
Below is my pin config, I think it is correct
from luma.lcd.
Hi @rm-hull
Hope it is something wrong on my side, I used below code, but no luck, nothing shows on my screen
please checkout Front pic to see what front looks like.
from luma.core.interface.serial import spi, bitbang
from luma.core.render import canvas
from luma.lcd.device import pcd8544
# serial = spi(port=0, device=1, gpio_DC=27, gpio_RST=23)
serial = bitbang(SCLK=17, SDA=18, CE=22 , DC=27 ,RST=23)
device = pcd8544(serial, rotate=1)
with canvas(device) as draw:
draw.rectangle(device.bounding_box, outline="white", fill="black")
draw.text((30, 40), "Hello World", fill="red")
Now that I won't use stock hardware SPI, I think below operation is meaningless, but I want to show you still
[ 22:22 - 192.168.2.107 ]
pi@Saturn ~/projects/PCD_8544_screen/python/test $ ls -l /dev/spi*
crw-rw---- 1 root spi 153, 0 Dec 5 23:19 /dev/spidev0.0
crw-rw---- 1 root spi 153, 1 Dec 5 23:19 /dev/spidev0.1
[ 22:23 - 192.168.2.107 ]
pi@Saturn ~/projects/PCD_8544_screen/python/test $ lsmod
Module Size Used by
cmac 3239 1
bnep 12051 2
hci_uart 20020 1
btbcm 7916 1 hci_uart
bluetooth 365780 24 hci_uart,bnep,btbcm
spidev 7373 0
brcmfmac 292632 0
brcmutil 9863 1 brcmfmac
cfg80211 544545 1 brcmfmac
rfkill 20851 6 bluetooth,cfg80211
snd_bcm2835 24427 0
snd_pcm 98501 1 snd_bcm2835
snd_timer 23968 1 snd_pcm
snd 70032 3 snd_timer,snd_bcm2835,snd_pcm
bcm2835_gpiomem 3940 0
spi_bcm2835 7596 0
uio_pdrv_genirq 3923 0
fixed 3285 0
uio 10204 1 uio_pdrv_genirq
i2c_dev 6913 0
ip_tables 13161 0
x_tables 20578 1 ip_tables
ipv6 408900 43
[ 22:23 - 192.168.2.107 ]
pi@Saturn ~/projects/PCD_8544_screen/python/test $
from luma.lcd.
@duchenpaul got it to work?
from luma.lcd.
Yes, I will close it.
from luma.lcd.
Related Issues (20)
- Error trying PWMBacklight with ili9341 HOT 23
- Help with speed difference between SBCs HOT 15
- ili9341 and PWM support? HOT 1
- Thoughts on Bridgetek EVE (Embedded Video Engine) HOT 11
- Support for ili9486 HOT 9
- Trying to get this to work with Spotpear LCD HOT 20
- ST7789 - maximum height and width? HOT 9
- Multiple TFT Screens (ST7735) HOT 2
- Standard 'gpio_LIGHT' pin causes crash of I2S HOT 1
- Support ILI9488 3.5" (320x480) displays HOT 4
- The function device.backlight(False) turns on the lights, instead of device.backlight(True) HOT 7
- DeprecationWarning: getsize is deprecated and will be removed in Pillow 10 (2023-07-01)
- RuntimeError: This module can only be run on a Raspberry Pi! HOT 3
- Comment error: HT1621 may actually 1/3 bias HOT 2
- ILI9341 issue?
- st7735 white screen HOT 1
- Question: HD44780 Cursor Show/Hide and Line/Blink
- This is simply a question / request: Have you ever consider porting this great project to micropython? HOT 2
- How to create custom characters, use function _make_custom HOT 2
- Is the ILI9341V display supported? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luma.lcd.