Hello! I have been searching the inter net for about 5 hours now looking for a basic directions on doing two things.
First I have a HD44780 2X16 LCD from Spark Fun
Does anyone know where I can Find a tutorial on how to get this device to display words for a few seconds then display something different for a few more seconds, then cycle back.
Also I have a Parallax standard servo, I'm looking to make a robot that preforms repetitive tasks (picking something up and putting it down over and over again) where can I go to figure out a way to simply get the motor to move so many degrees and then move back and move a diffrent amount and wait then return to the original position.
Thank you for that but I've run into a bit of a problem, the connectors on the LCD I have are different than in the tutorial and the data sheets (http://www.sparkfun.com/datasheets/LCD/GDM1602K.pdf) are not telling me which of the data lines I should hook into for the 4 bit interface.
The connectors are arranged differently. You just need to look at the pinout on the datasheet you posted to find which pins you need to use on your particular lcd.
I know this picture is kinda blurry, but that happens when you lose your camera and have to use a cell phone. Anyway, I used the REDonBLACK 5V lcd, which is the same as what you have (I think). So, here's my circuit:
As can be seen from your datasheet, pin 1 is the far left, pin 16 the far right. I soldered on some male headers on the back so I can stick it in a breadboard (as seen here). Then, using the chart for pinout on the datasheet, pin 1 is grounded, pin 2 connected to 5 volts, pin 3 to the center pin of the pot (small breadboard above), pin4(RS) to arduino pin 12, pin5(RW) to ground, pin6(E) to arduino pin 10, pins(7-10) to ground (lower data pins), pins 11-14 to arduino 7-10 (higher data pins), pin 15 (backlight) to 5 volts (Yes i know it should be 4.2 volts, but I'm not too worried right now its not permanent), and pin 16 to ground. Then, I used the LCD4Bit library from Arduino Playground - LCD4BitLibrary, with only the adjustment of
LCD4Bit lcd = LCD4Bit(1); to LCD4Bit lcd = LCD4Bit(2);
and uncommenting the section below "//uncomment this if your display HAS two lines!"
Then it just came down to adjusting the 10K pot for contrast.
Good luck!
Well, I don't appear to be able to edit, but whatever. I forgot to mention I had to modify the CPP file in the LCD4Bit directory (arduino/hardware/libraries/LCD4Bit is where mine is).
//RS, RW and Enable can be set to whatever you like
int RS = 12;
int RW = 15;
int Enable = 11;
//DB should be an unseparated group of pins - because of lazy coding in pushNibble()
int DB[] = {2,3,4,5}; //wire these to DB4 ~7 on LCD.
is what I had to modify. I had to change the DB[] section to what pins i am using (I left 9 and 10 open for servo control later). Also, RS and E had to be set to correct values and RW set to a pin I don't use (even though its disabled in the code earlier, I don't like to leave it hanging). Once I modified the file, I had to delete the .o file which is in the directory where the .cpp file is, since that was created on initial compiling and has the old settings. SORRY for the confusion. :-[