LCDInfo.com

http://www.lcdinfo.com
It is currently Mon Nov 25, 2024 14:08

All times are UTC + 2 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Jan 15, 2008 1:51 
Offline
User avatar

Joined: Tue Jan 15, 2008 1:40
Posts: 2
hi,
this is my 1st post in this forum 8) .
i was playing with ks0108 lcd on proteus. i am able to write data,fonts and images to lcd . but i cant read data from display RAM.
here is code for reading data from lcd
Code:
#include <reg51.h>

sbit rs=P3^3;
sbit rw=P3^2;
sbit en=P3^1;
sbit cs1=P3^5;
sbit cs2=P3^4;

void delay()
{
   int k,l;
   for(k=0;k<3;k++)
      for(l=0;l<50;l++);
}
void sendCommand(unsigned char val)
{
   P1=val;
   rs=0;
   rw=0;
   en=1;
   en=0;
}
void sendByte(unsigned char dat)
{

   P1=dat;
   rs=1;
   rw=0;
   en=1;
   en=0;
}
void readByte()
{
   
        P1=0xff;
   rs=1;
   rw=1;
   delay();
   en=1;
   delay();
   en=0;
   P2=P1;
}

void main()
{
        while(1)
        {
      cs1=0;
      sendCommand(0x40);
      sendCommand(0xb8);
      sendByte(0xf4);
      sendCommand(0x40);
      sendCommand(0xb8);
      readByte();
      readByte();
   }
}


please help me solving this problem :oops: :oops:


Top
 Profile  
 
 Post subject: :(
PostPosted: Tue Jan 15, 2008 15:54 
Offline
User avatar

Joined: Tue Jan 15, 2008 1:40
Posts: 2
is this forum closed :?: :?: :?: :?:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 2 hours


Who is online

Users browsing this forum: Google [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group