Show Posts
Pages: 1 ... 205 206 [207] 208 209 ... 284
3091  Using Arduino / Displays / Re: Truly MCC162A4-5 16x2 LCD display on: April 25, 2011, 09:08:18 pm
The photo that is needed is the one of your connections - the ones you made between the LCD module and the Arduino.  In the case of the LCD on a shield then we would need to have a link to information about the shield.  I need to see the code to make sure that it matches the specific connections that you made or that are made by the shield.  If you don't think that this information is necessary because you know that your connections are correct then I suggest that you check back through the forum posts for the past few years and see how many others have made the same claim.  

Quote
What I'd really like to know is whether anyone has bought a generic
LCD shield off eBay, the kind that the seller specifies LCD4Bit_mod
for. And if one of those shields was made to work with the LiquidCrystal
library. And if so, how.
I've run into several of these in the past few years and the solution has always included the use the LiquidCrystal library instead of the LCD4bit library.  I don't make this stuff up as I go along, my recommendations to you are based on feedback from those I have helped in the past.  That is one of the reasons that I would like to resolve your problem with the LiquidCrystal library.  

In the past there were a lot of problems with people forgetting to deal with the RW pin. A little over a year ago I convinced Tom Igoe to emphasize this need in the tutorial.  He added the comment "* LCD R/W pin to ground" in the circuit description and the problem magically went away for the most part.

Another problem that comes up is the implementation of the initialization command.  It is covered quite well under 'Syntax' here http://arduino.cc/en/Reference/LiquidCrystalConstructor but I guess that not too many LCD beginners look there.  One additional comment in the example would help a lot.  
// initialize the library with the numbers of the interface pins
// LiquidCrystal(rs, enable, d4, d5, d6, d7);
                         <------------- This one
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

By the way I just noticed that the page with the syntax information has the same problem that the tutorial used to have, it states that the use of the RW connection to the Arduino is optional but it doesn't say that the pin has to be grounded if you don't connect it to the Arduino.


Don
3092  Using Arduino / Displays / Re: Truly MCC162A4-5 16x2 LCD display on: April 25, 2011, 04:31:58 pm
Now that you know that your display is good you will be a lot better off in the long run if you abandon LCD4bit and get your display working with LiquidCrystal.  It doesn't surprise me that neither of your displays work with LiquidCrystal right now, you are probably having the same problem with both of them.  If you post your code and the photograph that I have already requested twice we can probably get your problem resolved very quickly. 

Don
3093  Using Arduino / Displays / Re: Truly MCC162A4-5 16x2 LCD display on: April 25, 2011, 02:24:05 pm
Quote
It wasn't the wiring, it was the software. Using the Adafruit example, but loading
the LCD4Bit_mod library,
Did you look at the official Arduino page for this library at http://www.arduino.cc/playground/Code/LCD4BitLibrary?  You would have to be blind to miss this text:
An old 4-bit LCD library (now
redundant)

Do not use this library


If you look at the actual code you will see comments such as:
"//DB should be an unseparated group of pins  - because of lazy coding in pushNibble()"
"// pause 1 ms.  TODO: what delay, if any, is necessary here?"
"//TODO: perhaps better to add a delay after EVERY command, here.  many need a delay, apparently."

They don't really inspire confidence, do they?


Quote
it didn't work with RW connected to D11, as in the cpp file comments.
What did you do about this line in LCD4bit?
int USING_RW = false;

Quote
As a sort of sidebar, I'll not that in a previous thread someone said that you can use
the LiquidCrystal library instead of the LCD4Bit_mod one (***making the wiring changes
per LCD4Bit_mod***) with the LCD shields that seem to require LCD4Bit_mod.
That is simply not correct. I did try it.
I don't think you did it correctly. Was pin 4 grounded when you tried LiquidCrystal? Did you change the argument of LiquidCrystal lcd() to match your pin assignments?

Quote
Apparently, there are some patches and twiddles in LCD4Bit_mod that let certain
LCDs work with it if they don't work with LiquidCrystal.
This is absolutely not the case.  The only changes are in the pin assignments "because of lazy coding in pushNibble()" in the original version. I don't think you will be able to find a display that works with LCD4bit that does not also work with LiquidCrystal.  The opposite is probably not the case.

Don
3094  Using Arduino / Displays / Re: Truly MCC162A4-5 16x2 LCD display on: April 25, 2011, 09:53:04 am
Quote
>>Use the Adafruit tutorial (http://www.ladyada.net/learn/lcd/charlcd.html)
to get started.<<

That was what I've been using all along.
If you have been using this tutorial then you never should have proceeded to the part labeled 'Bus Wiring' where you connect the LCD module to your Arduino. You have to get the contrast potentiometer working first. 

Quote
...it seems to clear both lines of the display (faint flickering, as if rapidly
refreshing). But, and here's what's interesting, if I pull out the RS wire
(letting it float high), I get scrolling random characters  on one row of the LCD.
I think the RS line is the problem here.
All of this is indicative of a display that is good and wiring connections that are not.  I don't think we can help you any more without seeing your version of the sketch and a photograph of how you have things connected.

Don
3095  Using Arduino / Project Guidance / Re: can I use ATMEGA168 chip alone as Arduino? on: April 24, 2011, 02:13:44 pm
@artem:
Quote
I mean do I need a programming device like avrisp2 or something
Yes

Quote
or can I just hook up the chip to the usb?
No

Quote
Is there any difference if, for programming my chip, I will either an "AVR Programmer" or a "USB-Serial breakout board" or a simple Direct AVR Parallel Access cable?
Yes there is a difference,  you have to match your menu choice with the hardware that you are using.

@Terry
Those are good examples for the hardware part but they aren't much help for the bootloader part.  One just mentions that you need a chip with the bootloader, another just tells you that you need to program the chip with a bootloader, and the third recommends a bootloader from Arduino v0010.

Don
3096  Using Arduino / Displays / Re: HD44780 Doesn't Reinit After Power Off/On on: April 24, 2011, 02:00:44 pm
Quote
I am using Arduino-0022.
Are you sure you are also using the current version of the LiquidCrystal library.  This problem was fixed with version 0017 and should not exhibit the behavior you are seeing.  You might try downloading a new copy of the IDE to make sure.

Quote
I've already tried putting a delay(1000); into setup() thinking that Arduino's setup() was running well before the LCD had a chance to finish starting up. This had no effect.
A good idea, but it won't have the desired effect because the LCD initialization occurs when you invoke the library - which happens before setup.

Don
3097  Using Arduino / Displays / Re: Truly MCC162A4-5 16x2 LCD display on: April 24, 2011, 01:41:19 pm
Quote
This one is an odd duck of a display....
What makes it odd?  It looks like a run-of-the-mill HD44780 compatible character mode LCD to me.  The LiquidCrystal library should work just fine.  Use the Adafruit tutorial (http://www.ladyada.net/learn/lcd/charlcd.html) to get started.

Quote
I do get the individual character blocks to display as solid squares when wired up, but no characters.
If they are only on the top line then it means that the device is not connected properly to the Arduino or the program code is wrong.  Since the program code is good it looks like we need a photograph of your connections.

Quote
Adjusting the contrast pot makes no difference.
Another wiring problem??

Quote
this weird old LCD seems to need a 220 ns pulse on the Enable line, according to the specs anyhow.
There is no problem here, that's the minimum acceptable pulse width.

Don
3098  Using Arduino / General Electronics / Re: Motor speed controller question from a dummie on: April 24, 2011, 12:19:43 pm
Quote
Finally - I want to re-iterate to you the importance of getting that motor fixed -first-; like I said, look into local vintage automobile clubs in your area, you might find a person who was a mechanic of the era (heh - maybe you'll find a "Gus Wilson" old-timer who knows exactly what to do!) who can help you out, and get it working right. You might also find somebody who can help you install or set up a motor controller with PWM or a resistor pack, and do it in such a way so-as not to ruin the value of the vehicle (especially if it is a show car).
I agree with this approach and I remember the Gus Wilson stories as well.  Keep in mind that the resistor(s) are generally in the shunt field circuit and the motor speed increases when the resistance increases.  This is not a mistake, you really have to decrease the shunt field current (by increasing the resistance) to increase the speed.  

Don

3099  Using Arduino / Displays / Re: 16x2 LCD displays all single digit integers as 'x0' rather than '0x' on: April 24, 2011, 08:15:07 am
Quote
I solved it, I forced the Arduino to 'print' a blank square to the LCD if des <=9. Kind of annoying, but it worked.
You have discovered that once you display a character on the LCD it stays there until overwritten.   A more generic way to handle this situation when you have to update some data periodically is to:
(1) set the cursor to the position of the first character.
(2) display as many spaces as the largest number of characters that could possibly be displayed.
(3) reset the cursor back to the position of the first character.
(4) display your new data.


Don
3100  Using Arduino / Displays / Re: 4 digit 7 segment 12 pin display on: April 21, 2011, 09:40:35 pm
You have to use multiplexing techniques to use this display so you might start out by looking through the 'LED and Multiplexing' section of the forum.  As mentioned in the previous post you will have to determine whether your display is CC (Common-Cathode) or CA (Common-Anode).  The overall techniques are basically the same for each but there are some differences which is why you must know which one you have.  Don't limit your research to 4-digit displays as the techniques for 2-digit displays are essentially the same.

Don
3101  Using Arduino / Displays / Re: LCD messes up whenever my relay turns on on: April 21, 2011, 09:20:31 pm
Try a non-GFI outlet and see if that makes any difference.

Don
3102  Using Arduino / Displays / Re: tvout & Nano v3.0 on: April 21, 2011, 09:49:00 am
The reference to OCR1A is probably wrong since that is the name of an internal register within the microcontroller.  It probably should refer to OC1A which is the name of a pin.  OC1A is digital pin 9 in Arduinospeak and OC2A is digital pin 11.

Don
3103  Using Arduino / Displays / Re: backlight drawing V+ from display power on: April 21, 2011, 09:43:28 am
Quote
The backlight dimming works fine via a pwm pin (3), but when I apply 5v to drive the LCD display it makes the backlight go to full brightness. I thought they were seperate circuits?
Pin 3 deals with the LCD contrast it has nothing to do with the backlight.  I'm not sure how you are accessing that pin to apply the pwm, but all that should do is determine how (and if) the characters appear on the screen.  It is usually a set-and-forget adjustment that is made only once and is typically implemented via a potentiometer.  There's a square blue device in three of the datasheet photographs which would be this potentiometer.

I am curious why your code uses a mixture of hex and decimal commands.  The datasheet uses only hex so why are you converting some of them to decimal and leaving the others in hex?


Don
3104  Using Arduino / Displays / Re: LCD messes up whenever my relay turns on on: April 19, 2011, 10:51:12 am
Quote
Do you have a multimeter to measure current drawn from the arduino pin that controls the relay? I suspect the current exceeds maximum, 40mA on the arduino pin, this could be bad to your arduino or seeeduino.
The second link in his first post indicates that the relay he is using is on a pc board that also contains a transistor driver.  So if he is indeed using that board then this is not the problem.  The diode on that board should suppress relay generated transients but if he isn't using that board then he may not be using a diode either.  We do need the picture of the relay connections.

Don
3105  Using Arduino / Displays / Re: LCD messes up whenever my relay turns on on: April 18, 2011, 09:11:39 pm
You have two different situations mentioned in your posts so you will have to clarify things a bit.

Original post: "and whenever my relay turns on, the LCD screen either spits out garbage, or turns off completely. "
Reply #3: "All work flawlessly (I can hear the relay clicking on and off)..but when it gets plugged into wall outlet, it goes crazy like I said."

What is the relay controlling.  Do you have the problem when there is no load plugged into the circuit that the relay is controlling?


Don
Pages: 1 ... 205 206 [207] 208 209 ... 284