LCDInfo.com

http://www.lcdinfo.com
It is currently Mon Nov 25, 2024 0:13

All times are UTC + 2 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: bitmap
PostPosted: Fri Jan 28, 2005 14:51 
Offline

Joined: Fri Jan 14, 2005 17:55
Posts: 4
hi,

ı want to display a bitmap on my 240*128 lcd..
how can ı do it????


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 28, 2005 19:34 
Offline

Joined: Sat Apr 17, 2004 2:32
Posts: 106
<screen>
<name>bat1</name>
<action>
<id>Core.NextScreen</id>
<delay>5000</delay>
</action>
<item type="image" x="0" y="0">
<imagebitmap>screens\240x128\alice2.bmp</imagebitmap> -------(path and name of bitmap here)
<refresh>500</refresh>
</item>

</screen>

Bitmap must also be correct size and mono/ 2 colours or it wont display
hope that helps


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 31, 2005 11:59 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
What kind environment ? Are you still using a PIC16F877 ? Do you already have the bitmap stored somewhere ?

How big should the bitmap be ?

Uncompressed 240x128 bitmap takes 240/8*128 = 3840 bytes of memory so you can't fit many of those with PIC resources.

Then you just set the T6963C address pointer to the correct place in the screen buffer and depending of your settings you just write data bytes to the display and increase the address pointer. One byte is 6 or 8 bits depending of the setting of your T6963C controller.

So similarly as in this clear screen function except that you write some meaningful data bytes instead of those zeros in this one.
Code:
void ClearLCDGraph(void)
{
  int i;

  WriteData(G_BASE & 0xFF);
  WriteData(G_BASE >> 8);
  WriteCtrl(0x24); // address pointer to G_BASE

  for (i=0;i<2731;i++){
        WriteData(0); WriteCtrl(0xc0); // write data and inc ptr
  }
}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 31, 2005 17:54 
Offline

Joined: Fri Jan 14, 2005 17:55
Posts: 4
thanks henri,

i still use 16f877, i know memory isn't so large but this is for only learning..

for(i=0;i<2731;i++)

!!!!

why 2731?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 03, 2005 1:42 
Offline

Joined: Sun May 05, 2002 22:05
Posts: 2063
Location: Lappeenranta, Finland
Yes the memory size shouldn't really be a problem but just something to keep in mind.

2731 is just for some value there and nothing to look too much into. It just writes 2731 bytes to the display in that loop.


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

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 10 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