I saw a method of doing this the other day that used the SPI shift register to spit the bits out, that took a large load of the uC as you just have to handle V and H-sync. Only mono of course.
Rob
I saw a method of doing this the other day that used the SPI shift register to spit the bits out, that took a large load of the uC as you just have to handle V and H-sync. Only mono of course.
Rob
Was that my method? I am using SPI and the output is mono.
But the processor still has to work pretty hard (well it would get bored otherwise wouldn't it?).
You have 32.746 uS to draw a line. The line consists of 20 characters (160 pixels). To spit them out using SPI means sending 20 bytes. The highest clock rate you can output with SPI is the processor clock rate / 2, which is once every 125 nS. So you must take:
125 * 20 * 8 = 20000 nS (20 uS).
So that leaves 12 uS over. It will take about 3 to enter and leave the ISR, which is required for synchronization. A couple more to load up the register with the correct line information. So really, not much spare time.
May have been, I guess you know about it then ![]()
Rob
From another thread:
db2db:
Your video project looks really nice. Do you have an easy suggestion if I just want larger letters or numbers on the screen?Or maybe just a single large number?
For something large I would probably go with the "colour" version which basically draws a large bitmap: 60 x 30 pixels.
Then store the patterns for whatever you want to display in progmem. The original text version has the bitmaps for every letter in it (one pit per pixel). You could expand that out to one byte per pixel. Then a letter or number would be 8 x 8 pixels, so you could fit 7 across and about 3 down. That also lets you choose the colour of each letter.
You can also see commands from the second Uno to clear the screen, clear a line, do cursor addressing, and scrolling:
Can you do text scrolling? just sending a text to the output atmega and make it scroll over the screen (left to right)? Could you show a video on that, like in the video I showed you before?
Thanks.
I haven't built in a "scroll sideways" interface option at this stage. Personally I wouldn't because of the artifacts you get when updating the screen buffer, so "smoothly scrolling sideways text" probably isn't going to work ... unless you can solve the timing issues.
You could do it to an extent by doing something like:
I suggest you make one up and try it out - the parts are only about $5 (depending on how much the connector costs).
I think it would be perfect for something like a home security system / weather monitoring where you want to have more text than you can fit onto an LCD, and don't mind a bit of flicker when it updates.
You could do it to an extent by doing something like:
Carriage-return (take you to column 1)
Clear to end of line
Cursor position to desired column
Draw desired text
wouldn't that make it scroll per character? I was thinking a per pixel scroll.
But I guess you're system is only able to position in rows and columns and not in pixels. So actually yours is a great system for text output aka LCD character displays
I suggest you make one up and try it out - the parts are only about $5
you are right, I should. Let's see if I can clip some things.
JO3RI:
wouldn't that make it scroll per character? I was thinking a per pixel scroll.
That's right. But to store individual pixels is going to take a lot of memory. As it is, each character is looked-up from a font array on the fly.
This isn't supposed to be as fancy as a sideways scrolling shooter. Not with a $5 chip.
The intention was to show that you could display 20 x 30 characters just using a Uno, and not having to spend $30 on a graphics board. And quite possibly more if you wanted bitmapped graphics.
The intention was to show that you could display 20 x 30 characters just using a Uno, and not having to spend $30 on a graphics board. And quite possibly more if you wanted bitmapped graphics.
yeah, sorry about that. But the thing is, I have been with the video-out library in my head the whole time. So I was thinking, you where making the same thing but for vga-out (and maybe it wouldn't be a bad idea, to do so)
any way good work. You could say, if you want something like the video-out library, why don't you try to make it yourself? Well it's over my head.
I know how to use it, but not how to make it.
Try this:
and:
It looks like the vertical is the same (60 Hz) so Timer 1 would be unchanged.
It also looks like the vertical sync pulses are the same (it still uses 525 lines).
So I would be inclined to try and see.
If what I read is correct the colour information is sent over 4 consecutive lines, I'm not too sure about that and don't have a CGA monitor to test it on. So you might get something to appear if you tweak delays a bit (eg. the delay at the start of each line).
Is it really a CRT (i.e. is it quite deep behind the screen?) or is it a plasma display?
Wow, a genuine "luggable".
Rob
I warn you that you won't get that resolution. All you can expect is what I showed on the first page of this thread, scaled into the screen. The processor just can't output discrete pulses fast enough.
Hi Nick,
I have played with your color version, it works fine! But what about color text and communication part? Are you try to add all parts together?
what about using two arduino? one for rgb and other one for v sync and h sync? lol
Maybe I'm completely wrong but: It is not possible to use a screen with buffer???
Something like the latch on 75HC595 Shift register IC. So you put in the buffer what you want to write, then activate the latch pin, and there is no need for refresh unless you need to change what is shown on the screen.
A screen like this will be perfect, because you can use relative big screens/resolutions with the Atmega IC's without overloading.
This was mentioned in a post above, but I want to ask the same question again, regarding combining Nick's work on generating sync (which seems to consume most of the cycles of an UNO and Sebastian Tomczak's work ( little-scale: Hacking VGA lines with Arduino ) which results in a very rudimentary but very cool "video synth".
Sebastian was grabbing his sync from an external source (in his demo he is using the signal from a computer).
So if one used a second UNO (or similar) could one use that to generate the RGB signals (which are actually being generated from an audio input source in Sebastian's project) and combine that with the sync being generated with Nick's project (on the first UNO) and merely "splice" the signals together at the actual cable socket?
Or better yet, could it all happen on one Arduino? I doubt that given the timing tightness being described, but even if I had to run it on two boards... I have a few laying around, and it would make a cool little AV synth.
Any thoughts?
Hi nick...i'm trying to figure out how to overlay some text on a vga signal....if i understood well just need to detect the vertical sync, count horizontal sync pulses and out some text (video sygnal) over the actual signal on the right time...is this correct?...how can I do this? could you give me some ligth on it?...I don't understand the screenfont.h format...how can i distiguished a single letter from this code?...(sorry for my english)
Nice work,
Quite Helpful too ![]()
Thank you Nick,
your site is awesome, explanatory kind of "makers" experience.
I have just made some experiments with your code, I'd will dig through to
modify it for my project's purposes.
Thank you so much for sharing it!
EDIT:
I spent some time with your code (and description) and I could not get gotoXY work properly.
I'm sending data from other arduino and I wanted following:
CLRSCR
GOTOXY 5,5
print some text
So I used several variation of
char xy[] = {5,5};
sendString (clearScreen);
sendString (gotoXY);sendString(xy);
// sendString (strcat(gotoXY,xy));
// sendString (gotoXY+xy);
// etc...
sendString ("Hi!\n");
Could you please point me to some good and working solution to that? Thx.
McHa