My little place on the web

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:lcd_module [2012/07/01 11:50]
elger
projects:lcd_module [2016/11/16 13:06] (current)
Line 6: Line 6:
 {{ :​projects:​sainsmart_iic-i2c-twi_serial_2004_20x4_lcd_back.png?​200|}} {{ :​projects:​sainsmart_iic-i2c-twi_serial_2004_20x4_lcd_back.png?​200|}}
  
-My display has a PCB on the back labled "​YwRobot Arduino LCM1602 ​IICV1" but it appears it is the same as the the one of [[http://​www.sainsmart.com/​sainsmart-iic-i2c-twi-serial-2004-20x4-lcd-module-shield-for-arduino-uno-mega-r3.html|sainsmart.com]]+My display has a PCB on the back labled "​YwRobot Arduino LCM1602 ​IIC V1" but it appears it is the same as the the one of [[http://​www.sainsmart.com/​sainsmart-iic-i2c-twi-serial-2004-20x4-lcd-module-shield-for-arduino-uno-mega-r3.html|sainsmart.com]]
 The only difference is the text on the back.  The only difference is the text on the back. 
  
-There were a few (simple) steps in getting the display to work, you just need to know what they are.+There were a few (simple) steps in getting the display to work, you just need to know what they are. The display is basically a HD44780 LCD display and an PCF8574 I2C-to-parrallel IC 
 + 
 +===== PIC Library ===== 
 + 
 +The code on this page is for an Arduino (compatible) microcontroller,​ however there is a PIC microcontroller library available too. 
 + 
 +I have never gotten around to working with a PIC, but I received an email from //MDP// wrote a library for the LCD display to be used on a PIC18F4550 
 + 
 +He has been kind enough to share this with the world, and he send me his code. You can download everything {{:​projects:​lcd_module:​sainsmart_i2c_adapter_files.zip|here}} 
 + 
 +//MDP// also wrote a more universal library for the PIC, one that is also compatible with the adapter labled "​mjkdz"​. You can download the files {{:​projects:​lcd_module:​lcd_pic_i2c_generic_driver-10.zip|here}} 
 + 
 +===== A demo =====
  
 But first, here is a demo of the LCD display But first, here is a demo of the LCD display
Line 32: Line 44:
 ===== The software ===== ===== The software =====
  
-<​page ​is being edited>+You need to remove the standard liquidcrystal library, rename the old folder to something else. You can read [[http://​www.arduino.cc/​playground/​Code/​Library|here]] how to replace a library. 
 + 
 +Next you need to install the liquidcrystal library that works. I found mine here: 
 +[[https://​bitbucket.org/​fmalpartida/​new-liquidcrystal/​downloads| fmalpartida/​new-liquidcrystal]] 
 +And there is also lots more information on the library [[https://​bitbucket.org/​fmalpartida/​new-liquidcrystal/​wiki/​Home|here]] 
 + 
 +I used their examples and came up with this little demo:
  
-<file cpp i2c_display.ino>​+<code cpp i2c_display.ino>​
 /* /*
     ** Example Arduino sketch for SainSmart I2C LCD2004 adapter for HD44780 LCD screens     ** Example Arduino sketch for SainSmart I2C LCD2004 adapter for HD44780 LCD screens
Line 40: Line 58:
  ** The LCD2004 module appears to be identical to one marketed by YwRobot  ** The LCD2004 module appears to be identical to one marketed by YwRobot
  **  **
- ** Address pins 0,1 & 2 are all permenantly ​tied high so the address is fixed at 0x27+ ** Address pins 0,1 & 2 are all permanently ​tied high so the address is fixed at 0x27
  **  **
  ** Written for and tested with Arduino 1.0  ** Written for and tested with Arduino 1.0
Line 402: Line 420:
 } }
  
-</file>+</code>