Most of my experience is with the Parallax Propeller from many moons ago. That's why I got elected for this project. I used the SPI interface to talk to the Parallax displays, but never used any I2C until now.
Mechanically, I have the capacitors in the right spots and I did put the resisters in there until you noted the Pyboard already has them (I'm used to Propellers where I do everything).
Y11 - Pin 1
Y10 - Pin 3
Y9 - Pin 2
Main sources of information:
Page 12, http://www.newhavendisplay.com/specs/NH ... W-3V3M.pdf
page 41, http://www.newhavendisplay.com/app_notes/ST7036.pdf
- I don't understand the initialization sequence. The external reset is low, then high, then low? Or the other way around? For how long?
- When scanning for the address, would this work since I only have one address? address = i2c.scan()
- Page 12 of the spec sheet has an entire initialization sequence. Do I really need all that and do I understand the Pyboard equivalent?
I2C_Start(); == i2c = I2C('Y', freq=380000)
I2C_out(Slave);//Slave=0x78 == i2c.writeto(0x78) or i2c.writeto(slave) if slave = 0x78
I2C_out(Comsend);//Comsend =0x00 What's this command for?
I2C_Stop(); Needed? What's the equivalent?
This is the most I've come up with so far:
from pyb import Pin, ADC, UART # load resources
from machine import I2C
i2c = I2C('Y', freq=380000) # create I2C object on the X side
reset_pin = Pin('Y11', Pin.OUT) # configure Y11 as the external reset pin for the LCD
reset_pin.low() # set Y11 to Low
pyb.delay(1000) # pause for 1 second to allow everything to power on
reset_pin.high() # external reset
pyb.delay(50) # wait >40uS after power up and external reset
i2c.writeto(0x78, 'hello') # write 'hello' to LCD at address 0x78