Finally got to write something here as I've been quite busy the last few days.
Any progress on this ?
I quickly looked at the datasheet and it said that the data can be read when E = HIGH. I haven't personally ever read from KS0108 so I can only tell what the datasheet says.
edit:
Also noticed this in the datasheet:
Quote:
To read the contents of display data RAM, twice access of read instruction is needed. In first access, data in display data RAM
is latched into output register. In second access, MPU can read data which is latched. That is, to read the data in display data
RAM, it needs dummy read. But status read is not needed dummy read.
edit2:
I also found some code for Ks0108
Code:
void glcd_WaitIfBusy(void)
{
outp(0x00, glcd_DataDir);
sbi(glcd_Control, glcd_RW);
cbi(glcd_Control, glcd_RS);
do {
glcd_Delay(1);
sbi(glcd_Control, glcd_Enable);
glcd_Delay(1);
cbi(glcd_Control, glcd_Enable);
} while (bit_is_set(glcd_DataIn, glcd_sBUSY));
}
unsigned char glcd_ReadData(void)
{
glcd_WaitIfBusy();
outp(0x00, glcd_DataDir);
sbi(glcd_Control, glcd_RW);
sbi(glcd_Control, glcd_RS);
sbi(glcd_Control, glcd_Enable);
glcd_Delay(1);
cbi(glcd_Control, glcd_Enable);
return inp(glcd_DataIn);
}