VGA Output

MPep

Senior Member
What should we use for counters? I'm thinking in particular about ripple delays if you cascade binary counters.
Simple, make the whole counter system SYNCHRONOUS. :)
Although, that does increase the peripheral IC count somewhat.

Always a trade-off, isn't there!
 

Minifig666

Senior Member
Dr Acula, at the risk of SMD soldering you could use an 18 and 8 or 36 bit wide RAM. You could give the RAM it's own battery supply (making it a NVRAM), then you wouldn't have to worry about setting VSYNC and HSYNC up each time.

This is my understanding of what I need to do so far in persudo basic:
Hsync low for 3.77 uS
Video low for 1.98 uS back porch
For b0 = 1 to 480
For b1 =1 to 640
Increment address counter and pulse the read pin on the RAM (with the output of the 25MHz crystal)
Next
Video low for 0.94uS (staying low) front porch
Hsync low for 3.77 uS
Video low for another 1.98uS next back porch
Next
VSYNC low for 0.06 mS
Goto top

I've missed the sync porches, I'll add them in a bit.
 
Last edited:

westaust55

Moderator
What should we use for counters? I'm thinking in particular about ripple delays if you cascade binary counters.
On the old video board I gave a link to previously at post 33 (OSI 540b) that used
a series of 74163; Presettable synchronous 4-bit binary counter; synchronous reset
some 74157 Quad 2-Line to 1-Line Data Selectors/Multiplexers
a few 74123 Dual Retriggerable One-Shot with Clear and Complementary Outputs
some 7400 and 7404 chips as time delays (few nano seconds per stage).

I recall when I modifieid my board I had to play with adding and tweaking some extra 7404 stages so features like inverse chat=racters aligned timewise with the actual character. That board had a lot of 74 series TTL chips and was about A4 page size.
 

moxhamj

New Member
Thanks for that old schematic. I like big PCBs with lots of TTL chips! Though I guess we must move with the times and embrace surface mount.

The 163 looks like the right sort of counter. I suspect some of that glue logic could be done these days on a micro.

Just out of interest, what is the fastest that one of the new picaxe chips can toggle a pin?
 
Last edited:

vttom

Senior Member
I actually did something a lot like this years ago using an EPROM to display a static image on a monitor (so rather than writing the memory with a PICAXE dynamically, I wrote a program on a PC to convert the contents of a BMP file into an appropriate HEX file that I burned into the EPROM)
I couldn't remember why I did this project until just now... I had a friend with a hi-fi VCR that he wanted to use for recording audio programs. But it wouldn't work right without an accompanying video signal. So I created this little box with an EPROM, oscillator, and some counters to create an NTSC-compliant signal that he could plug into the Video In on the VCR. We could've done it even more simply by just generating "black video" consisting of only sync pulses and no content, but we thought it would be fun to stick in a static image of something. Come to think of it, he's the one who wrote the program to generate the HEX file for the EPROM, so Lord knows what he ultimately burned to it for an image.
 

MartinM57

Moderator
...and according to the PWM wizard, pwmout C.1, 0, 1 will give a 50% duty cycle PWM output (i.e. a square wave) at about 21.5MHz on a 28x2 running at 64MHz

(but I took the DrAc's question literally, as in using explicit code to toggle outputs rather than using onboard peripherals (and I'm not sure there are ways of getting 2MBaud out of a PICAXE - maybe SFR pokeage could do it)
 

hippy

Ex-Staff (retired)
You can get quite narrow pulses out of a PICAXE using various tricks but, apart from PWM which is generated in hardware, you won't be able to bang those pulses out at a consistently similar rate. You'd be better off using a crystal module or a simple crystal oscillator.

Rather than struggle to find discrete logic IC's which run fast enough for counting and switching it may be easier to use CPLD or FPGA, especially as other logic can be taken inside, reducing footprints and making things easier. Who else remembers early graphic cards being multiple full-length ISA cards ( mostly memory chips ) ? The ZX81 with it's graphics using PLA was a technology marvel for its time.

Which leads to another potential resource - old home computers. Most of those either provided entire circuits or were reverse engineered. Many used specialisy video controller IC's but there may be some which are bit-mapped. Should certainly give some idea of what works and what doesn't.

http://en.wikipedia.org/wiki/List_of_home_computers_by_video_hardware etc
 

Minifig666

Senior Member
One solution I have found is to use a VGA device and hijack the timing signals. Then syncronise the data to the HSYNC pulses. With the aforementioned graphics card (assuming it doesn't require intalising by the PC) I can power it up and use the signals from that. Time for some testing!
 

hippy

Ex-Staff (retired)
I think it would be easier to use a PICmicro to generate the timing signals. At 64MHz you can bit bang to 62.5ns accuracy. An 8-pin at 40MHz would probably be good enough.

In fact the code's so simple it's probably an ideal first PICmicro project. You could even easily make that a monochome composite video test / cross-hatch generator.
 

Minifig666

Senior Member
I think it would be easier to use a PICmicro to generate the timing signals. At 64MHz you can bit bang to 62.5ns accuracy. An 8-pin at 40MHz would probably be good enough.

In fact the code's so simple it's probably an ideal first PICmicro project. You could even easily make that a monochome composite video test / cross-hatch generator.
Yeah, but this is more in keeping with the theme of the Minifig1, I would like to learn how to use proper PICs though, just PICAXE is so easy.
 

hippy

Ex-Staff (retired)
Yeah, but this is more in keeping with the theme of the Minifig1

As complicated, difficult and as costly as possible ? :) :)

It is your project though and whatever rocks your boat and keeps you happy.
 

Minifig666

Senior Member
That's about right there hippy. What about the cost of the programmer and the time to learn a PIC language?
 
Last edited:

john2051

New Member
Hi if all you want to do is to be able to use a vga monitor on a picaxe,
have a look at:-

http://microvga.com/uvga-images

I bought two of these for £19 each. I must admit, I havent tried them yet, but there seems to be alot of people using them, and the idea is sound.

regards John
 

westaust55

Moderator
John, those modules appear interesting.
Certainly post your results when you get around to testing one.

A more complete system that just the SV2000 chip.

The original poster, as I recall, after a few poists clarified a desire for graphics capability as well as text.
 
Top