| ??? 08/04/04 07:05 Read: times |
#75385 - RE: Reply to Ijaz: Comments + my code... Responding to: ???'s previous message |
hi,
void BUSYF_CHK_WAIT(void)
{
//Set P1 to input
P1 = 0xFF;
//Set R/W = 1 (read mode)
P3_3 = 1;
//Wait for not busy
while(P1_7)
{
}Well, but where do you READ busy flag? You just wait till P1_7 comes low - that`s wrong: you have DO READ command (here: select LCD)
void BUSYF_CHK_WAIT(void)
{
unsigned char temp;
//Set P1 to input
P1 = 0xFF;
//Set R/W = 1 (read mode)
P3_3 = 1;
//Wait for not busy
do
{
P3_4 = 1;
temp = P1;
P3_4 = 0;
} while(temp&0x80);
Read http://www.8052.com/forum/read.phtml?id=64753 as well. Regards, Oleg |



