Pages: [1]   Go Down
Author Topic: A strange 16 X 1  (Read 852 times)
0 Members and 1 Guest are viewing this topic.
Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys;

I have this display that I bought for $2 can at a surplus store. It look like a 16 X 1. No datasheet ( I try to find it ) So I find a datasheet of a different display ( parallel type ) and maybe the pinout are standard ? Ok, I look at this tutorial to how to connect a LCD - parallel type http://www.ladyada.net/learn/lcd/charlcd.html   Guess what ?  IT WORK !! But not realy. I saw "Hello World" and the seconds. Hello word was cut off, and the second start next to it.  ???  Mmm ??? So I modify the program "Hello World" and here the code and a picture. It work better in this mode. I just don't want to throw away this LCD. I guess I will not.

Code:
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd( 7, 8, 9, 10, 11, 12);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.print("12345789");
}

void loop() {
  // set the cursor to column 0, line 1
  // (note: line 1 is the second row, since counting begins with 0):
  lcd.setCursor(0, 1);
  // print the number of seconds since reset:
  lcd.print("12345678");
}
 



* onelineLCD.jpg (1158.54 KB, 1963x1220 - viewed 13 times.)
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I think 16X1 display organizes it memory like a 8X2 display so the first 8 characters are line 1 and the next 8 are line 2.
Logged


Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Humm... That will explain. So therefore when I use this LCD, I have to bear in mind "this" feature during programing and display info / data. Well at least, it was a twonnie well spend. ( the $ 2 coin canadian term )
 
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

$2 yes, definitely good buy. If you need to display more info, go for a 16X2 or 20X4 display. Here is a couple of shields I designed just in case you're interested;)

http://www.inmojo.com/store/liudr-arduino-and-physics-gadgets/item/phi-2-interactive-arduino-shield-2004/

http://www.inmojo.com/store/liudr-arduino-and-physics-gadgets/item/phi-2-interactive-shield-for-arduino/
Logged


Western New York, USA
Offline Offline
Faraday Member
**
Karma: 26
Posts: 4118
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I think 16X1 display organizes it memory like a 8X2 display so the first 8 characters are line 1 and the next 8 are line 2.
Not all 16x1 displays, just the vast majority of them.

This is why I find it so incredibly unusual to have the LiquidCrystal library default to a "1-line" configuration if the lcd.begin statement is left out.  Virtually every display in use by Arduinoists requires a "2-line" configuration, including most of the 16x1 displays.  For more information about this follow the LCD Addressing link at http://web.alfredstate.edu/weimandn.

Don
« Last Edit: July 29, 2011, 07:17:31 pm by floresta » Logged

Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@liudr

Thanks for the link. Impressive work. I have already 3 16X2 and 1 20X2. <--- I need a new heathers, not the one who fit the breadboard but smaller one. I don't know where to get it ..and some "adapter" to fit into 0.1.

@floresta

Thank for the link about the LCD addressing. I will read it.



Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What parts do you want to fit the headers on? (did you mean header?)
Logged


Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

liudr, here a picture of what I am talking about. The 20X2 is the top ( small, don't fit the standard header. The bottom is the standard header. So I will like to use the 20X2 display. Not shoving wires into the header.


* pinsone.jpg (532.62 KB, 1614x1251 - viewed 4 times.)
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Measure the distance between the two farthest holes and see if you get 38mm. From the picture I suspect it is 2mm spacing.
Logged


Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes. The top one is 2mm and the bottom is larger. I know they don't fit so where can I find 2mm header and "adapter" to fit a breadboard ? Because the 2mm don't fit the breadboard.
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I wish I knew a part. tried googling 2mm 1" adapter and the first few hits don't seem to help much.

Can't you just use jumper wires like these?

http://www.pololu.com/catalog/category/68

or

http://dipmicro.com/store/ZY-800
Logged


Toronto, Canada
Offline Offline
Edison Member
*
Karma: 2
Posts: 1234
"Keep it R.E.I.L. - "Research, Experiment, Investigate and Learn"
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I will use wires to connect with that display ( 20X2 ) for the mean time. I will have to build an adapter to fit a breadboard.

Thank liudr for your help. You are LCD guy.  smiley-wink
Logged

Central MN, USA
Offline Offline
Tesla Member
***
Karma: 65
Posts: 6915
Phi_prompt, phi_interfaces, phi-2 shields, phi-panels
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I will use wires to connect with that display ( 20X2 ) for the mean time. I will have to build an adapter to fit a breadboard.

Thank liudr for your help. You are LCD guy.  smiley-wink

You're welcome. There are a few of us LCD guys/gals.
Logged


Pages: [1]   Go Up
Jump to: