Show Posts
Pages: [1]
1  Using Arduino / Displays / Re: 12864 ST7920 LCD + Universal Serial Digole: UART/IIC/I2C/SPI Adapter on: July 18, 2013, 11:45:34 am
I also received a 12864 LCD but mine has an I²C interface.
I have identified it on channel 68 (0x68) of the I²C bus.
After reading the forum and information about it at the website, I am even more confused on how to make it do anything.
If anyone has a basic example sketch to post, I would be very appreciative as I have found I learn best by picking apart other peoples examples then modifying them to my needs.

Thank you!
2  Using Arduino / Displays / Re: Multiple I²C (I2C) LCD Displays on: June 12, 2013, 10:18:34 pm
How Did you change the addresses of the I2C ? I bought 3 and they all have the same address and I cant change it.
I use three of these I got them off eBay.

I am using three 16x2 LCDs that were hacked out of old Networking equipment.
The 4th 16x2 LCD and I²C control board, I got together months ago, but I can't remember from where.
The chips used on the one I've been using for months and the three I got from the link above are completely different
so to run both in the same sketch, it requires both libraries and two different initialization codes.
If I initialize the older one with LiquidCrystal_I2C(0x20,16,2), the it doesn't respond but the others will.
It will only respond to LiquidCrystal (0) and in void setup() it will initialize with lcd.begin(16,2);

hope this clears it up a little.
3  Using Arduino / Displays / Re: Multiple I²C (I2C) LCD Displays on: June 12, 2013, 02:53:39 pm
Thanks to some great members from The Geek Group, it was brought to my attention that 3 of my I²C LCD Controllers required a different library than the I²C LCD Board I've had for the last couple months.

Now with a modified test sketch, I managed all 4 LCD's to display test messages simultaneously.

 * Displays text sent over the serial port (e.g. from the Serial Monitor) on
 * an attached LCD.
#include <Wire.h>
#include <LiquidCrystal.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal lcd0(0);
LiquidCrystal_I2C lcd1(0x21,16,2);  // set the LCD address to 0x20 for a 16 chars and 2 line display
LiquidCrystal_I2C lcd2(0x22,16,2);
LiquidCrystal_I2C lcd3(0x23,16,2);

void setup()
  lcd1.init();                      // initialize the lcd
  lcd2.init();                      // initialize the lcd
  lcd3.init();                      // initialize the lcd
  lcd0.print("Test 1");
  lcd1.print("Test 2");
  lcd2.print("Test 3");
  lcd3.print("Test 4");

void loop()
  // when characters arrive over the serial port...
  if (Serial.available()) {
    // wait a bit for the entire message to arrive
    // clear the screen
    // read all the available characters
    while (Serial.available() > 0) {
      // display each character to the LCD
4  Using Arduino / Displays / Re: Multiple I²C (I2C) LCD Displays on: June 10, 2013, 03:19:00 pm
That's the thing. I don't know.
I want to learn but there aren't too many places I can find.
5  Using Arduino / Displays / Re: Multiple I²C (I2C) LCD Displays on: June 10, 2013, 02:41:47 pm
This is a straight forward sketch that doesn't work.
I think it gets the point across of what I'm trying to do.
I have never tried to do multiple addresses on I²C before.
this is all just experimentation for possible future projects.

#include <LiquidCrystal.h>
#include <Wire.h>
LiquidCrystal lcd(0);
LiquidCrystal lcd1(0x21);
LiquidCrystal lcd2(0x22);
LiquidCrystal lcd3(0x23);

void setup() {
  Wire.beginTransmission (0x21);
  Wire.endTransmission (0x21);
  Wire.beginTransmission (0x22);
  Wire.endTransmission (0x22);
  Wire.beginTransmission (0x23);
  Wire.endTransmission (0x23);
6  Using Arduino / Displays / Multiple I²C (I2C) LCD Displays on: June 10, 2013, 02:16:24 pm
I have 4 16x2 LCD Displays all connected to the same I²C bus.
Their addresses are 0x20, 0x21, 0x22, & 0x23.
I am trying to get them to all show different information at the same time but the only one I can get to do anything is the one at 0x21.
I currently don't have any example sketched as I am trying to modify existing incomplete sketches.

I use the #include <LiquidCrystal.h> & #include <Wire.h> libraries.
I tried to use Wire.beginTransmission (0x21); & Wire.endTransmission (0x21); along with lcd.clear(); & lcd.write("Hello"); to no avail.
My LCD remains unresponsive.

I know it's a software issue. I just can't figure out the code, nor can I find an example code for using multiple LCD Displays.

Any help would be appreciated.
7  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: April 09, 2013, 09:25:50 am
Last night, I got this message. I re-enabled the two lines in question then resent the time code.
I then applied external power and removed the Serial Line and shut down my computer to leave it running without the computer.
It ran all night. I just got home from work and turned on my computer. The Arduino Clock is still in perfect sync with my PC.
It is displaying all the correct information.

Thank you for your help!
8  Using Arduino / Programming Questions / Re: Time and TimeAlarms Libraries – Ask here for help or suggestions on: April 08, 2013, 09:47:29 am
I'm sorry if this has been covered but I couldn't find it.
I modified the 'TimeSerialDateStrings' to include a 16x2 I²C LCD Display.
It seems to display okay for a minute, but then seems to get erroneous data causing it to display incorrect information.

It would start off displaying:
10:38:16 Mon
Apr 08, 2013

but after a minute it would change to something seemingly random like:
21:11:26 Fri
Aug 29, 2104

and it doesn't do this once. I haven't been able to get a time interval of when these errors occur, but if I could get some help fixing them, it would be appreciated. I have also seen it display years that contain 5 digits. That may have been an alignment issue tho.

 * TimeSerialDateStrings.pde
 * example code illustrating Time library date strings
 * This sketch adds date string functionality to TimeSerial.pde
#include <Time.h> 
#include <Wire.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(0); //I²C

#define TIME_MSG_LEN  11   // time sync to PC is HEADER followed by unix time_t as ten ascii digits
#define TIME_HEADER  'T'   // Header tag for serial time sync message
#define TIME_REQUEST  7    // ASCII bell character requests a time sync message

void setup()  {
  setSyncProvider( requestSync);  //set function to call when sync required
  Serial.println("Waiting for sync message");

void loop(){   
  if(Serial.available() )
  if(timeStatus()!= timeNotSet)
  //delay(1000); //Disabled because I am not sending time to the Serial Monitor.
                 //I'm sending it to an LCD and the 1 second delay causes it to apear like it skips 1 second every 11 seconds even tho it really doesn't.

void digitalClockDisplay(){
  // digital clock display of the time
  lcd.print(" ");
  lcd.print(" ");
  lcd.print(" ");
  lcd.print(", ");

void printDigits(int digits){
  // utility function for digital clock display: prints preceding colon and leading 0
  //lcd.print(":"); //seemed to be getting in the way, nut I may be wrong
  if(digits < 10)

void processSyncMessage() {
  // if time sync available from serial port, update time and return true
  while(Serial.available() >=  TIME_MSG_LEN ){  // time message consists of a header and ten ascii digits
    char c = ;
    if( c == TIME_HEADER ) {       
      time_t pctime = 0;
      for(int i=0; i < TIME_MSG_LEN -1; i++){   
        c =;         
        if( c >= '0' && c <= '9'){   
          pctime = (10 * pctime) + (c - '0') ; // convert digits to a number   
      setTime(pctime);   // Sync Arduino clock to the time received on the serial port

time_t requestSync()
  //return 0; // the time will be sent later in response to serial mesg
Pages: [1]