Ok this is driving me nuts. I have been trying all day to get anything on these LCDs. Any color… anything!
Ok my issue is this, i downloaded the example code which is intended for a ARM processor. I converted it for my PIC18F4620.
The issue with converting it is, it was made for a 16bit interface and i have no clue on how to make it 8bit. I know from the datasheet there are 2 major pins.
IM0 and IM3, it states:
So i have IM0 to VCC and IM3 to GND for 8bit mode.
Issue 2, in the datasheet i would expect to see examples on how to transfer data in 8bit mode… or well every mode, but ah nothing is there.
So i have no clue if im even toggling the data correctly.
This is original code for 16bit data transfer:
void wr_cmd(u16 cmd)
{
A0_L;
CSTFT_L;
WRTFT_L;
SET_DATATFT(cmd);
WRTFT_H;
CSTFT_H;
}
This is my code:
void wr_cmd(unsigned int cmd)
{
RS = 0; //Same as A0
CS=0;
WR=0;
TFT_DATA = ((cmd>>8)&0xFF);
WR=1;
WR=0;
TFT_DATA = (cmd&0xFF);
WR=1;
CS=1;
}
I am assuming that toggling the WR pin is how we send 2 bytes of data to represent 1 word.
But the LCD doesnt seem to do anything.
Can anyone help me out?
Complete code so far: http://www.filedropper.com/28lcd
