Placing cursor on graphic LCD with serial backpack

I have the 64x128 graphic LCD with the graphic LCD serial backpack from sparkfun

LCD-00710
and
LCD-09352

In the datasheet for the backpack it says to place the y coordinate you send the code 0x7C 0x18 y-coordinate. However, the hex code 0x18 toggles the LCD into reverse mode, making the screen negative.

void placeCursor(int x, int y){
  Serial.print(0x7C, BYTE);
  Serial.print(17, BYTE);
  Serial.print(x, BYTE);
  Serial.print(0x7C, BYTE);
  Serial.print(18, BYTE);
  Serial.print(y, BYTE);
}

void setup(){
  pinMode(1, OUTPUT);
  Serial.begin(112500);
  Serial.print(0x7C, BYTE);
  Serial.print(0x00, BYTE);
}
void loop(){
  int x;
    
  for (x=0; x<200; x++){
    placeCursor(60, 30);
    Serial.print(x, DEC);
    delay(1000);
  }
}

I’m confused as to why there would be the same code to do different things…Thanks for your help!

thericcer:

From the datasheet:

Sending “r (0x18)”

This appears to be a misprint. r is, and has always been, 0x12.

If the perpetrator of this datasheet had bothered to create a table of commands rather than scatter those commands through three pages of text this error should have popped right out.

Don

Well i figured out the problem. For some of the codes in the datasheet they put the deximal value for the hex value. To reverse the display, the datasheet says send code 0x18 of r from a keyboard. The hex value for r is 12, but they put the decimal value 18 in hex representation. So by the ASCII chart positioning the X and Y values of the cursor is done by sending the decimal values 24 and 25 respectively.

Now the problem I have is whenever I send data to the display, it gets really dim, the backlight is at full so it seems to me that there is some kind of short or something. Any ideas?

Sorry for the late reply, but I can explain the dim display.

The data sheet specs between 6v and 7v up to 9v, if you have it connected directly to the Arduino for power you are only providing it with 5v.

Same thing happens to mine, but using a 9v battery to drive the LCD solves the issue.

has anyone of you build a library controlling the backpack yet ?

i search all day long to find anything but wasn't successful. my next idea was to edit the SparkSoftLCD Libery.

First of all: i got no idea what i'm doing, cause i'm a real beginner, but as far as i see it could work with some changes.

first idea: http://nopaste.info/33bde8176a.html the biggest problem for me: i ordered the backpack a week ago but i thing it will take more than 3 week till it will be here ( US -> Germany ).

greetz JKW