Hei Guys!
I'm pretty new to this. I've just bought an ArduinoMega, and a LCD display to get starting with.
After a week with long evenings i still can't get it to work.
I have tryed everyting(in my opinion). I want to solv this my self tho, but need a little hint. can someone please give me a hint what I'm doing wrong and point me in the right direction?
datasheet: http://www.rapidonline.com/pdf/57-2272.pdf
LCD - ArduinoPIN
gnd - gnd
Vdd - +5V
Vo - contrast adjusting(working)
A0 - 46
CE1 - 47
CE2 - 48
R/W - 49
RES - 2
DB0->DB7 - 30->37
LCDbacklight working.
I have tried with the liquidcrystal lib with no success.
I have also tried some coding my self without luck.
the only thing that happens is that i get a white line at the bottom og the display, and the whole screen fades white.
here is my code:
void setup() {
Serial.begin(9600);
//RESTART PIN
pinMode(2, OUTPUT);
digitalWrite(2, LOW);
delay(20);
digitalWrite(2, HIGH);
myLCDtest();
}
void myLCDtest() {
PORTC = B00000000;
DDRC = B11111111;
PORTL = B00000000;
DDRL = B00001111;
PORTL = B00000101;
PORTC = B11000011;
delay(2);
PORTL = B00000001;
PORTC = B00000000;
delay(500);
}