atmel:giant_lcd_shield

Differences

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

Link to this comparison view

Next revision
Previous revision
atmel:giant_lcd_shield [2011/11/21 11:51] – external edit 127.0.0.1atmel: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 63: Line 65:
   * Open the LCD connector - just pull it up about 4mm. Do NOT remove the top part of the connector   * Open the LCD connector - just pull it up about 4mm. Do NOT remove the top part of the connector
   * Attach PCB to the LCD using standoffs - don't tighten these fully just now.   * Attach PCB to the LCD using standoffs - don't tighten these fully just now.
-  * Insert pins thru the PCB and into LCD connector. Make sure that pins run into the correct socket position on the LCD connector. You only need fit pins 1,3,6,12,14,15,16,17. Note that pins 15&16 are intentionally shorted together on the PCB. +  * Insert pins thru the PCB and into LCD connector. Make sure that pins run into the correct socket position on the LCD connector. You only need fit pins 1,3,6,12,14,15,16,17. Note that pins 15&16 are intentionally shorted together on the PCB. Be sure to push the pins properly into the connector ... you should feel the pin being gripped by the contact in the connector.
   * 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);
   }   }
Line 246: Line 256:
 } }
 </code> </code>
 +{{tag>8x24 serial giant arduino LCD}}
  • atmel/giant_lcd_shield.1321876261.txt.gz
  • Last modified: 2012/02/22 10:16
  • (external edit)