Need help with 16x2 LCD without library

// Code created by R.P.Singh (RIMT University)
// ATL - Mentor of Change - Om Parkash Bansal Modern School
// Mandi Gobindgarh - Punjab - India
// rpmgg31@gmail.com

int RS = 8;
int E = 9;

//PORTD (D0, D1, D2, D3, D4, D5, D6, D7) // pins are 0, 1, 2, 3, 4, 5, 6, 7
void setup() {
pinMode(RS, OUTPUT);
pinMode(E, OUTPUT);
init_lcd();
}

void loop() {
int i;
cmd_lcd(0x0C);
cmd_lcd(0x85);
string_lcd(“OPBMS”);
delay(100);

cmd_lcd(0xC7);
string_lcd(“ATL”);
delay(100);

for(i=0;i<=6;i++)
{
cmd_lcd(0x1C);
delay(1000);
}
for(i=0;i<=6;i++)
{
cmd_lcd(0x18);
delay(1000);
}

}

void cmd_lcd(unsigned long int value)
{
PORTD = value;
digitalWrite(RS, LOW);
digitalWrite(E,HIGH);
delay(2);
digitalWrite(E,LOW);
delay(2);
}

void data_lcd(unsigned long int value)
{
PORTD = value;
digitalWrite(RS, HIGH);
digitalWrite(E,HIGH);
delay(2);
digitalWrite(E,LOW);
delay(2);
}

void string_lcd(char *Rp)
{
while(*Rp != ‘\0’)
data_lcd(*Rp++);
}

void init_lcd()
{
cmd_lcd(0x38);
cmd_lcd(0x01);
cmd_lcd(0x06);
cmd_lcd(0x0e);
cmd_lcd(0x80);
}

Hi,
This thread is nearly 6 years old, so you may find that you will not get a reply from the originator.

Tom... :slight_smile:

Split from a very old thread

Please follow the advice on posting code in Read this before posting a programming question

In particular note the advice to Auto format code in the IDE and using code tags when posting code here

void cmd_lcd(unsigned long int value)
  {
    PORTD = value;

Hmmm.