Monochrome VGA...
siljamicke
Posts: 66
Is it possible to cut down on the number of pins required for a VGA connection if, say i only wanted Green monochrome output, i.e. variable luminances of green? Or for that matter, even just green and black? Or red and black... cool ;D
Comments
Look on Yours Private massage BOX on forum.
I have a massage box? Nice!
Just kidding, no offence!
Thanks! Since i want to both go for simplicity as well as low pin count, i will probably start off by trying to modify the driver to use 3 or 4 pins!
Why is there no such driver already? Surely someone more than me would love that green ATM-style video. Or am i off here, wouldn't it look as cool as i picture it?
-Phil
I think you meant no offense.
The grammar police are everywhere....
-Phil
I like the retro green on black. And yes, it will free up some precious pins.
As for 'offence', that is how it is spelt in Australia too. Along with colour, and centre.
The Pedant Police have just pulled up with lights and sirens, to point out that this may provoke a demarcation dispute, as this is not the jurisdiction of the Grammar Police, but rather the Spelling Police *grin*.
3v3 --- 10K --(A)-- 5K --(B)-- 5K -- (C) -- 10K --- GND
(B) is the prop HS/VS pin.
(A) is connected to an inverter so that when HS/VS=1 the inverter outputs low for, say HS.
(C) is connected to a buffer (or 2 inverters) so that when HS/VS=0 the buffer outputs low for, say VS
When HS/VS=tristate, both the inverter and buffer output high.
The inverter & buffer (2 series inverters) can be built using 3 inverters from 74LVC04. I have suggested using a 74LVC2G86 dual xor 8pin chip instead by tying the second input to the (A) gate to gnd and the second input to the (C) gate to 3v3.
Both of these circuits have been published in previous threads. I don't think any VGA code has been done to implement this.
All this is just a couple of altered lines in the driver and rewiring the 15 pin, I will have to find the bits to show you (HDD failed, a while back)
Then in pasm also look at masks and the actual bits. Maybe it is easier than that, but I would expect that it would be worth a quick glance at every line of code with a view to asking whether the code needs changing.
I wonder if you could use external logic to do other color combinations than green on black? eg white on blue - a 1 would be decoded to 111 on RGB. And a 0 would be 001 (RGB). Though technically the blue will be a brighter cyan, so maybe you need some resistor logic as well so that 1 goes to 111 and 0 is 0,0,1/2.
I guess it depends if you want the mildly retro early 90's white on blue, or the mid retro mid 80s orange on black, or the even more retro 70's green on black.
All of these ought to be possible with one color pin and maybe one logic chip.
Cluso99 is probably going to show us some magic soon with the hsync and vsync signals. I have a vague feeling that with one-shot timers and logic chips it is possible to reduce from 3 pins...
Although I cheated the output logic to only use the bottom four of the eight usuals, I made no effort in sorting out the driver software. It did work with it being the bottom half of the top eight ie P24-27 without messing up the I2C or serial (the I2C switched over to be the KBD on H-sync startup, via a 4053)
What I want to know (for the 1pin cct for HS/VS) is if while VS is active=0 there are continued HS=0 pulses as this would require an extra bit of processing?
Next, in the colors of the waitvid command, are the lower 2 bits actually used. The spec says they are not, yet otherwise how is the HS & VS achieved?
Here is what I intend to do...
Put the XOR circuit on both of the BB pins, one to drive the VS when tristate, and one to drive the HS when tristate. This way, 2 pins will give me 4 colors including black, and HS & VS. However, I am going to feed those 2 pins into a cheap CPLD to recreate an 8pin VGA output for use with the normal 240R & 470R resistor network to a VGA connector. Now, more pins could be connected to the CPLD such as GG and then RR.
It just keeps coming back at you, doesn't it
I am nowhere able to understand what is involved in making this thing work. Just a dumb question, could you use the "1 color pin"-approach, and route via a simple switch to which pin (R/G/B) the color signal ends up in? Or pots for sweepable color?
Still looking for the following answers...
Looking for detailed timing specs (I googled but didn't find them with the time avail) - any good links?
While in VS do we also get HS pulses?
Colors in the waitvid command, are the lower 2 bits actually used? The spec says they are not, yet otherwise how is the HS & VS achieved?
The crystal-looking thing is a cheap three-pin ceramic resonator for the frequency you want to detect. In this configuration, it will pass that frequency only, while blocking everything else. The first Schmitt trigger inverter is biased so that only an output from the resonator that's high enough will will trigger it. Its output gets passed to a second Schmitt inverter configured as a one-shot, which sustains an output as long as the input keeps getting pulsed low.
I used the following program to test the concept. The resonator was a 20MHz unit from my junk drawer. I didn't have any DIP Schmitt triggers, so I had to settle for 74HC00 NAND gates. I wrote a program to output two frequencies in continuous sequence: 20 MHz and 20.25 MHz. Here's the code:
Here's a screen shot from my scope:
The top trace (cyan) is the frequency output from the Prop. The next trace (magenta) is the separate Prop output used only for triggering the scope, since it's hard to get a consistent trigger on two such close frequencies. The Third trace (yellow) is the output from the second inverter. (The glitch at the end of the pulse is a consequence of not using a Schmitt trigger.) The "on" delay for the sync output from a change form 20.25 MHz to 20 MHz is about 5.6 us; the "off" delay from a change from 20 MHz to 20.25 MHz, nearly zero. To be useful as an HSYNC output, the "on" delay would have to be shortened considerably, due to the front- and back-porch requirements. This might be realized by using a much higher frequency, such as 50 MHz. For vertical sync, it's not so critical.
Anyway, whether this is at all practical for a one-pin VGA implementation remains to be seen.
-Phil
I checked, but I haven't seen evidence of that being a problem. But, if it's a concern, just make sure that the frequencies selected for sync are not multiples of ~10 MHz.
-Phil
I have been trying to verify if HS occurs during the VS. I also thought that HS & VS were "0" pulses but they appear to be "1" pulses. I have been unable to find a waveform on google and my scope is burried in storage
My best efforts to understand the waitvid are indicating the RRGGBBHV in the colortable could actually be in any order and that all bits work identically. So we could just as well define them as RGBHRGBV and wire the hardware accordingly? Is this assumption correct? (BTW, Kye's VGA64_BMPEngine seems to be the easiest to understand the working of the video section of the prop.)
So, if my understanding is correct, then we should be able to exploit the video counters for many other purposes besides video.
See this page regarding VGA timing and sync polarities:
It's probably the most succinct of any I've found.
-Phil
-Phil
http://forums.parallax.com/showthread.php?128991-VGA-Cluso-s-2-pin-4-color-(inc-black)-VGA-circuit-(untested-amp-uncoded)&p=970544#post970544