Has anyone designed a HD44780 2-wire (or 3-wire) LCD interface?
Has anyone got an example code in picbasic?
Has anyone designed a HD44780 2-wire (or 3-wire) LCD interface?
Has anyone got an example code in picbasic?
TX side - SEROUT directly replaces LCDOUT (pick your serial transmit format, i.e. baud rate, parity, etc)
RX side - SERIN data feeds byte information directly to LCDOUT (again, pick your serial receive format to math the transmit side)
3 wires - power, ground, serial transmit data
2 Wire: The master side may use I2CWRITE. On the slave side, you will need to build your OWN I2C routine, using the MSSP or Bit banging. Maybe you could use some part of the following...
http://www.melabs.com/resources/samp...p/i2cslave.bas
Still possible to set a PIC USART in Synchronous mode.
3 wire: The master side may use SHIFTOUT. On the slave side, same rule apply..
http://www.melabs.com/resources/samp...p/spislave.bas
To me, a 1 wire solution is more valuable. But if your board already have a I2C bus... it's tempting to use it.
Last edited by mister_e; - 5th June 2007 at 14:02.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Can it be done without using a PIC on the slave side?
Like 12F629 --> Shift register --> LCD
Yes the shift register could work... As long as you can deal with the limitations. It's a cheap an proved to work solution so far.
anyway, here's the link Skimask talked about http://www.myke.com/lcd.htm
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
mister-e , in the "C" psuedo-code give on the link mentioned above ,
This is what i understood so far.
To send any data to the LCD, the "LCDNybble" function has to be called twice with the character / command data in the variable "Nybble".
The Nybble variable should be fed with the corresponding upper and lower bits sequentially.
Does the "LCDNybble" function take care of pulsing the E pin of LCD?
Myke has mentioned that before strobing the E pin, a 450ns pause is necessary.
Will PAUSEUS 1 work?
Last edited by shahidali55; - 6th June 2007 at 13:43.
Bookmarks