6
\$\begingroup\$

I would like to generate TED-like signal for VGA monitor input (Analog RGB + H/V-Sync). This is basically 16 pre-defined chroma values with 8 brightness levels applied, encoded as 7 bits: XBBBCCCC (4 bits chroma, 3 bits luma).

I would like to base my build on https://github.com/raspberrypi/pico-playground#scanout-video but minimize pins used (9 instead of 17 GPIO pins).

I'm thinking about building a resistor array that would drive RGB values off 4 chroma bits in the following ratio:

  • 1 bit 66% Red,
  • 1 bit 66% Green,
  • 1 bit 33% Red + 50% Blue,
  • 1 bit 33% Green + 50% Blue,

with added fixed luma bias and opamp for luma brightening - driven by 3 bit DAC (or VGA) - on each R/G/B channel.

That would give me following colors:

BBBCCCC colors

Not very artistic, but predictable and (I think) usable.

Unfortunately this method gives over-representation of whites, as I cannot whiten a white.

The questions I have:

  1. Does that even make sense - using resistors and opamps to generate such VGA signal?
  2. How do I work-out the resistor values?
  3. Any suggestions for opamps/VGAs? Or something else to drive 3 bit brightness?
  4. Could you suggest a better method of generating RGB signal from 4+3 bits encoded colors?

I did palette analysis of this color creation method and it is obvious that brightening by R/G/B amplification is sub-optimal (conical color-space coverage).

dawnbringer-palette-analysis dawnbringer-palette-analysis

censor-palette-analysis censor-palette-analysis

Especially compared to how "evenly" TED colors cover the spectrum:

Plus4 dawnbringer-palette-analysis Plus4 dawnbringer-palette-analysis

Plus4 censor-palette-analysis Plus4 censor-palette-analysis

\$\endgroup\$
5
  • 1
    \$\begingroup\$ it may be a job for an FPGA \$\endgroup\$
    – jsotola
    Aug 14 at 21:25
  • \$\begingroup\$ Back in the day of VGA, a RAMDAC chip was used. It contains a color look-up table, sometimes called a palette, which you can write yourself, so your 8-bit code per pixel can output any 18-bit colour you want. Of course you can use resistors and op-amps. Select resistors based on the colours you want. You can simulate the colours in Paint or whatever drawing program that allows you to set RGB colour values yourself. \$\endgroup\$
    – Justme
    Aug 15 at 5:29
  • \$\begingroup\$ What is that software you used to analyze the palette? \$\endgroup\$
    – marcelm
    Aug 16 at 19:50
  • 1
    \$\begingroup\$ @marcelm lospec.com/palettes/dawnbringer-palette-analyser and lospec.com/palettes/censor-palette-analyser \$\endgroup\$
    – smokku
    Aug 19 at 22:59
  • \$\begingroup\$ @smokku Cool, thanks! \$\endgroup\$
    – marcelm
    Aug 20 at 10:04

1 Answer 1

3
\$\begingroup\$

A RP2040 chip costs what, about a dollar inflated?

Almost anything else you'd add to the circuit as a better "video generator" would cost more. For single or small quantity projects, just toss a 2nd Pico as a video generator.

For volume products, you'd be putting those RP2040s on a PCB anyway, and unless the volume is huge, it doesn't matter very much whether you put one down or ten. They cost silly money. They consume little power relative to what they do, and they have reasonable energy-savings features. All 2040s can be loaded from a single EEPROM - one RP2040 is a master, boots itself, then loads the others with code.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.