Create less but bigger characters on VGA with Arduino

Posted by Magsmg on Mon 13 Aug 2012 09:59 PM — 4 posts, 19,664 views.

South Africa #0
I have successfully used this tutorial to display text on my LCD monitor with my Arduino: http://www.gammon.com.au/forum/?id=11608

This displays multiple characters per line for 30 lines.

I need to display 3 characters per line for four lines, but fill the whole screen with it.
E.g.
XXX
XXX
XXX
XXX

I tried altering the code in hundreds of ways but can't get it to work.

How can I achieve this?
What variables do I need to change, and to what?

Also, how can I invert everything, making black white and white black?

(It is for a project that relies on this specific feature)

Thank you!
Amended on Tue 14 Aug 2012 07:36 AM by Magsmg
Australia Forum Administrator #1
Magsmg said:

I tried altering the code in hundreds of ways but can't get it to work.


Post what you tried.

You can't easily invert everything. As the original post said, the hardware pulls the line high (white) between characters, so it is hard to get rid of an inter-character white line. Making it black on white hides that.
South Africa #2
I don't understand the "screenFont.h"'s content. I have no experience using HEX.

So I have tried changing these two lines:
const byte screenFontHeight = 8;
const byte screenFontWidth = 8;

And these two
OCR1A = 259;  // 16666 / 64 uS = 260 (less one)
OCR1B = 0;    // 64 / 64 uS = 1 (less one)


And a few random others I can't remember. All I could achieve was to display a smaller white block with my desired text at the top left but at the old font size.

I played with the resolution values as well
const int horizontalBytes = 20;  // 160 pixels wide
const int verticalPixels = 480;  // 480 pixels high


Everytime I changed something I thought would create bigger characters on the screen, the screen went black.

I am also only outputting chars like this:
sprintf (message [0], "111");
sprintf (message [0], "222");
sprintf (message [0], "333");
sprintf (message [0], "444");


Any tips of what I should look at?
Australia Forum Administrator #3
The whole thing is extremely timing dependent. I'm not sure you can easily change anything. As the article says, we are trying to squeeze in pixels within very short amounts of time. If you get the timing out, even slightly, it "overscans" the line (takes too long) and then you tend to see nothing at all.

You might be better off getting a dedicated card like the MicroVGA card and letting it do the work.