Pages: 1 [2]   Go Down
Author Topic: RTC to 4Bit LCD  (Read 1791 times)
0 Members and 1 Guest are viewing this topic.
Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Won't compile?  If you have Arduino 0012 and this won't compile, there is something else wrong and it has nothing to do with your LCD.  What's the error message?

Mikal
« Last Edit: January 27, 2009, 03:49:00 pm by mikalhart » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 127
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oops sorry let me be abit clearer.

I got the RTC working and displaying on my LCD ( Thanks so much ).

No i want to map out the cursor positions on my lcd but everything i try just puts the cursor in random places.

here is my sample code:

#include <LiquidCrystal.h>

// LiquidCrystal display with:
// rs on pin 12
// rw on pin 11
// enable on pin 10
// d0, d1, d2, d3 on pins 5, 4, 3, 2
LiquidCrystal lcd(11, 13, 12, 7, 8, 9, 10);

void setup()
{
  // Print a message to the LCD.
  lcd.clear();
  lcd.setCursor(54,5);
  lcd.print("XX");
}

void loop()
{
}
  now i expect it to go to row 4, col 5. But it places it row 2, col 1???

am i missing something here???
Logged

Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Am I missing something?
1. Rows and cols are numbered beginning with 0.
2. It's setCursor(column first then row)
3. 54?

smiley
« Last Edit: January 27, 2009, 04:53:10 pm by mikalhart » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 127
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so i just put in:

  lcd.clear();
  lcd.setCursor(01,15);
  lcd.print("XX");
}

and it places my cursor on row 4, col 6

any ideas why its not placing it on row 1, col 5????
Logged

Austin, TX USA
Offline Offline
God Member
*****
Karma: 4
Posts: 997
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want row 1, col 5, do

Code:
lcd.setCursor(4, 0);

not

Code:
lcd.setCursor(01, 15);
« Last Edit: January 27, 2009, 04:56:02 pm by mikalhart » Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 127
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

screen is blank????

I had it mapped our great in 4bit mode. now i cant get anything that is logical! lol

any other ideas?
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 127
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i dont have to put the numbers in hexidecimal do i?
Logged

Pages: 1 [2]   Go Up
Jump to: