How to select cursor position on a specific VFD

I'm sure this has been covered before but my search skills fail me and I'm just about stagnating on a minor part of the project.

I have a Noritake character VFD who's data sheet can be found here (for better and worse, it's only one page) http://www.vfdworld.com/techdocs/Noritake_CU20045SCPB-T23A_4x20_VFD.pdf

The instruction for the position cursor is +48H and I'm having trouble making it work. Searching around has shown me that usually you send the position you wish to go to, with this hex value added to it. So far I Haven't had any luck getting it working or it will just print another character. I'm sure the solution is simple.

Can anyone give me a quick rundown of how this probably works? As you expect, the other + instructions aren't working either.

My guess is that, since several "+" values are listed after the "Escape" command 0x1B) you probably send 0x1B,0x43, and then the desired cursor position. You just have to figure out what the format of the position is. My first guess would be one byte for Row and one byte for Column.

Below is some code from liquidcrystal.cpp to give a partial answer. I also have a question to add to the thread. @JohnW. How do you send the instruction manually? Do you use this short clip? lcd.print(0x0f, 0x40); //16 columns and 2 rows it would = set cursor row 2 spot 16

void LiquidCrystal::setCursor(uint8_t col, uint8_t row)
{
  int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };
  if ( row >= _numlines ) {
    row = _numlines-1;    // we count rows starting w/0
  }
  
  command(LCD_SETDDRAMADDR | (col + row_offsets[row]));
}

I don't think that commands can be sent just using lcd.print. Look at the difference between: LiquidCrystal::command and LiquidCrystal::write

They both use LiquidCrystal::send but with a different setting for mode. Now look at the send function, the value of mode is used to set the RS pin which tells the controller whether you are writing a command or data. The print function is used to write data so the RS pin will always be HIGH.

Thanks for your reply, it gives me something to think about. I did come up with a mess of stuff to try. It is literally a mess but, I got some of it to work. It is not a sketch, it is some pieces I found while searching this forum. I think the way to get a command to happen you use lcd.Write(numbers here);

/*LCD Commands
LCD_DISPLAY_CLEAR = 01 h
LCD_RETURN_HOME = 02 h
LCD_ENTRY_MODE = 04 h
LCD_DISP_ON_OFF = 08 h
LCD_SHIFT = 10 h
LCD_SET_FUNCTION = 20 h
LCD_SET_CG_ADDRESS = 40 h
LCD_SET_DD_ADDRESS = 80 h

LCD Command Parameters
CMD_CURSOR_INCREASE = 02 h
CMD_CURSOR_DECREASE = 00 h
CMD_DISPLAY_ON = 04 h
CMD_DISPLAY_OFF = 00 h
CMD_INTERFACE_8BIT = 10 h
CMD_INTERFACE_4BIT = 00 h
CMD_TWO_LINES = 08 h
CMD_ONE_LINE = 00 h


//Example:
//For turn off and on the display:

//LCD_DISPLAY_ON_OFF + CMD_DISPLAY_ON = 0x08 + 0x04 = 0x0C :o

//LCD_DISPLAY_ON_OFF + CMD_DISPLAY_OFF =0x08 + 0x00 = 0x08 :o
    switch (serial_getch())
            {
                  case 66: //backlight on (at previously set brightness)
                                // not implemented                        

                        break;
                  case 70: //backlight off
                        // not implemented                        
                                break;
                  case 71:  //set cursor position
                        temp = (serial_getch() - 1);  //get column byte
                        switch (serial_getch())  //get row byte
                        {
                              //line 1 is already set up
                              case 2:
                                    temp += 0x40;
                                    break;
                              case 3:
                                    temp += 0x14;
                                    break;
                              case 4:
                                    temp += 0x54;
                                    break;
                              default:
                                    break;
                        }
                        lcd.commandWrite(0b10000000 + temp);
                        break;
                  case 72:  //cursor home (reset display position)
                        lcd.commandWrite(2);
                        break;
                  case 74:  //show underline cursor
                        lcd.commandWrite(0b00001110);
                        break;
                  case 75:  //underline cursor off
                  case 84:  //block cursor off
                        lcd.commandWrite(0b00001100);
                        break;
                  case 76:  //move cursor left
                        lcd.commandWrite(16);
                        break;
                  case 77:  //move cursor right
                        lcd.commandWrite(20);
                        break;
                  case 78:  //define custom char
                        lcd.commandWrite(64 + (serial_getch() * 8));  //get+set char address
                        for (temp = 7; temp != 0; temp--)
                        {
                              lcd.print(serial_getch()); //get each pattern byte
                        }
                        break;
                  case 83:  //show blinking block cursor
                        lcd.commandWrite(0b00001111);
                        break;
                  case 86:  //GPO OFF
                        //implement later
                        break;
                  case 87:  //GPO ON
                        /*temp = serial_getch();
                        if (temp == 1)
                        {
                              GPO1 = GPO_ON;
                        }
                        break;
                  case 88:  //clear display, cursor home
                        lcd.commandWrite(1);
                        break;
                  case 152: //set and remember (doesn't save value, though)
                  case 153: //set backlight brightness
                        //not implemented
                        break;
                        
*/