atmel:giant_lcd_shield

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
atmel:giant_lcd_shield [2013/05/27 16:01] minerva9atmel:giant_lcd_shield [2013/06/23 11:56] (current) minerva9
Line 8: Line 8:
  
 <note> <note>
-** [[http://www.youtube.com/user/9minerva?feature=mhsn|See a short video of the LCD in action]] (running the Sketch listed below) **.+** [[http://www.youtube.com/watch?v=QHZoSBFshlk|See a short video of the LCD in action]] (running the Sketch listed below) **.
 </note> </note>
  
Line 14: Line 14:
  
 {{:atmel:giantshield.jpg|}} {{:atmel:giantshield.jpg|}}
 +
 +{{:atmel:unolcd.jpg?200|}}
  
  
 === LCD Details === === LCD Details ===
  
-[[http://www.btinternet.com/~e2one/lcd/index.htm|Features full cursor control and multiple fonts]]. Programmable horizontal scrolling text too (up to 250 characters/line on the display). Custom characters can be designed & displayed.  [[http://www.btinternet.com/~e2one/lcd/graphics_character_definer.htm|An online character definer/editor]]. There is a small red LED on the bottom RHS corner of the LCD PCB - this can be controlled via commands from the Arduino.+[[http://www.dbzooo.webspace.virginmedia.com/lcd/index.htm|Features full cursor control and multiple fonts]]. Programmable horizontal scrolling text too (up to 250 characters/line on the display). Custom characters can be designed & displayed.  [[http://www.dbzooo.webspace.virginmedia.com/lcd/graphics_character_definer.htm|An online character definer/editor]]. There is a small red LED on the bottom RHS corner of the LCD PCB - this can be controlled via commands from the Arduino.
  
 LCD has a contrast adjustment slider. Unlike many other LCDs, this one has good readability in bright sunlight. LCD has a contrast adjustment slider. Unlike many other LCDs, this one has good readability in bright sunlight.
Line 66: Line 68:
   * Solder pins in place. Be careful, the pins are pretty close to each other. Check for any shorting as you go.   * Solder pins in place. Be careful, the pins are pretty close to each other. Check for any shorting as you go.
   * Close the LCD connector - best to use a small screwdriver to do this   * Close the LCD connector - best to use a small screwdriver to do this
 +  * Finish tightening the screws into the standoffs
  
  
Line 101: Line 104:
 Note that the special commands are triggered by the backslash ‘\’ character. If you require to print a ‘\’, you must send it twice ‘\\’. Note that the special commands are triggered by the backslash ‘\’ character. If you require to print a ‘\’, you must send it twice ‘\\’.
  
-The following sketch shows several of the features of this display. In order to save the Arduino serial port for other purposes, we use the [[http://arduiniana.org/libraries/newsoftserial/|'NewSoftSerial']] library. Be sure to install this into your Arduino build environment.+The following sketch shows several of the features of this display. In order to save the Arduino serial port for other purposes, we use the [[http://arduino.cc/en/Reference/SoftwareSerial|'SoftwareSerial']] library.
  
 <code c> <code c>
-#include <NewSoftSerial.h>+#include <SoftwareSerial.h> 
 +//Compiled with Arduino Version 1.0.5
 //We are using Arduino Uno pins 3 (Receive) and 4 (Transmit) //We are using Arduino Uno pins 3 (Receive) and 4 (Transmit)
 //This demo actually just uses pin 4 - there is no reception of data //This demo actually just uses pin 4 - there is no reception of data
-NewSoftSerial mySerial(3, 4);+SoftwareSerial mySerial(3, 4);
  
 void setup()   void setup()  
 { {
-  Serial.begin(57600); +  // Serial.begin(57600); 
-  Serial.println("Giant LCD Test");+  // Serial.println("Giant LCD Test");
      
-  // Set the data rate for the NewSoftSerial port+  // Set the data rate for the SoftwareSerial port
   // The LCD display expects 9600 baud   // The LCD display expects 9600 baud
   mySerial.begin(9600);   mySerial.begin(9600);
 +  // Give the LCD time to complete its reset cycle
 +  delay (3000);
 } }
  
Line 124: Line 130:
   //note that we need two '\' chars as Arduino takes a single '\' as the escape character   //note that we need two '\' chars as Arduino takes a single '\' as the escape character
   mySerial.print("\\@ 0");    mySerial.print("\\@ 0"); 
 + 
   delay (2000);   delay (2000);
 +
   mySerial.print("Line 1 - Hello world");   mySerial.print("Line 1 - Hello world");
   //   //
Line 130: Line 138:
  
   //Set cursor position to 2nd char of 3rd row   //Set cursor position to 2nd char of 3rd row
-  //Note that we need to escape the " character, giving us \" 
   mySerial.print("\\B\"#");   mySerial.print("\\B\"#");
   mySerial.print("Cursor positioning");   mySerial.print("Cursor positioning");
Line 214: Line 221:
    
    
 + x:
   //clear screen & select font 0    //clear screen & select font 0 
   mySerial.print("\\@ 0");   mySerial.print("\\@ 0");
      
-  //show 'graph drawing'  
   int dly = 80;   int dly = 80;
      
Line 227: Line 234:
          
     for (int i=0; i <= 7; i++) {     for (int i=0; i <= 7; i++) {
 +      //position cursor
       mySerial.print("\\B");       mySerial.print("\\B");
-      mySerial.print(byte(k)); +      //character position 
-      mySerial.print(byte(j));+      mySerial.write(byte(k)); 
 +      //row position 
 +      mySerial.write(byte(j));
  
-      mySerial.print(byte(152 + i));+      mySerial.write(byte(152 + i));
       delay(dly);       delay(dly);
    }    }
   mySerial.print("\\B");   mySerial.print("\\B");
-  mySerial.print(byte(k)); +  mySerial.write(byte(k)); 
-  mySerial.print(byte(j)); +  mySerial.write(byte(j)); 
   //full block char is font 0, char 136   //full block char is font 0, char 136
-  mySerial.print(byte(136));+  mySerial.write(byte(136));
   delay(dly);   delay(dly);
   }   }
  • atmel/giant_lcd_shield.1369670495.txt.gz
  • Last modified: 2013/05/27 16:01
  • by minerva9