VGA Color on 3 pins..... Concept and ideas for maximum colors
Cluso99
Posts: 18,069
I have 3 prop pins for VGA use...
I want the maximum colors possible (I want my cake and eat it too!)
How can this be achieved...
Lets call the 3 pins R, G & B for outputting to the RGB of the VGA. Now, to get HS & VS I can tristate the R pin and circuitry can detect this and switch the G & B pins to now output HS & VS on those pins. This solves the HS & VS and now gives us back the 3 pins for the RGB colors.
So, with 3 pins, how can I gain the most colors?
Lets assume that each pin connects ultimately to it's respective R, G & B output. Now we can examine a pin to find the best circuit. Each pin has 2 states, low and high (tristate is not possible within the pixel frame in the vga counters).
By connecting a buffer and an inverter to the pin, we can use a different resistor value to obtain 2 different values for the color pin. Obviously, we now lose black.
So now we have 3 pins able to each produce 2 primary color hues (is this the correct term?). So now we have a total of 8 colors (but black is impossible here).
Does anyone have any other ideas?
BTW I am looking for a cheap solution so almost all programmable logic will be too expensive, and in that case, I may as well use a second propeller!
By buffering the pin we
I want the maximum colors possible (I want my cake and eat it too!)
How can this be achieved...
Lets call the 3 pins R, G & B for outputting to the RGB of the VGA. Now, to get HS & VS I can tristate the R pin and circuitry can detect this and switch the G & B pins to now output HS & VS on those pins. This solves the HS & VS and now gives us back the 3 pins for the RGB colors.
So, with 3 pins, how can I gain the most colors?
Lets assume that each pin connects ultimately to it's respective R, G & B output. Now we can examine a pin to find the best circuit. Each pin has 2 states, low and high (tristate is not possible within the pixel frame in the vga counters).
By connecting a buffer and an inverter to the pin, we can use a different resistor value to obtain 2 different values for the color pin. Obviously, we now lose black.
So now we have 3 pins able to each produce 2 primary color hues (is this the correct term?). So now we have a total of 8 colors (but black is impossible here).
Does anyone have any other ideas?
BTW I am looking for a cheap solution so almost all programmable logic will be too expensive, and in that case, I may as well use a second propeller!
By buffering the pin we
Comments
Adding tristate logic to the other pins would give you 2 sets of 4 pixel colors selectable on a per-line basis.
I'm going down the same road, and it is a road already traveled by Baggers et al, ie a devoted propeller for graphics. They are using two props and I'm looking at one prop plus an external ram. 256x224 works now for TV and so VGA could be the next challenge. The more pins for the ram chip, the faster it goes, and so your HS/VS tristate trick could be very useful. I'm thinking 2 pins for serial comms to talk to the board, 6 for VGA and 24 for ram and a latch...
Eric: That's a nice idea worth considering
BTW: I looked at CPLDs but they are big (12x12mm which is basically prop size) or power hungry.
Thinking about it, I guess 8 basic colors is going to be pretty much it, with 1 of them being black. Perhaps Erics suggestion makes the most sense.
CPLDs do come smaller, but a CPLD will always be more costly that a latch on the SRAM.
So why not add the cheapest extra chip, Latch the RAM, and simply free up some pins, for more Colors ?
Or, still slightly ahead of a PLD solution, is cheap SRAM, under $1.50/100+, would give you a 256 colour palette.?