Hi there plz help I have a topway lmb162a lcd. I tried writting user defined characters to it but the cursor just jumps to the second line and moves one space foward each time. this is what i did.
1. set cgram address - 00h - RS = 0 R/W = 0
2. write cgram - I write the 8 bytes one after eachother to form the charter
Hi there plz help I have a topway lmb162a lcd. I tried writting user defined characters to it but the cursor just jumps to the second line and moves one space foward each time. this is what i did.
1. set cgram address - 00h - RS = 0 R/W = 0
2. write cgram - I write the 8 bytes one after eachother to form the charter
Hi there this is my code i went through section 3.2.3 and it is what my code does. I think
after the set cgram address is send the RS is taken high for data mode and the 8 bytes are clock into the lcd as you would normaly write a character.
X = 8;
CLRSI(); //Clear lcd function
RB4 = 0; //RS line
PORTD = 0x40; //set cgram address
LCDPI(); // Clock data into lcd
RB4 = 1;
PORTD = 0x0E; //first line of char
LCDPI();
PORTD = 0x11; //3rd line of char
LCDPI();
PORTD = 0x0E; //4th line of char
LCDPI();
PORTD = 0x04; //5th line of char
LCDPI();
PORTD = 0x1F; //6th line of char
LCDPI();
PORTD = 0x04; //7th line of char
LCDPI();
PORTD = 0x0A; //8th line of char
LCDPI();
PORTD = 0x11; // 8 bytes that makes up character
LCDPI();
PORTD = 0x00; / address to read it char
LCDPI();
Well, your code is wrong. I have no idea why your code is wrong because you have posted the bit you think is wrong.
If you send command 0x40 and then send 8 data bytes you will define character zero. If you then send command 0x80 and data 0x00 you will get your character in the top corner.