Go Down

Topic: NHD[ch8208]0220D3Z[ch8208]NSW[ch8208]BBW - BAcklight ON/OFF (Read 534 times) previous topic - next topic

FPGA

Apr 20, 2010, 11:13 am Last Edit: Apr 20, 2010, 11:14 am by FPGA Reason: 1
Anyone has an example on howto put this backlight on writing something to it and then putting the backlight off??

my code works except the part where there must be text written to the LCD. This text is not correct.

Example:

Code: [Select]
#include <SoftwareSerial.h>

#define LCDrxPin 2
#define LCDtxPin 8

SoftwareSerial LCDSerial = SoftwareSerial(LCDrxPin,LCDtxPin);

void setup()
{
 pinMode(LCDrxPin,INPUT);
 pinMode(LCDtxPin,OUTPUT);
 LCDSerial.begin(9600);
 Serial.begin(9600);
 

}

void loop()
{
 
 delay(3000);
LCDSerial.print(254,BYTE); // Put LCD off by Backlight brightness
 LCDSerial.print(83,BYTE);
 LCDSerial.print(0,BYTE);
 delay(3000);
 
 delay(3000);
 LCDSerial.print(254,BYTE); // Put LCD on by Backlight brightness
 LCDSerial.print(83,BYTE);
 LCDSerial.print(8,BYTE);
 delay(3000);
  LCDSerial.print(254,BYTE); // Cursor Home Command
 LCDSerial.print(70,BYTE);

 delay(3000);
 LCDSerial.print("Test");
  LCDSerial.print(254,BYTE); // Clear Screen Command
 LCDSerial.print(81,BYTE);
 
 delay(3000);
}


Very much thank you

Go Up