ILI9163 LCD library

After much contemplation, I decided to rewrite the original ILI9163 library that I was using for the LCD. Fortunately, the LCD manual was much easier than I thought to read (http://goo.gl/CNVU8V), so tonight, I went about rewriting the whole LCD driver. I didn’t include any of the gamma correction curves as that would require a bit more thought and reading from me. The bare minimum driver however does work and the original 70 or so SPI writes has been reduced to 20. I’ve also written a couple more functions, notable SleepMode (allows the LCD to enter and exit sleep mode with the 120ms delay that is required) along with screen invert commands.

My best achievement today though however was making improving the string printing capabilities! A relatively easy but very memory intensive method of increasing the size of text is to include a character table for every text you might want to display. The textbook table size for these kind of LCD’s is 5×8 as 5 bytes are required for every character though other sizes such as 10×16 are used too for larger text. Instead of including a ton of character tables (No point wasting space!), I merely interpolate and expand the size of the standard 5×8 character table, allowing 10×16 and 15×24 sized fonts.

Image
The 3 new fonts in different colours!

As you can see in the picture above however, the x and t in text are linked. I might add a kerning feature though at the moment, thats not a biggy!

Advertisements

4 responses to “ILI9163 LCD library

  1. Wow cool work !! I m working on stm32f4 and you’re website seems to be the only one describing how to use it with stm. Can you please include a link to the code ??? Thank you !!

  2. Wow cool work !! I m working on stm32f4 and you’re website seems to be the only one describing how to use it with stm. Can you please include a link to the code ??? Thank you !!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s