Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ Electronics ➜ Microprocessors ➜ Create less but bigger characters on VGA with Arduino

Create less but bigger characters on VGA with Arduino

Postings by administrators only.

Refresh page


Posted by Magsmg   South Africa  (2 posts)  Bio
Date Mon 13 Aug 2012 09:59 PM (UTC)

Amended on Tue 14 Aug 2012 07:36 AM (UTC) by Magsmg

Message
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!
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #1 on Tue 14 Aug 2012 09:10 AM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Magsmg   South Africa  (2 posts)  Bio
Date Reply #2 on Tue 14 Aug 2012 09:21 AM (UTC)
Message
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?
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 15 Aug 2012 06:07 AM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,319 views.

Postings by administrators only.

Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.