Show Posts
Pages: 1 ... 205 206 [207] 208 209 ... 287
3091  Using Arduino / Displays / Re: Pop-168 (ATMega 168) and LCD screen on: May 12, 2011, 12:51:00 pm
Quote
To me, it looks like the LCD screen is not being initialized correctly via the Library code - is this a correct assumption?
It's definitely not being initialized properly but the library code has proven to be quite reliable since it was changed in Arduino v0017.  Are you sure that you are using the current library?

I hope you realize that both your board and Lady Ada's are upside down,  the row of blocks you see is the top row of the display.



Quote
#define RW_PIN   9

LiquidCrystal myLcd(RW_PIN, EN_PIN, D4_PIN, D5_PIN, D6_PIN, D7_PIN);

What you have defined as RW_PIN should really be RS_PIN but since you have been consistent in using the wrong terminology this is not your problem.   (It looked like John addressed this part while I was writing my reply.)

Most LCD modules have pin 1 near the outside edge of the board (as drawn on the diagram you posted), but some of the Optrex DMC series boards do indeed have pin 1 nearer to the center of the board.  Since your contrast potentiometer worked when you tried it I guess that the pin orientation is not the problem either.

It looks to me like your equates are correct from what I can tell from the Pop-168 ATMega168 Matchbox schematic and your photos.

I would try a reinstallation of the Arduino IDe to make sure that everything is up do date.  I would also get rid of everything in loop() while you are troubleshooting and just concentrate on getting the "Hello World" part to display.

Don
3092  Using Arduino / Displays / Re: DIY LCD Shield on: May 11, 2011, 08:59:17 pm
Quote
Since he bent them to do a cheap connection to LCD, they're clearly not straight and can't plug into the arduino headers any more.
I was planning to let him figure this part out on his own.

Don
3093  Using Arduino / Programming Questions / Re: LiquidCrystal Library - Scroll on: May 11, 2011, 08:56:02 pm
The LCD controller can inherently shift the entire display either left or right one character at a time.  For some unknown reason this feature has been renamed by the Arduino folks and has been implemented by the scrollDisplayLeft() and scrollDisplayRight() functions.  Note that they shift both lines together for a two line display and all four lines together for a four line display.  It is possible to make it look like only one line is shifting by using the appropriate function to shift the entire display and then by rewriting the lines that you didn't want to shift.

Don
3094  Using Arduino / Displays / Re: DIY LCD Shield on: May 11, 2011, 08:37:56 pm
I'm kind of curious how the information gets from pins 12, 11, 5, 4, 3, and 2 of your Arduino up to the corresponding pins on your shield.

Don
3095  Using Arduino / Programming Questions / Re: how do i get a file off of uno? on: May 10, 2011, 01:58:13 pm
@grag38 - Did you try to do any of the stuff that you regurgitated from the web?

(1) avr-dump is not avr-copy
(2) both appear to be programs that run under Linux


Don
3096  Using Arduino / Displays / Re: Speeding Up LCD Readout Without Slowing Down Everything Else? on: May 10, 2011, 11:57:01 am
Quote
My question would be, are there any unused recourses available that I could take advantage of to let me use the one tenth of a second setting for display without slowing down my stepper motor?
There are several basic approaches that will speed things up and they were all mentioned in the forum thread that you referenced in your first post.
(1) Don't use the lcd.clear() function if you can avoid it.
(2) Don't redisplay information that never changes.
(3) Use the busy flag to determine when you can write to the LCD display instead of using time delays.
(4) Use interrupts to drive the stepper.

Since driving the stepper is the primary function of your program then (4) is probably the only one that will really give satisfactory results.


Don
3097  Using Arduino / Installation & Troubleshooting / Re: Running Arduino Without a USB Cable on: May 09, 2011, 09:20:25 am
You haven't forgotten the obvious have you?  Do you have an alternate source of power for the Arduino USB cable is disconnected. 

Don
3098  Using Arduino / General Electronics / Re: LCD Pinout on: May 08, 2011, 07:24:19 pm
I understand that you can plug them right into the end of a 'mega' as long as you program the appropriate pins to provide power and ground.

