Page 1 of 1

Activating the LCD160 on top of the pyboard 1.1

Posted: Tue Feb 21, 2017 4:15 pm
by Ruedi
Hi there,
I'm pretty new with MicroPython and the Pyboard v1.1 and therefore still a bit unsafe.
I activated the board successful and then I tried to activate the LCD160CR. Unsuccessful. This is what I did:

Following the tutorial on micropython.org https://micropython-pfalcon.readthedocs ... _skin.html
I tried to activate

5. The LCD160CR skin

First I updated firmware successful with pybv11-20170219-v1.8.7-292-g3d739eb.dfu which was announced to be the newest on GitHub, using STs DfuSe_Demo_V3.0.5_Setup.exe. Then I continued using the Putty-console, following the tutorial

5.3. Testing the display

>>> import lcd160cr
>>> import lcd160cr_test
To run all tests: test_all(<lcd>)
Individual tests are: test_features, test_mandel
<lcd> argument should be a connection, eg "X", or an LCD160CR object
>>> test_all('Y')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'test_all' is not defined
>>>

I tried both positions X and Y, then I tried to awake the display again following the tutorial

5.6. Directing the MicroPython output to the display

>>> import pyb
>>> uart=pyb.UART('XA',115200)
>>> pyb.repl_uart(uart)

The result can be called no result, display shows no sign of life. Please help! What's wrong? What am I doing wrong?

Re: Activating the LCD160 on top of the pyboard 1.1

Posted: Tue Feb 21, 2017 6:57 pm
by tine3700
Please try:

>>> import lcd160cr
>>> import lcd160cr_test
>>> lcd160cr_test.test_all('X')
for the X-Position or
>>> lcd160cr_test.test_all('Y')
for the Y-Position

Re: Activating the LCD160 on top of the pyboard 1.1

Posted: Wed Feb 22, 2017 11:12 am
by Ruedi
This was the crucial advice, thank you tine3700

Re: Activating the LCD160 on top of the pyboard 1.1

Posted: Thu Feb 23, 2017 8:58 am
by Ruedi
Hi there, can someone help me with this subject:

In order to realize my display projects I want to get rid of the initially shown MicroPython logo and the display info. Tried these two setup commands: LCD160CR.set_startup_deco(value) and LCD160CR.save_to_flash() with the parameters pointed out in "MicroPython Documentation, Release 1.8.7, sheet #114 without success.

Will be thankful for any advice how to manage it?

Ruedi

Re: Activating the LCD160 on top of the pyboard 1.1

Posted: Thu Feb 23, 2017 11:10 am
by chuckbook
Try:

Code: Select all

lcd.write(b'\x02fn')
instead of:

Code: Select all

lcd.save_to_flash()

Re: Activating the LCD160 on top of the pyboard 1.1

Posted: Thu Feb 23, 2017 11:58 am
by Ruedi
Hi chuckbook, thanx for your advice, unfortunately not working.
This is the script I'm using it with:

>>>import lcd160cr
>>>lcd=lcd160cr.LCD160CR('X')
unwanted label and info are displayed
>>>lcd.write(b'\x02fn')
no change

Re: Activating the LCD160 on top of the pyboard 1.1

Posted: Thu Feb 23, 2017 2:04 pm
by Ruedi
>>>lcd.erase() did the job

Was hidden under MicroPython Documentation, Release 1.8.7, sheet 115, "Drawing primitive shapes". Should better be situated under "Setup Commands", as I would propose.

Re: Activating the LCD160 on top of the pyboard 1.1

Posted: Thu Feb 23, 2017 3:23 pm
by SpotlightKid
Feel free to submit a documentation PR on github.

Re: Activating the LCD160 on top of the pyboard 1.1

Posted: Thu Feb 23, 2017 9:20 pm
by chuckbook
You missed something:

Code: Select all

import lcd160cr
lcd=lcd160cr.LCD160CR('X')
lcd.set_startup_deco(0)			# this is important!!!
lcd.write(b'\x02fn')
lcd.set_power(0)
# wait a second...
lcd.set_power(1)
erase() just fills the screen with whatever color was selected by set_pen()

Re: Activating the LCD160 on top of the pyboard 1.1

Posted: Fri Feb 24, 2017 8:04 am
by Ruedi
Thanks a lot from a beginner, chuckbook