View previous topic :: View next topic |
Author |
Message |
pic.programmer
Joined: 30 Apr 2015 Posts: 29 Location: Banned - spammer
|
|
|
pic.programmer
Joined: 30 Apr 2015 Posts: 29 Location: Banned - spammer
|
Re: I2C LCD 4 bit |
Posted: Sun May 03, 2015 5:05 pm |
|
|
In the I2C_LCD_Chr() function, one can replace the switch statement with the below switch statement and use the code with a HD44780 and compatible 16x4 LCD.
Code: | switch(row){
case 1:
I2C_LCD_Cmd(0x80 + (column - 1));
break;
case 2:
I2C_LCD_Cmd(0xC0 + (column - 1));
break;
case 3:
I2C_LCD_Cmd(0x90 + (column - 1));
break;
case 4:
I2C_LCD_Cmd(0xD0 + (column - 1));
break;
}; |
Function Prototypes were not matching. Fixed project at below link.
http://www.mediafire.com/download/xn70miqs618lal5/I2C_LCD_rev1.rar
The I2C LCD module I mentioned has 3 SMD jumpers and by default it is set to 0x07. I don't know whether the SMD jumper settings can be modified or not, but if it can be changed then one can have like one DS1307 and 7 I2C LCDs on the same I2C bus and can display many datas. They can also use Big Fonts for LCD. I will soon post a new code which will display Big Fonts.
Also I am writing a code for 40x4 HD44780 compatible LCD with 4 bit interface and I2C interface. If I succeed, I will post them here. |
|
|
pic.programmer
Joined: 30 Apr 2015 Posts: 29 Location: Banned - spammer
|
|
|
pic.programmer
Joined: 30 Apr 2015 Posts: 29 Location: Banned - spammer
|
Re: I2C LCD 4 bit |
Posted: Mon May 04, 2015 12:48 am |
|
|
|
|
|
Gabriel
Joined: 03 Aug 2009 Posts: 1067 Location: Panama
|
|
Posted: Mon May 04, 2015 3:39 pm |
|
|
I'm not sure if a library tested in in Proteus is considered "working" code.
I think its funny that this is a library for a micro controller that talks to another micro controller to control the micro controller of an LCD.
"Yo dog, i heard you like micro controllers, so we put a micro controller on your micro controller's micro controller"
LOL.
G. _________________ CCS PCM 5.078 & CCS PCH 5.093 |
|
|
pic.programmer
Joined: 30 Apr 2015 Posts: 29 Location: Banned - spammer
|
|
Posted: Tue May 05, 2015 2:27 am |
|
|
No, the two LCD version is tested in hardware (mikroE's EasyPIC v7 board), but the 8 LCDs version is not tested in hardware because I don't have 8 LCDs with me, but the code has only small changes so that one can use any combination of 16x2, 16x4, 20x2 and 20x4 LCDs.
In the bangood I2C modules one has to short the jumper pins to connect them to GND. I tested it. I have 50 I2C modules but have to buy 6 more LCDs to test the code. |
|
|
bulentperktas
Joined: 11 Jul 2009 Posts: 2
|
Re: I2C LCD 4 bit |
Posted: Mon Jun 01, 2015 5:29 pm |
|
|
hi,
i am trying to understand following definition, what for these lines? While using 2 pin on microcontroller for I2C the bus?
thanks,
Bülent PERKTAŞ
Code: |
#define LCD_RS PIN_B4
#define LCD_EN PIN_B5
#define LCD_D4 PIN_B0
#define LCD_D5 PIN_B1
#define LCD_D6 PIN_B2
#define LCD_D7 PIN_B3
|
_________________ Bülent PERKTAŞ |
|
|
|