Search found 25 matches
- Mon Oct 14, 2019 4:15 pm
- Forum: Drivers for External Components
- Topic: Using Standard HD44780 LCDs on LoPy4
- Replies: 21
- Views: 16334
Re: Using Standard HD44780 LCDs on LoPy4
@Robert, I had directly tested your modified code, it was still not working. However, your modification gives enough clues (using the i2c.writeto_mem function to write the command to the exact register.). I re-modified the driver as below, and it works perfectly. https://github.com/zhoumaomao11/pyth...
- Mon Oct 07, 2019 8:01 pm
- Forum: Drivers for External Components
- Topic: LCD160CR with Pycom boards
- Replies: 9
- Views: 5895
- Tue Oct 01, 2019 2:28 am
- Forum: Drivers for External Components
- Topic: LCD160CR with Pycom boards
- Replies: 9
- Views: 5895
Re: LCD160CR with Pycom boards
Yes both i2c and spi are required. I haven't looked in detail but it would appear that all the commands happen via i2c and pixel data by spi. There's an interrupt line that the driver doesn't appear to use, but I imagine it lets you get notified on touch events. (The driver just lets you query the ...
- Tue Oct 01, 2019 2:13 am
- Forum: Drivers for External Components
- Topic: Using Standard HD44780 LCDs on LoPy4
- Replies: 21
- Views: 16334
Re: Using Standard HD44780 LCDs on LoPy4
Hi Robert, I appreciate your detailed reply! Now I received the backpack with PCF8574 chip. It works perfectly with your modified esp8266_i2c_lcd.py in https://forum.pycom.io/topic/4841/1602-lcd-and-i2c-backpack-with-pycom. I haven't got your code tested for MCP23008 chip yet, but I will inform you ...
- Sat Sep 28, 2019 10:32 pm
- Forum: Drivers for External Components
- Topic: Using Standard HD44780 LCDs on LoPy4
- Replies: 21
- Views: 16334
Re: Using Standard HD44780 LCDs on LoPy4
Besides that, I just noticed that there seems to be a adafruit version made by Dave: https://github.com/dhylands/python_lcd/blob/master/lcd/pyb_i2c_adafruit_lcd.py. That one looks better. This one looks specifically designed for the pyboard. from lcd_api import LcdApi from pyb import I2C from pyb i...
- Sat Sep 28, 2019 10:07 pm
- Forum: Drivers for External Components
- Topic: Using Standard HD44780 LCDs on LoPy4
- Replies: 21
- Views: 16334
Re: Using Standard HD44780 LCDs on LoPy4
When you power on the LCD, even if it isn't connected to anything, you should see a row of black squares. If you don't see the black squares then that typically means that you need to adjust the contrast voltage until you see the black squares. If you don't see the black squares the you won't see t...
- Sat Sep 28, 2019 9:38 pm
- Forum: Drivers for External Components
- Topic: Using Standard HD44780 LCDs on LoPy4
- Replies: 21
- Views: 16334
Re: Using Standard HD44780 LCDs on LoPy4
It's either a problem with supply or the control signals. Q1: What is the value of Vcc for the LCD. It has to be 5V. Q2. For comparison: which Arduino code are you using for the test? A1: I supply 5V to the MCP23008 backpack mounted on the back of LCD. A2: I run the HelloWorld_i2C.ino in the Adafru...
- Sat Sep 28, 2019 4:11 pm
- Forum: Drivers for External Components
- Topic: Using Standard HD44780 LCDs on LoPy4
- Replies: 21
- Views: 16334
Re: Using Standard HD44780 LCDs on LoPy4
Thank you for pointing out my silly problem! Now, there is no error anymore, I can see the returns in the REPL, rst:0x7 (TG0WDT_SYS_RESET),boot:0x32 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3ff...
- Sat Sep 28, 2019 3:28 pm
- Forum: Drivers for External Components
- Topic: Using Standard HD44780 LCDs on LoPy4
- Replies: 21
- Views: 16334
Re: Using Standard HD44780 LCDs on LoPy4
Hi Roberthh, Sorry about my misleading comments! I added your codes and commented out the original codes (just my personal habits), which made the line number was not matching with yours anymore. Please see the codes below (As you can see, I did modify the DEFAULT_I2C_ADDR = 0x32): """Implements a H...
- Fri Sep 27, 2019 9:54 pm
- Forum: Drivers for External Components
- Topic: Using Standard HD44780 LCDs on LoPy4
- Replies: 21
- Views: 16334
Re: Using Standard HD44780 LCDs on LoPy4
@Roberthh Thank you again for your help! I modified the code based on your instruction. Part of test code (change to i2c = I2C()): def test_main(): """Test function for verifying basic functionality.""" print("Running test_main") i2c = I2C() lcd = I2cLcd(i2c, DEFAULT_I2C_ADDR, 4, 20) # for LCD 20*4 ...