Driver for LCD display Nokia 5110
Re: Driver for LCD display Nokia 5110
Hi,
I trying to use your exemple but my display not working ?? i find other example but not with micropython board.
sommeone can help me please. ??
I trying to use your exemple but my display not working ?? i find other example but not with micropython board.
sommeone can help me please. ??
Re: Driver for LCD display Nokia 5110
sorry my first post are posted so fast
I connected my micro python to LCD Screen like this :
RST =>Y4
CE => Y5
DC => Y3
LIGHT =>Y2
PWR =>Y1
CLK => Y6
DCIN => Y7
And i use this exemple :
https://github.com/mbirth/wipy-upcd8544
it not work
can you help me please....
I connected my micro python to LCD Screen like this :
RST =>Y4
CE => Y5
DC => Y3
LIGHT =>Y2
PWR =>Y1
CLK => Y6
DCIN => Y7
And i use this exemple :
https://github.com/mbirth/wipy-upcd8544
it not work
can you help me please....
Re: Driver for LCD display Nokia 5110
Dear krzysiu, how are you trying that example, what are you doing exactly, what are your connection and how it is not working — what results do you get? Also, how do you imagine we can help you here?
Re: Driver for LCD display Nokia 5110
I wrote a library for the Nokia 5110's PCD8544 lcd driver: https://github.com/mcauser/micropython-pcd8544
I have it working with an ESP8266, but changing it to work with the pyboard should be straight forward.
See the readme for examples.
I have it working with an ESP8266, but changing it to work with the pyboard should be straight forward.
See the readme for examples.
Re: Driver for LCD display Nokia 5110
Thanks for your responses,
@ deshipu, I think it's just connection probleme, with LCD board and micropython... @mcauser, i see your readme, and your code where your decribe how to connect on micropython (but i'm not very easy in english ).
this week i try it another... and tell you my results or not
it is not possible to add photos in this forum ?
Best regards
Krzysiu
@ deshipu, I think it's just connection probleme, with LCD board and micropython... @mcauser, i see your readme, and your code where your decribe how to connect on micropython (but i'm not very easy in english ).
this week i try it another... and tell you my results or not
it is not possible to add photos in this forum ?
Best regards
Krzysiu
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Driver for LCD display Nokia 5110
Yes, but only after a new user has posted a few times. This is to protect against spambots.krzysiu wrote:...it is not possible to add photos in this forum ?...
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Driver for LCD display Nokia 5110
Thanks
I try to explain you exactly my connection:
LCD Nokia <=> Micropython (Y Side)
RST <=> Y4
CE <=> Y5
DC <=> Y3
Din <=> Y7
Clk <=> Y6
Vcc <=> Y1
BL <=> Y2
Gnd <=> Gnd
i think Vcc - Y1 is a mistake ?
Vcc - 3,3volt or 5volt is correct ? ( i try it but not work )
BL = Back Ligth (?), must be connected to 3,3 volt too ?
I am sorry for basic question, but i am just starting use micropython, i am only a developper...
my code :
Thanks for your help ...
I try to explain you exactly my connection:
LCD Nokia <=> Micropython (Y Side)
RST <=> Y4
CE <=> Y5
DC <=> Y3
Din <=> Y7
Clk <=> Y6
Vcc <=> Y1
BL <=> Y2
Gnd <=> Gnd
i think Vcc - Y1 is a mistake ?
Vcc - 3,3volt or 5volt is correct ? ( i try it but not work )
BL = Back Ligth (?), must be connected to 3,3 volt too ?
I am sorry for basic question, but i am just starting use micropython, i am only a developper...
my code :
Code: Select all
from machine import SPI, Pin
import pcd8544
# WiPy (on Exp board, SD and User-LED jumper have to be removed!)
#SPI = machine.SPI(0) # GP14 (CLK) + GP16 (MOSI->DIN), User-LED jumper removed!
#RST = machine.Pin('GP24')
#CE = machine.Pin('GP12')
#DC = machine.Pin('GP22')
#LIGHT = machine.Pin('GP23')
# PWR = directly from 3V3 pin of the WiPy
#SPI = pyb.SPI(1)
#RST = pyb.Pin('Y4')
#CE = pyb.Pin('Y5')
#DC = pyb.Pin('Y3')
#LIGHT = pyb.Pin('Y2')
#PWR = pyb.Pin('Y1')
#
spi = pyb.SPI(1)
spi.init(baudrate=8000000, polarity=0, phase=0)
cs = pyb.Pin('Y5')#Pin(2)
dc = pyb.Pin('Y3')#Pin(15)
rst = pyb.Pin('Y4')#Pin(0)
# backlight on
bl = pyb.Pin('Y2',pyb.Pin.OUT, value=1) #Pin(12, Pin.OUT, value=1)
lcd = pcd8544.PCD8544(spi, cs, dc, rst)
# test pattern (50% on)
lcd.data(bytearray([0x55, 0xAA] * 42 * 6))
......
Re: Driver for LCD display Nokia 5110
Change Din <=> Y7 to Din <=> Y8.
Y7 = miso
Y8 = mosi
vcc should be connected to 3v3. This is how you power the display.
BL is the led backlight behind the display. You can either connect it to a GPIO pin and control it with software, or connect it to 3v3 to have it always lit. The display is readable without the backlight, so it's optional.
Try calling lcd.reset() and lcd.init().
Y7 = miso
Y8 = mosi
vcc should be connected to 3v3. This is how you power the display.
BL is the led backlight behind the display. You can either connect it to a GPIO pin and control it with software, or connect it to 3v3 to have it always lit. The display is readable without the backlight, so it's optional.
Try calling lcd.reset() and lcd.init().
Re: Driver for LCD display Nokia 5110
Ok,
i change Din
I look at my code, I think the problem must come from there. This time it seems to work better the BL reacts.
When i test lcd.init () the program stop
i change Din
I look at my code, I think the problem must come from there. This time it seems to work better the BL reacts.
When i test lcd.init () the program stop
Code: Select all
import pyb
from pyb import LED
from pyb import SPI #, Pin
import upcd8544 #pcd8544
##
# WiPy (on Exp board, SD and User-LED jumper have to be removed!)
#SPI = machine.SPI(0) # GP14 (CLK) + GP16 (MOSI->DIN), User-LED jumper removed!
#RST = machine.Pin('GP24')
#CE = machine.Pin('GP12')
#DC = machine.Pin('GP22')
#LIGHT = machine.Pin('GP23')
# PWR = directly from 3V3 pin of the WiPy
#SPI = pyb.SPI(1)
RST = pyb.Pin('Y4')
CE = pyb.Pin('Y5')
DC = pyb.Pin('Y3')
LIGHT = pyb.Pin('Y2')
PWR = pyb.Pin('Y1')
##
#spi = pyb.SPI(1)
#spi.init(baudrate=8000000, polarity=0, phase=0)
spi = SPI(1,SPI.MASTER,baudrate=8000000, polarity=0, phase=0)
cs = pyb.Pin('Y5')#Pin(2)
dc = pyb.Pin('Y3')#Pin(15)
rst = pyb.Pin('Y4')#Pin(0)
## backlight on
bl = pyb.Pin('Y2',pyb.Pin.OUT, value=1) #Pin(12, Pin.OUT, value=1)
#lcd = upcd8544.PCD8544(spi, cs, dc, rst)
lcd = upcd8544.PCD8544(spi, RST, CE, DC, LIGHT)
lcd.reset()
lcd.init()
# test pattern (50% on)
#lcd.data(bytearray([0x55, 0xAA] * 42 * 6))
led = LED(4) # for testing code
led.on()