Show Posts
Pages: 1 ... 205 206 [207] 208 209 ... 274
3091  Using Arduino / Installation & Troubleshooting / Re: Home made Arduino problems. on: March 14, 2011, 08:50:19 pm
Quote
The setup is very simple, one ATmega328 with bootloader burned on.
Did you buy it with the bootloader already on it or did you burn it yourself?  If you did it yourself did you deal with the bootloader address correctly and did you set the BOOTRST fuse?
3092  Using Arduino / Programming Questions / Re: Problem Uploading to Board on: March 14, 2011, 08:18:20 pm
Quote
Every time i try to upload a program through arduino to my mini using my FTDI i get the same error message,...
Have you looked through the "Installation & Troubleshooting" section of the forum (where this post belongs)?

Quote
Ive tried uploading using the ISP Bootloader
There is no such thing - the two techniques are mutually exclusive.

Don
3093  Using Arduino / General Electronics / Re: Transformer draining voltage from arduino trhough LM317t on: March 14, 2011, 08:08:26 pm
Quote
I can use my nixie tubes off a AA battery from the transformer just fine.
I'm a little confused.  You are talking about nixie tubes, batteries and transformers all in the same sentence.  Unless there are some modern replacements the nixie tubes that I remember were neon devices that required high voltage to operate.  Also, the batteries that I am familiar with produce DC (as does the LM317) and transformers transform AC (or sometimes chopped up DC). 
Quote
Can anyone help me out, what's going on here?

Don
3094  Using Arduino / Displays / Re: How to display many lines on lcd 16x2? on: March 14, 2011, 06:38:04 pm
Quote
I don't see lcd.begin anywhere...
Which is why only the first line works.  See the first sentence of reply #2.  He will also have to readjust his contrast after he adds the missing statement.

Don
3095  Using Arduino / Displays / Re: Help newbie on LCD selection on: March 14, 2011, 04:58:49 pm
Quote
but is it must use with Arduino main board?
Yes, it is a 'shield' which means that it plugs into a Arduino main board which you must purchase separately.

Quote
Is it suitable to be screen of my project.
Yes, but you should not use the modified LCD4bit library.  Use the standard LiquidCrystal library and change the pin numbers to agree with the requirements of the shield.

Use LiquidCrystal lcd(8, 9, 4, 5, 6, 7); instead of the default LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

A better description for the shield is here: http://www.robotshop.com/dfrobot-lcd-keypad-shield-arduino.html?utm_source=google&utm_medium=base&utm_campaign=jos

Don



3096  Using Arduino / Displays / Re: How to display many lines on lcd 16x2? on: March 14, 2011, 02:31:47 pm
Quote
Feel free to educate me if I'm talking nonsense.
What you said about the lcd.begin was quite appropriate since he would get exactly the situation he described if the lcd.begin information was wrong or missing.

Quote
How come this "easy" thing seems to create so much problems? Is it internal timing and too hurry programmer
This is part of it.  The data sheet is not easy to follow and many (actually almost all) of the programs that I have seen published do not adhere to it properly.  Such programs will work with some/many/most LCD modules but will not work with all of them.

Quote
or is it so that this is as good standard as RS-232 15-25 years ago
That's a whole different story.  The RS-232 standard is fine when you use it as originally intended.  DTE <--> DCE <.......> DCE <---> DTE, where the dashes are local connections and the dots are the long distance connections.  The problems arise when DTE <--> DTE connections are implemented and/or where the handshaking is not fully implemented.  So the situation is not the same.  With the LCD modules the standard is inadvertently not being followed, with RS-232 it is deliberately not being followed.

The really amazing thing is how many people are successful with their Arduino projects considering the fact that so many of them do not have a technical background.  A lot of them seem to try, and succeed with, projects that no sane engineer would even attempt.

Don
3097  Using Arduino / Displays / Re: HD44780 LCD Backlight control with PWM on: March 14, 2011, 09:42:35 am
Quote
Backlights are normally 5V on displays where the data is 5V.
Except when they require 4.2 volts - as his does.

Don
3098  Using Arduino / Displays / Re: How to display many lines on lcd 16x2? on: March 14, 2011, 09:36:32 am
Quote
Please, provide the whole code. What parameters you have in the lcd.begin?
You will not be able to use anything except the first line of a 16x2 display if you do not have an lcd.begin() statement.  This is due to an unfortunate 'feature' of the Liquid Crystal library.

One of the parameters that has to be set up when initializing an LCD controller is the 'number of lines'.  Unfortunately the term 'lines' does NOT refer to  how many lines of characters there are on the physical display, it refers to how many lines of controller memory are used.  Virtually all LCD modules are configured to require the use of 2 lines of controller memory.  This includes the majority of 16x1 displays which internally are configured as 8x2.  When configured for the use of 1 line of controller memory nothing can be displayed on the right side of most 16x1 displays or on any except the first line of the multi-line displays.  Unfortunately the default configuration used by the LiquidCrystal library, unless overridden with an lcd.begin() statement, is to use 1 line of controller memory.

For more information about this follow the LCD Addressing link at http://web.alfredstate.edu/weimandn


Don
3099  Using Arduino / Displays / Re: HD44780 LCD Backlight control with PWM on: March 14, 2011, 09:19:22 am
I have two observations.

(1) The 14-pin HD44780 LCD interface and the 2-pin Backlight are two completely (electrically) unrelated systems.  The HD44780 was around at for least a decade before LED backlights became popular.  There were some devices with electroluminescent backlights that required something in the neighborhood of 100 v to operate, but they were not common either.

Even with the incorrect title most people understand what you mean, I just don't think the misconception about a '16-pin interface' as used in some of the Arduino documentation should be encouraged.


(2) There are no standards concerning the LED backlights.  They have varying numbers of LEDs in varying series and/or parallel combinations.  Some implementations require an external series resistor and others do not since they have the required resistance already on the board.

A series resistance will never hurt anything and it is a essential to use one if you are not sure about your backlight configuration.  Since there are frequently several parallel strings of LEDs you may need a much smaller value than 150 ohms.


Don
3100  Using Arduino / Displays / Re: Help newbie on LCD selection on: March 13, 2011, 07:39:09 pm
Link to the shield?
Isn't your crystal ball working today?

Don
3101  Using Arduino / Displays / Re: LCD wraps output to 1 or 2 columns on: March 13, 2011, 07:29:15 pm
Don,
Hmm, this doesn't belong here really, but is that playground full of not well tested and possibly bad instructions? Anybody can send their creations there and look like it's made by someone who looks like he/she knows what they are saying? That's not good...

Cheers,
Kari

It's not bad either - you just have to be skeptical.  It would be nice if only experienced programmers who have thoroughly tested their projects posted them in the playground but I don't think that is always the case.  I believe that with a resource like this they are relying on the Arduino community as a whole to make any necessary corrections but most of the playground readers probably do not feel that they are experienced enough to correct something that has been posted there by someone else.

Don


3102  Using Arduino / Displays / Re: LCD wraps output to 1 or 2 columns on: March 13, 2011, 07:15:13 pm
Quote
Quote
Are you sure that the compiler is doing the logical operations the way that you expect it to?
Why, is the arduino compiler known for such bugs? I didn't check the generated assembly (is there an easy way to do that with the Arduino tools?) if you mean that. I'm fairly certain the code is correct though.
They aren't bugs, they are more like quirks.  The people who coded the compiler meant one thing and the people using it interpret things differently.  Kind of like operating system menus or error messages.  Take a look through the avrfreaks forum sometimes and see how many of the professional programmers there are beating their brains out trying to get the compiler to do what they intended.

Quote
Quote
Don't bet on it.  Read the datasheet - including the notes.
That quote is from the datasheet actually. I don't see any other information about initialization. (But I'm not sure what I would be looking for.)
Find the quote in the datasheet (p.23) and then look at the note directly below it, in the middle of the page. 
Note:    If the electrical characteristics conditions listed under the table Power Supply Conditions Using
         Internal Reset Circuit are not met, the internal reset circuit will not operate normally and will fail to
         initialize   the   HD44780U.   For   such   a   case,   initial-ization   must   be   performed   by   the   MPU   as
         explained in the section, Initializing by Instruction.

Follow the LCD initialization link at http://web.alfredstate.edu/weimandn for a complete explanation.


Don
3103  Using Arduino / Displays / Re: LCD wraps output to 1 or 2 columns on: March 13, 2011, 04:48:41 pm
Quote
I more or less followed the SparkFunSerLCD article here on arduino.cc.
With all due respect anyone can post anything in the Arduino playground.  Do you want proof that the moon is made from blue cheese?  Just give me a few minutes and then check Wikipedia.

Quote
Do you think I should use SoftwareSerial(2, 2)? Or some other unused input pin?
No, Yes.  I wouldn't use the same pin number for both Tx and Rx.  It looks like the playground code is doubling up on the receive pin knowing that the Sparkfun controller won't be sending anything there.

Quote
lcd_goto() is defined in the original post above. It's a generalization of selectLineOne(), selectLineTwo() and goTo() from SparkFunSerLCD
OK I found it!  Are you sure that the compiler is doing the logical operations the way that you expect it to?  I would start out by sending the specific numbers that the Sparkfun controller is expecting.  After you get that working then you can see if you can calculate values that give you the same results.

Quote
Do you have the correct sequency for the display, to initialize it properly?
This is done by the Sparkfun controller.

Quote
An  internal  reset  circuit  automatically  initializes  the  HD44780U  when  the  power  is  turned  on.
Don't bet on it.  Read the datasheet - including the notes.

Don
3104  Using Arduino / Displays / Re: LCD wraps output to 1 or 2 columns on: March 13, 2011, 02:32:21 pm
I guess I am confused, but I haven't done much with serial LCDs and then only in assembly language with a different serial board.

The SoftwareSerial.h library allows you to communicate on pins other than 0 and 1 etc (see below).  It has nothing to do with the LCD other than the fact that you are using it to communicate with what we now know is a Sparkfun serial interface device.  You have to send that device commands that it understands and it converts those commands to the standard HD44780 commands that the LCD module understands.


Code:
SoftwareSerial LCD = SoftwareSerial(0, 2);
This is telling the SoftwareSerial library to use pins 0 and 2, probably not a good idea since pin 0 is used by the hardware serial interface..

I still don't see where you have involved any library that deals with the LCD commands themselves.  For example, where does lcd_goto() come from?


Don
3105  Using Arduino / Displays / Re: LCD wraps output to 1 or 2 columns on: March 13, 2011, 02:01:26 pm
Code:
void loop()
{
  LCD.print("world");
}
You are trying to print the word "world" over and over again.  The serial interface is relatively slow but the LCD controller is even slower.  The LCD controller can't keep up and you get garbage.  Since the LCD memory does not have to be refreshed, put this code in setup.


Code:
void loop()
{
  lcd_clear();
  lcd_goto(0,0);
  LCD.print("world");
  delay(1000);
}
This one has an additional problem.  The instruction to clear the LCD takes much more time to execute than most of the other instructions so the aforementioned problem gets even worse.  You do not have to reset the cursor the 0,0 since the clear instruction does that.  Again, none of this belongs in loop.

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