LCDInfo.com http://forum.lcdinfo.com/ |
|
bitmap http://forum.lcdinfo.com/viewtopic.php?f=9&t=1023 |
Page 1 of 1 |
Author: | mustyberlin [ Fri Jan 28, 2005 14:51 ] |
Post subject: | bitmap |
hi, ı want to display a bitmap on my 240*128 lcd.. how can ı do it???? |
Author: | mingingbollock [ Fri Jan 28, 2005 19:34 ] |
Post subject: | |
<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 |
Author: | Henri [ Mon Jan 31, 2005 11:59 ] |
Post subject: | |
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 } } |
Author: | mustyberlin [ Mon Jan 31, 2005 17:54 ] |
Post subject: | |
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? |
Author: | Henri [ Thu Feb 03, 2005 1:42 ] |
Post subject: | |
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. |
Page 1 of 1 | All times are UTC + 2 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |