Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

The Dot Factory: A free LCD font and image generator + 7110 driver

Status
Not open for further replies.

Pavius

New Member
After reading the 7110 thread, i bought a few LCDs and started developing a driver for it. A few years back i used FontGen to generate my fonts and bitmaps but found that it has become commercial (250 USD :eek:). I found a few alternatives but they were either commercial or lacking. Consequently, i developed a font and image generator which outputs easy to integrate and compact font information:

  • Generates only the letters required by the user and uses a font descriptor array to access, in O(1), the bitmap for the requested character
  • Descriptor array is stored only for the required range of characters
  • Strips all possible vertical padding from bitmaps
  • Space character is generated by code, not by bitmap. This removes the need to hold a large descriptor array (since space is the lowest ASCII character and is often used)
  • Array is formatted in binary to allow easy visual tweaking of character
  • Generates both source file info and header file info
  • Bitmap conversion supported as well
  • Open source (C#), released under GPL
In addition, i've also released my 7110 driver. This is a non buffered driver, specially tailored for PIC16s that can't store the ~900 bytes of back buffer required by the 7110. It supports page aligned and non page aligned writes (the 7110 does not support read modify write so you can't share a page). When my PIC18s arrive i will release a PIC18 buffered version.

You can get the zipped executable (37KB unzipped) **broken link removed**, and the 7110 driver **broken link removed**. I have not tested it on vista and i suspect the rendering will be a bit iffy, though i may be wrong. First thing in my todo list is vista support.

Comments, bug reports, wish lists are welcomed.

-- 30/07/09: 0.0.3 released
 

Attachments

  • lcd-example.jpg
    lcd-example.jpg
    55.1 KB · Views: 2,699
  • main-screen003.png
    main-screen003.png
    41.7 KB · Views: 1,288
Last edited:
Hi Pavius. That software looks pretty nice!

I guess it supports .TTF fonts? Does it do a standard 7x5 LCD font too? And does it work on win98? ;)

By the way nice attractive website, but your PIC downloads are not there just the function definitions.
 
Thanks, RB :)

It supports any fonts windows publishes in its standard font dialog, TTF included. A complete 5x7 font is included in the 7110 driver package (explained on the page) - you can see an example of this in the preview image (the "www.pavius.net" is using a 5x7 font, while "Example" is Tahoma 8pt bold and Nokia 7110 is Georgia 10pt bold italic). While the proggie can generate small fonts (that is, freakishly small font sizes like "Arial 6pt") it usually comes out distorted when i render it on a canvas. I have yet to find a font that is generated properly in these sizes.

Win98 support - i doubt it :p

I just checked the PIC download pages and see that the links point to what i expect - a zipped (7z) file containing 3 files: a source file, a private header and a public header. Care to elaborate what you mean by only function definitions being available?
 
Nice work!!!

Glad to see someone else finally picking this up. I just downloaded the font program and will test it after work.

I have my own library so dont really need it since i buffer and i use it on a LPC2148 now so tons of space.

Thanks for the files and sharing and keep up the awesome work!!!

Site looks nice and organized! i guess i could learn a thing or 2 from you :D
 
Thanks! My current arrangement should allow me to maintain this for a while, hopefully until it is completely ready. You should reference my driver to see how i output characters to the LCD (it's not N, N+1, N+2) - it's well documented. The reason for this is to allow the letters to be naturally ordered - you can see the 1s and 0s of the output quite clearly and they visually make up the bitmap. This is to allow manual tweaking without having to work with hex and guesswork. You should also take into account the character descriptor array and the fact that the driver needs to generate the space (' ') character.

I'm working towards the followup version and will post an update once its ready. As always - bug reports and wish lists are welcomed.
 
Last edited:
Ok, I follow the links for PIC download to this page;
**broken link removed**

and it shows the menu on the left (as expected) on the right there is a one paragraph description, under that is 3 paragraph sections of definitions and under that is a "add comment" section. That's it, nothing to click to download anything.

Are you using some type of funky java to create the download links?
There are no html download links.
 
Ah :) This section indeed only includes prototypes for PIC infrastructure. The actual source files which use this infrastructure are in the "**broken link removed**" section.

The infrastructure is so compiler specific and usually everyone has their own so i didn't really think including my HT-Soft specific infrastructure would be useful to anyone.

Thanks for the feedback!
 
The source for the firmware. Its not that its hard or anything im just saying its complex meaning lots of options. Complex isnt always meant as bad :D

I like it and it has given me ideas.

I dont like really how the text or well... the font is layed out but seems it would be nice for nooBs.

ima take a look at the GUI today and see if i can tinker with it. I dont have much skills in windows programing but ill try :D
 
By layed out you mean that there is a comment per letter or the order of the bytes? I separate the LCD driver from my bitmap database so it's not an eye sore and the fact that it takes a lot of space doesn't really matter (i prefer a visual representation). I can add an option not to include the comments and allow the user to define how many bytes per line he wants to save text space.

If you have any more inputs i'd be happy to hear
 
The order.... like... i didnt full read the code but it seems like you are reading every first bit of n# of bytes to make the letter which is a hassle.

Takes more time to do also.
 
There are two data write types in the driver: page aligned and non page aligned. In both cases i pump out a byte at a time directly from the array.

Page aligned writes are simple - i iterate over the bytes of the letters (see note) and output. The byte from the array is outputted directly to the LCD with no masks and no shifts.

Non page aligned writes (for example, write text starting from vertical pixel 3 as opposed to pixels 0, 8, 16 which are page aligned) require me to combine two bytes from the array into one. For each physical LCD page, i must take part from the higher byte and part from the lower byte. There is nothing that can be done to avoid this, as far as i can think of. Perhaps this is what you saw.

Note: In both cases the bytes are not iterated over in a sequential fashion (byte[0], byte[1], byte[2], ..., byte[n]) and calculating the next byte's offset is indeed overhead. This is required to allow the bitmap to be stored in a visual manner to allow manual editing. I will have an option to instruct the bitmap to text converter to generate the data so that the bytes will be sequential. This will mean that they will not be easy to edit manually, but will allow faster outputting to the LCD.
 
Last edited:
Ah :) This section indeed only includes prototypes for PIC infrastructure. The actual source files which use this infrastructure are in the "**broken link removed**" section.
...

Thanks for setting me straight there, for a moment I thought your neat professional looking site was not supporting my antique web browser. It happens!

I know the error was mine in not looking hard enough to find the downloads, but it still might be worth putting a link on that prototypes page. :)
 
Version 0.0.3 released, adding a lot of configurable settings to the output:
- Output as hex or binary with selectable leading character
- LSb or MSb first
- Flipping horizontally/vertically/both
- Configurable padding removal (saves space)
- /* C style comments */ or // Cpp style comments
- Select which comments are added
- All the above for both text and images

**broken link removed**
 

Attachments

  • output-config.png
    output-config.png
    12.1 KB · Views: 369
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top