Don
3099  Using Arduino / Displays / Re: LCD contrast circuit not working on: May 08, 2011, 07:21:31 pm
It certainly could have damaged the LED backlight but that in itself has nothing to do with the LCD controller.  Unfortunately many of the backlit modules are almost unreadable without the backlight, even if the LCD controller is 'working' properly.  You could try disconnecting the backlight power and see if the LCD contrast control seems to have the proper effect even though the display itself will not really be usable.  That way you could keep programming while waiting for a replacement display.

Don
3100  Using Arduino / Programming Questions / Re: DS1306, set Date Time on: May 08, 2011, 04:17:42 pm
Quote

Quote
 write_rtc_register(0x82, 0x11); // set hours
Since 0x11 is 17, that may not be valid, if the input is limited to 0 to 11.

Quote
write_rtc_register(0x81, 0x45); // set the minutes
0x45 is 69 in base 10. Not too many hours have 69 minutes.

I think these may be OK, the RTC stores it's data in binary coded decimal format.


Don
3101  Using Arduino / Programming Questions / Re: DS1306, set Date Time on: May 08, 2011, 04:12:32 pm
Quote
That site you linked to is a perfect example of how not to develop a web site. I can't read a damned thing on that page. Sorry I can't help you.
It probably looks really nice on his monitor with his browser.  He must be fairly young as well judging from the font size.

Don
3102  Using Arduino / Displays / Re: LCD contrast circuit not working on: May 08, 2011, 03:59:40 pm
Does that second photo accurately depict what you are seeing.  I see some light coming out the end of the display but the backlight certainly does not seem correct.  I can vaguely see the desired 'boxes' in your display but I see two rows of dim boxes rather than just a single row of bright boxes.  Take a look at this tutorial http://www.ladyada.net/learn/lcd/charlcd.html and scroll down about half way, just before the section labeled 'Bus Wiring' for a photo of what you should see.  (The LCD is upside down in that photo, it's the top row that has the boxes.)

From the datasheets both of your displays seem to require a positive contrast voltage and they both require a current limiting resistor for the backlight which I see you have added.  I think 220 ohms is too high since this will limit the backlight current to less than 4 mA.   I can't find an LED current rating for the 16x2 but the 20x4 is rated at 240 mA which would mean it needs a much smaller resistor.

Do you think you could find a real camera to use for your pictures?  The iPad gives better pictures than the iPhone but neither of their 'cameras' seem to be very good for this type of photo.


Don
3103  Using Arduino / Programming Questions / Re: Blinking without delay on: May 08, 2011, 03:31:03 pm
Quote
to compare it to the value at which it should shout off.
You don't want to turn something off 'at' any value because if you happen to miss that value it will never turn off.  You want to turn off when 'equal to or greater' than the value (or perhaps 'equal to or less' than the value, depending on your logic).

Don
3104  Using Arduino / Programming Questions / Re: LCD print trouble on: May 08, 2011, 03:12:03 pm
Quote
It threw up errors until I made it one big comment......strange
Comment blocks within comment blocks will cause a problem.  

/* Start of first comment block
stuff you want to be ignored #1
    /* Start of second comment block
    stuff you want ignored #2
   */ End of second comment block
stuff you want ignored #3
*/ End of first comment block


The first /* starts the first comment block.  The second /* is ignored since it is within a comment block, but it's */ actually terminates the first comment block and everything that follows (stuff you want ignored #3) is compiled.  The second */ will cause one of your errors unless it is on a line following a regular comment symbol // or ;

Don
3105  Using Arduino / Microcontrollers / Re: Bootload bare Atmega328P using Pololu USB AVR Programmer ??? (SOLVED) on: May 08, 2011, 02:59:39 pm
Quote
2) the Arduino bootloader expects an external clock at 16MHz, unless you've changed the defaults - the flashing process will set the ATMega328P to expect this external crystal, ...
Be careful, these are not the same.  An external clock is a square wave, frequently provided by an external oscillator in a four pin metal can.  The Arduino uses an external crystal which is in a small two pin metal can accompanied by two capacitors.

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