In a thread in the Hardware Projects group there was a non-working module for PCD8544 lcd modules. The PCD8544 controller is used in e.g. Nokia 5110 LCDs. Since I also ordered these type of lcds for my WiPy, I wrote a module myself. Basic functionality works fine. I'll spice it up in the near future.
https://github.com/mbirth/wipy-upcd8544
It's only tested with the WiPy, but I tried to make the code pyBoard-compatible. So if you like to test it, please tell me if it worked.
nb: It seems some LCDs have the backlight LEDs connected to GND, so you have to apply Vcc on the LIGHT pin and other LCDs have it the other way around so you have to apply GND to the LIGHT pin. Just so you don't wonder why it doesn't light up. My module currently only handles the latter variant.
PCD8544 driver module (Nokia 5110 lcds)
PCD8544 driver module (Nokia 5110 lcds)
pyBoard v1.0 + LCD32MKv1.0 | WiPy + Expansion Board | GitHub
Re: PCD8544 driver module (Nokia 5110 lcds)
That thread is probably for a reason in that group, and we'd like to reach more users, the best idea is to continue it, not post another thread elsewhere (especially in the subforum not related to hardware).In a thread in the Hardware Projects group there
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/
Re: PCD8544 driver module (Nokia 5110 lcds)
Anyone got this working?
I'm trying on the ESP8266-12e.
At this point in the code:
spi.init(spi.MASTER, baudrate=328125, bits=8, polarity=0, phase=1, firstbit=spi.MSB)
I get the message
AttributeError: type object 'SPI' has no attribute 'MASTER'
Similarly for 'MSB'. It also doesn't seem to recognize the 'bits' keyword.
If I omit all three, it doesn't complain, just hangs at the point of initializing the main class.
I'm trying on the ESP8266-12e.
At this point in the code:
spi.init(spi.MASTER, baudrate=328125, bits=8, polarity=0, phase=1, firstbit=spi.MSB)
I get the message
AttributeError: type object 'SPI' has no attribute 'MASTER'
Similarly for 'MSB'. It also doesn't seem to recognize the 'bits' keyword.
If I omit all three, it doesn't complain, just hangs at the point of initializing the main class.
Re: PCD8544 driver module (Nokia 5110 lcds)
That's why the drivers shouldn't try to create their own spi objects, but instead take one as a parameter. Different platforms have different ways of initializing spi and different parameters allowed.
Re: PCD8544 driver module (Nokia 5110 lcds)
Oh, it takes an SPI object as parameter. But for some reason, different platforms have completely different constants and parameters for the same thing. And things like the serial protocol setup are device-specific and belong into the driver IMHO.deshipu wrote:That's why the drivers shouldn't try to create their own spi objects, but instead take one as a parameter. Different platforms have different ways of initializing spi and different parameters allowed.
pyBoard v1.0 + LCD32MKv1.0 | WiPy + Expansion Board | GitHub
Re: PCD8544 driver module (Nokia 5110 lcds)
I've been looking for the correct syntax on the ESP8266 to write this spi initialization, but no success.
How does one indicate the master status, endian and bits in this case?
I guess it can worked out with some pain by digging around in the code-base, but perhaps there is a place with use examples?
How does one indicate the master status, endian and bits in this case?
I guess it can worked out with some pain by digging around in the code-base, but perhaps there is a place with use examples?
Re: PCD8544 driver module (Nokia 5110 lcds)
One does not. The esp8266 bit-banged SPI is very simple and doesn't support changing those parameters.dalex wrote:How does one indicate the master status, endian and bits in this case?
Re: PCD8544 driver module (Nokia 5110 lcds)
Is there any update in this ? Would be nice to interface with Nokia LCD's
Re: PCD8544 driver module (Nokia 5110 lcds)
Using it here with Deshipu's HSPI and a few minor modifications:
https://github.com/mcauser/MicroPython- ... 10-display
https://github.com/mbirth/wipy-upcd8544/issues/1
https://github.com/mcauser/MicroPython- ... 10-display
https://github.com/mbirth/wipy-upcd8544/issues/1