Show Posts
Pages: 1 [2] 3 4 ... 284
16  Using Arduino / Displays / Re: LCD black boxes problem! on: July 23, 2014, 10:21:05 pm
Quote
Maybe I need to disconnect the display while uploading the code. I read this elsewhere on the forum, please guide me about that too.
This would be a suggestion only if you are using pins 0 and 1.

I have no clue about your 'solution'.


Don
17  Using Arduino / Displays / Re: HD44780 LCD being sent incorrect data on: July 22, 2014, 09:57:32 pm
Quote
As of now, connecting the LCD like this (Pin1 to 5V, Pin2 to GND, Pin3 to GND) does not display the test display row of black squares that is expected.

Quote
I have not:
☺shorted the LCD
☺swapped the 5V and GND on the LCD

I have seen at least one datasheet for a device with +5V on pin 1 and GND on pin 2 but the vast majority are the other way around.  You haven't identified your device so we can't check this part out.

Quote
Does it matter that I am running the display in 4 bit mode and leaving the other 4 bits' date lines disconnected?
No.

It's time to start over.
Here is my generic step by step approach that should work:

(1) If the module has a backlight then get it working properly.  This involves only pins 15 and 16 on most LCD modules.  Make sure to use a current limiting resistor if there is none on the LCD module.

(2) Get the power and contrast working properly.  This involves only pins 1, 2, and 3 on most LCD modules.  You should be able to just barely see blocks on one row of a two row display and on two rows of a four row display. 

NOTE:  The Arduino has not been used yet, except as a possible source for the power needed for the first two steps.  Do not try to go any further until this is working.  If you don't see the blocks then no amount of program code will help.

(3) Connect the LCD R/W pin (pin 5) to GND.

(4) Connect the six control and data wires between your LCD module and your Arduino.

(5) Upload your sketch and it should work.


Troubleshooting:

If you have a 16x1 display and there are blocks only on the left half of the row in step 2 then use lcd.begin(8, 2); in your sketch.

If you still don't get a display then make sure that your wiring matches the numbers in the descriptor (or vice versa).


Code:
//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

If you get a display but it is garbled or has some other problems then try again with a 'static' sketch, one that displays a simple message on the top row of the display and then stops.  All of your code should be in setup() and loop() should be empty between the brackets.

Code:
#include <LiquidCrystal.h>

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here

void setup()
  {
  lcd.begin(16, 2);                          // put your LCD parameters here
  lcd.print("hello, world!");
  lcd.setCursor(0,1);
  lcd.print("it works!");
  }

void loop()
  {
  }

If you are still having problems then we need to see a photograph of your setup that clearly and unambiguously shows all of the connections between your Arduino and your LCD module.  We also need a copy/paste version of the code that you are actually using, not a link to the code that you think you are using.

Don


18  Using Arduino / Displays / Re: LCD current draw on: July 22, 2014, 05:18:29 pm
Quote
And you need a 5k potentiometer between pin 3 and pin 15 to control the contrast.
Not exactly, since the potentiometer has three terminals.  I gave the connections in reply #25.

Quote
The contrast of the back light ?
No, the contrast of the LCD.

Don
19  Using Arduino / Displays / Re: LCD not displaying everything [FIXED] on: July 22, 2014, 08:03:10 am
My point is that they are the same as all the other I/O pins.  You don't have to deal with them any differently than you do any of the so called 'digital' pins.  They can even be accessed like the others, with the numbers 14-19.

Don
20  Using Arduino / Displays / Re: LCD current draw on: July 22, 2014, 07:54:53 am
Quote
... its not exacactly the same with the old one ...
Not many are.

Quote
And i will certainly need advice for the back light!!!
Make sure that we have information to get the correct datasheet so we don't waste as much time on this display as we did on the first.

Don
21  Using Arduino / Displays / Re: LCD not displaying eveything on: July 21, 2014, 07:47:28 pm
Quote
I can't see you have used any of the analogue pins, they can be used just as digital pins if you define them as inputs.
Why are you saying they have to be defined as inputs?  As far as I know they are just like all of the other I/O pins on the chip.  The only thing that makes them 'analog' pins is because the Arduino normally makes use of their "alternate port functions" (datasheet section 13.3).

Don
22  Using Arduino / Displays / Re: LCD current draw on: July 21, 2014, 07:24:19 pm
Quote
...as i posted before, the back light works fine through "A" and "K".
It's probably nice and bright also.  It is most likely the limited capacity of the power source that has prevented your backlight from self destructing.

Look at the circuit diagram on page 19 of the datasheet.


