LCDInfo.com http://forum.lcdinfo.com/ |
|
Custom character / replacement. http://forum.lcdinfo.com/viewtopic.php?f=17&t=1065 |
Page 1 of 1 |
Author: | Cossie [ Wed Feb 16, 2005 22:51 ] |
Post subject: | Custom character / replacement. |
Hi, I have been playing with this idea on Custom character that also can be used to replace characters with your own. (based on 5x7 characters and pixel draw) To figure out how we want to get a 'ä' (Extended acsii code 132) on the display we can use this template : oxoxo ooooo oxxxo oooox oxxxx xooox oxxxx Now to calc the values we are going fra left to rigth and doing some binary so 00000X0 = 0000010 eq. 0x20 etc etc until we are done. 1 = 0x20 2 = 0x55 3 = 0x54 4 = 0x55 5 = 0x78 as for the config i wanted to use : <item type="custom_char" id="132"> <data>0x20, 0x55, 0x54, 0x55, 0x78</data> </item> where ID is based on the ascii code of the character witch we want to draw or replace as for the code part its only matter of parseing the string to be written and match it to custom character id and at last do some pixel draw based on data string. What do you think about this? Regards Michael. |
Author: | Syridian [ Thu Feb 17, 2005 3:13 ] |
Post subject: | |
The idea is great. I like it heaps. From what I understand though you are suggesting a custom character on the fly? So what you want (tell me if I'm wrong) is for the LCDinfo core to search through the screen files, find any referance to that particular Ascii code, and add a custom made graphic in the same position? It would probably be easier I think to implement this by using some LCD's ability to have custom characters loaded into them, and then just using those. Anyway, just my thought on the idea... I might have misread something or just got totally confused somewhere, so feel free to let me know if I have. |
Author: | Cossie [ Thu Feb 17, 2005 17:44 ] |
Post subject: | |
Hi, yes, i wanted it to be on the fly and the core of LCDInfo only has to do the replacement/custom for strings so it shouldnt have to scan the hole screen file. And you are right that its easier to upload chars to the LCD but not all LCDs has this option and custom chars could be used for all types of LCDs. |
Author: | Syridian [ Thu Feb 17, 2005 23:34 ] |
Post subject: | |
Well, If you are any good at programming, you could take a look at the LCDinfo source files, and workout how to add this functionality. The files are available in here. |
Author: | Cossie [ Fri Feb 18, 2005 0:23 ] |
Post subject: | |
Hi, I could give it a try but i dont think that my free version of Borland C++ will do the job Michael. |
Page 1 of 1 | All times are UTC + 2 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |