Show Posts
Pages: 1 2 3 [4] 5 6 ... 293
46  Using Arduino / Displays / Re: LCD 16x2 right half won't work on: September 06, 2014, 10:21:36 am
Quote
Well, given both of those pictures are of the display that is "malfunctioning", it started to look like an initialisation fault and I was checking whether initialising it as the wrong display dimensions, such as accidentally defining it as LCD.begin(16,1) would cause that behaviour, but I am quite unable to replicate it.

Try doing that again because, as I mentioned above, that (the first photo) is precisely what should be displayed if you initialize a 16x2 as a 16x1.  I haven't got an LCD set up right now but I'll check it out when I get a chance.

Don
47  Using Arduino / Displays / Re: LCD 16x2 right half won't work on: September 06, 2014, 10:16:51 am
Your first photo shows the typical result of a display that has not been correctly initialized.

If you just connect pins 1, 2, and 3 of a 16x2 display you will get that picture because the internal reset circuit sets up the controller for a 1-line display.

If you connect all of the required pins and run a proper initialization routine then the display will be blank or all of the character positions will show blocks (depending on the contrast setting).

If one or more wires are incorrectly connected (this would include poor soldering) or if you do not run a proper initialization routine then you will get one row of blocks on a two row display, two rows of blocks on a four row display, or if you have a true 16x1 display (very rare) eight blocks on the left and 8 blank spaces on the right.

In your case I would look into the soldering -  it looks pretty bad.  Check out this information from Adafruit --> https://learn.adafruit.com/adafruit-guide-excellent-soldering/common-problems

Your second photograph shows the typical results of a display with a poor connection between the pc board and the display.  Try pressing (lightly) on the display bezel and see if things change.


Don
48  Using Arduino / Displays / Re: LCD 2*16 WOULDN'T WORK WITH ARDUINO MEGA on: September 04, 2014, 09:53:50 pm
Quote
IT SHOW ME SQUARE
What exactly does this mean?  You will get a single row of 16 rectangles if the initialization is incorrect but you won't see them if pin 3 is left open.

I think it is time for you to disconnect everything and start again.

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.
49  Using Arduino / Displays / Re: LCD text wrapping function help on: September 04, 2014, 06:55:41 pm
Quote
... but the LCD im using likely wont work because its controlled via I2C  ...

In general you will get appropriate responses more quickly if you put tidbits of information like that in the topic title.

Don
50  Using Arduino / Displays / Re: LCD text wrapping function help on: September 04, 2014, 05:09:57 pm
Why don't you take a look at the LiquidCrystal1.0 library?  This library was actually written to deal with 40x4 displays but it works with smaller displays as well.  This library also compensates for the inherent LCD line wrap behavior so that it works as you would expect, 1--2--3--4.

To get a copy start here:--> http://code.google.com/p/liquidcrystal440/ and follow the Downloads link to get to the latest version.


Don
51  Using Arduino / Project Guidance / Re: Need advice for my EMG based arm robot on: September 04, 2014, 12:02:52 pm
Quote
EMG based arm robot 

I think you mean ARM based EMG robot
How do you come up with that interpretation when he clearly said "The robot will be controlled wirelessly through the sensors (EMG pads) which will be put on my arm. "  ?

Don
52  Using Arduino / Project Guidance / Re: Arduino rpm control, rc dle engine on: September 03, 2014, 09:03:18 pm
Quote
The engine works with cdi ignition which has a connection(3 wires like servo connection) to an external tachometer (rpm meter)
How can I connect the ignition box to the arduino to get the rpm?

What he really needs to provide is more information about the CDI system.

The information he needs is already present on the three wires (probably the white one) going to the display.  That information is most likely in the form of pulses related to the RPM although it could possibly be serial speed data already converted in the big silver box.


Don
53  Using Arduino / Displays / Re: Problems with currect displaying on LCD on: September 03, 2014, 07:57:02 pm
This is a common problem with several solutions.  You have to 'erase' any three digit number before trying to display a two digit number otherwise part of the previous value remains on the screen.

In my opinion the most straightforward technique is:
- position the cursor
- display three [space] characters (0x20)
- reposition the cursor
- display your new value

Old:
    lcd.setCursor(0,1);
    lcd.print(pos);


New:
    lcd.setCursor(0,1);
    lcd.print("   ");
    lcd.setCursor(0,1);
    lcd.print(pos);


Don
54  Using Arduino / Displays / Re: LCD tutorial hello world on: September 03, 2014, 07:49:57 pm
Get the battery (or a second power supply) connected permanently and then troubleshoot the new problem.  You may find that it goes away when you keep your hands away from the wiring.

Don
55  Using Arduino / Displays / Re: i2c address mystery solved! on: September 03, 2014, 11:24:18 am
After getting my LCD05 to work, I emailed Devantech support.  And they shed some light on the i2c address situation.

Apparently it is very simple, Arduino ignores the lowest bit in the i2c address, so my device's address is 0xC6, which in binary is 11000110.  However, if you ignore the lowest bit, it becomes 1100011, which is 0x63.

I am going to suggest that they put this bit of critical information into the documentation, cause for n00bs like myself, this took forever to figure out.


It would be better if they (Devantech) were to learn more about I2C addressing and use the correct terminology.

I2C addresses are only seven bits long so when correctly padded out to fit in an 8-bit byte the high bit will always be 0.  As a result there are no I2C addresses larger than 0x7F.

In use the 7-bit I2C address is shifted to the left and the resulting available bit at the right is used to determine the direction of data flow.  A zero indicates a 'write' and a one indicates a 'read'.

In your case the I2C address of the device is 0b01100011 or 0x63.  When it is operating as a slave device and you are writing to it then the shifted slave address for writing is 0b11000110 or 0xC6.  When it is operating as a slave device and you are reading from it then its slave address for reading is 0b11000111 or 0xC7.

Since the direction of data travel is determined by the software it should be the software that does the shifting and filling in of the least significant bit.  In my opinion the writer of the software library should always have the user supply the actual unshifted 7-bit I2C address.

It seems to me that the manufacturers of the I2C devices have conspired to make this address almost impossible to find in their datasheets - but that is a different problem.


Don
56  Using Arduino / Displays / Re: LCD tutorial hello world on: September 03, 2014, 08:00:38 am
Tinkering with the backlight won't help here.  Most likely you have an 'extended' temperature range LCD module.  Most of those require a negative voltage (with respect to GND) at pin 3.

You can check this out with the help of a small battery.  Disconnect the end of your potentiometer from GND and connect it to the negative end of your battery.  Connect the positive end of the battery to GND.  Now you can use the potentiometer to lower the voltage at pin 3 below 0 volts and see if the display improves.


Don
57  Using Arduino / Displays / Re: LCD 2*16 WOULDN'T WORK WITH ARDUINO MEGA on: September 02, 2014, 05:47:41 pm
Quote
any idea ? why  ?

Yes.  Use your magic globe to figure out what I have in mind.

Don
58  Using Arduino / Displays / Re: 20 x 4 display with I2c - text overflow on: September 02, 2014, 08:22:33 am
Quote
However when my text overflows the end of one line it continues on line 3.

Is that normal?

Yes it is normal.  For a complete description of what is happening follow the LCD Addressing link at http://web.alfredstate.edu/weimandn.


Don
59  Using Arduino / Displays / Re: Nano/Duemilanove compatible displays. on: September 01, 2014, 06:44:07 pm
Quote
Do you think you could bring yourself to at least specify GRAPHICS display as opposed to lcd ?

Where did he even mention LCD?

Don

Edit: No I am not an idiot.  The post to which this one refers seems to have been deleted by the author raschemmel.
60  Using Arduino / Displays / Re: ShiftLCD and wire length on: September 01, 2014, 05:46:22 pm
Quote
Someone should really revise the ShiftOut tutorial page.  The filter cap should be across the power pins of the shift register instead.
This has proven to be impossible -- we have been trying for years.

The Arduino tutorial pages are the internet equivalent of the 'Roach Motel' from the old Black Flag ads.  The tag line was "Roaches check in, but they don't check out!"


Don
Pages: 1 2 3 [4] 5 6 ... 293