Quote
Should the back light turn on, if i connect pins 15-16 to power and ground , but with nothing else connected on the LCD ?
Yes, but without a current limiting resistor you are again relying on having a power supply with limited capacity to prevent your backlight from being destroyed.
No.  Look at page 6 of the datasheet.  Pin 15 is used to provide a negative voltage to ultimately drive pin 3, and pin 16 is not used.

Look at page 7 to see how to connect your contrast potentiometer.  One end goes to +5v, the other end goes to pin 15 (not GND), and the center goes to pin 3.


Quote
Because i  applied 5V on pin 15 and grounded pin 16, i didn't wire anything else at the LCD, and the back light didn't turn on !!! Should it ?
Same question --> same answer.

Don
23  Using Arduino / Displays / Re: LCD current draw on: July 21, 2014, 07:15:33 pm
So now that we know the real part number of the display (RC1602B-YHY-CSVD) we can look at the datasheet and get information about the backlight (in section 14 on page 19).

The 'note' on that page says this:
Note:  The LED of B/L is drive  by current only,  Drive voltage is for reference  only.  Drive voltage can make driving current under safety area (current between minimum and maximum).

This is entirely consistent with what I posted in reply # 19.  Basically, after you get past the fractured English, it is saying that the important consideration is the current rating.  If you try to drive it with a voltage source you may get too little current (and it won't light) or too much current (and it will light brightly, for a relatively short period of time).

Don
 
24  Using Arduino / Displays / Re: LCD black boxes problem! on: July 21, 2014, 02:02:08 pm
That is what the LCD display should look like after step 2 although your backlight looks quite bright.

Now go ahead with steps 3, 4, and 5.


Don
25  Using Arduino / Displays / Re: My lcd only show squares on: July 21, 2014, 01:57:35 pm
Your display has serious problems most likely due to poor connections between the LCD 'glass' and the pc board. 

These connections are made by 'zebra strips' and there have been numerous threads with information about them.

The search capabilities of this forum software is abysmal, even if you find the camouflaged search box.  Try the following Google search: "LCD zebra site:arduino.cc".


Don
26  Using Arduino / Displays / Re: 16x2 goes blank after few hours. on: July 21, 2014, 08:52:19 am
Quote
On several occasions I had the idea that the LCD went blank right after it turns of a relay which is powering an exhaust fan. Not sure if its related,  I just noticed it.

You should pursue this a bit further.  Temporarily replace your relay (and any other inductive devices you are controlling) with an LED and I think you will find that your problem goes away.

Don
27  Using Arduino / Displays / Re: Something wrong to my lcd to arduino on: July 21, 2014, 08:47:11 am
Quote
Those things have a memory, and can sometimes display the last junk that went to them whilst the wires were being pulled out by a shaky hand.
All of the LCD memory is volatile.  Although the display will remain if the data and/or control lines are disconnected it will not survive having the power removed.  Not even for a few seconds much less a few weeks.

Don
28  Using Arduino / Displays / Re: LCD not displaying eveything on: July 21, 2014, 08:40:44 am
The lcd.println() statement is going to give you problems even if you get everything else sorted out.

Don
29  Using Arduino / Displays / Re: LCD current draw on: July 20, 2014, 04:45:02 pm
Quote
i just said what is thew maximum voltage for the back light to operate according to the data sheet !!!

You still don't understand the difference between a 'rating' and a 'characteristic'.  

Once again, the 4.6 volts is not the maximum voltage that you can or should apply to the LED.  Rather, it is the maximum voltage drop that will appear across any of this type of LED when it is operating within it's ratings.  

If you have a box full of these devices and you measure the voltage across each of their backlight LEDs when they are operating within their ratings you can expect to measure a wide range of voltages, but none of them should be more than 4.6 volts.

What this actually means is that when you are selecting a power source you must make sure that it delivers more than 4.6 volts if you want to be certain that you can get every backlight to function.



Quote
The datasheet doesn't mention any current rating for the back light!!!

Did you look at reply #3 or #5?


Quote
Also , something i didn't say before, i tried twice to turn on the back light ,at 4V, by pins 15-16 and nothing happened!!!!

Because, as explained above, you must use a supply greater than 4.6 volts (with a current limiting resistor) to be sure to be able to get the LED to conduct.


Don
30  Using Arduino / Displays / Re: trying to understand the crystal library library on: July 20, 2014, 02:28:25 pm
Quote
well i understand what the digits on the right of the letter B are for , but not the letter B itself and the zero to its left
The initial zero is there to inform the compiler that this is a number.
The 'B' tells the compiler that this is a 'Binary' number.


Don
Pages: 1 [2] 3 4 ... 284