initialization

The LCD and Keypad Shield gives you a handy 16-character by 2-line display, 5 buttons and a controllable backlight.
Post Reply
2ndTime
Posts: 17
Joined: Wed Jan 21, 2015 4:21 am

initialization

Post by 2ndTime » Fri Jan 23, 2015 5:50 pm

Hello
Part 1
does anybody know all (if any) the commands for the “LCD & Keypad Shield” or know where they are. such as lcd.begin(16, 2); what is the variable 16 &/or 2 for that matter.

Part 2
Or does anybody have the initialization instructions, I have done a few initializations for other LCD units and all it was learning or re-leaning how to do it, but basically a piece of cake once you follow instructions but the Freetronics “LCD & Keypad Shield” has me beat after spending many hours, so you don't have to use the #include <LiquidCrystal.h> one idea is to look into LiquidCrystal.h and work it out for myself

This the 2nd time because the first I could not log on to post my question

2ndTime
Posts: 17
Joined: Wed Jan 21, 2015 4:21 am

Re: initialization

Post by 2ndTime » Fri Jan 23, 2015 6:14 pm

OK I found the answer for part 2 "4-bit interface mode (Condition: fosc = 270KHZ)" in the pages of the datasheet KS0066U I found the link on a thread to a different question.

However I think I have tried these before, it Initializes alright until you turn of the power then reapply the power, but I will give it another go.

2ndTime
Posts: 17
Joined: Wed Jan 21, 2015 4:21 am

Re: initialization

Post by 2ndTime » Fri Jan 23, 2015 8:17 pm

OK I think I worked out what lcd.begin(16, 2) is all about 16 = 16 columns 2=Rows I guess it is too hard to put comments in the software e.g.
void setup()
{
lcd.begin(16, 2); /* 16 = 16 columns, 2=Rows */
lcd.print("hello, world!");
}


and stop people asking stupid questions & wasting time.

I still can not initialize the LCD with my own code.

2ndTime
Posts: 17
Joined: Wed Jan 21, 2015 4:21 am

Re: initialization

Post by 2ndTime » Fri Jan 23, 2015 8:44 pm

I take it
LiquidCrystal lcd( 8, 9, 4, 5, 6, 7 );

is the equivalent to
#define E 9 // enable
#define RS 8 // register select

pinMode(E,OUTPUT); // enable
pinMode(RS,OUTPUT); // register select
pinMode(4,OUTPUT); // Data bit 4
pinMode(5,OUTPUT); // Data bit 5
pinMode(6,OUTPUT); // Data bit 6
pinMode(7,OUTPUT); // Data bit 7
Last edited by 2ndTime on Fri Jan 23, 2015 8:59 pm, edited 1 time in total.

2ndTime
Posts: 17
Joined: Wed Jan 21, 2015 4:21 am

Re: initialization

Post by 2ndTime » Fri Jan 23, 2015 8:57 pm

OK I worked it out & fixed it, I got E & RS around the wrong way, now I can write my own software for the LCD unit.

andrew
Freetronics Staff
Freetronics Staff
Posts: 978
Joined: Sun Jul 14, 2013 7:06 am
Location: Melbourne, Australia
Contact:

Re: initialization

Post by andrew » Sat Jan 24, 2015 6:06 am

2ndTime wrote:OK I worked it out & fixed it, I got E & RS around the wrong way, now I can write my own software for the LCD unit.
All the details for the LCD Keypad shield can be found on or from the product page:
http://www.freetronics.com.au/products/ ... pad-shield

http://www.freetronics.com/pages/16x2-l ... tart-guide

If you have any more questions please let us know.
cheers
John

2ndTime
Posts: 17
Joined: Wed Jan 21, 2015 4:21 am

Re: initialization

Post by 2ndTime » Sat Jan 24, 2015 7:00 am

Top link works I have seen it before.

bottom link is a error, (i have seen lots of errors before)

andrew
Freetronics Staff
Freetronics Staff
Posts: 978
Joined: Sun Jul 14, 2013 7:06 am
Location: Melbourne, Australia
Contact:

Re: initialization

Post by andrew » Sat Jan 24, 2015 11:52 am

2ndTime wrote:Top link works I have seen it before.

bottom link is a error, (i have seen lots of errors before)
The link to the quickstart guide is correct.
Where are you seeing the error?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest