Shop OBEX P1 Docs P2 Docs Learn Events
VGA resistors simulator ? — Parallax Forums

VGA resistors simulator ?

Hello everyone,

I want to use VGA with the Propeller. I know there are many codes and schematics available. I understand the principle of the DAC (Digital Audio Converter) connecting the outputs to the VGA's RGB pins. But I'd like to understand the relationship between the resistor values ​​and the resulting colors. Since this isn't specific to the Propeller, is there a simulator (online?) that allows me to see the colors obtained based on the resistor values? For 1 bit per component, 2 bits, etc. Thank you and happy holidays to all.

P.S.: This message is an automatic translation.

Comments

  • RaymanRayman Posts: 15,933

    Well, think the RGB inputs of a monitor are 75 Ohms. The max signal level is around 0.7 V. So, 0.7 V on all RGB gives you brightest white.

    The resistors form a resistive divider with the P1 output pins driving them with either 3.3 V or 0 V. These are connected to one end of the 75 Ohm input resistance with the other end at ground...

    One could either do some math or use a circuit code, like LTSpice, to see what different resistor values would do...

  • evanhevanh Posts: 17,034
    edited 2025-12-31 00:01

    Ipk = 0.70 V / 75 R = 0.0093 A
    Vpkdrop = 3.3 V - 0.70 V = 2.6 V
    Rpkdrop = 2.6 V / 0.0093 A = 278.6 R

    Trial and error E96 values for 2-bit parallel resistances: 825 R and 412 R, which sums to 275 R parallel.
    EDIT: Err, zero ohms is probably a little optimistic on Prop1 output drive strength ... hmm, datasheet doesn't say on-resistance of outputs. Lets say 40 ohms.
    825 - 40 = 787 R (E96)
    412 - 40 = 374 R (E96)

    EDIT2: Could also be less precise and go with three equal value (787 R or 768 R) resistors, two paralleled for high bit, and one for low bit.

  • This has been hashed out before, the correct values of network for the usual 6bpp VGA circuit are 270Ω for the MSB, 510Ω for the LSB, 130Ω to ground for correct termination (can also do the more common 120Ω)

    Now the real challenge is finding the thread that originally came from.

  • RaymanRayman Posts: 15,933

    Guess one wants .7 v when both p1 pins turned on. Then, 1/3 step levels up to that …

  • @Wuerfel_21 said:
    Now the real challenge is finding the thread that originally came from.

    I think this:
    https://forums.parallax.com/discussion/140362/parallax-please-fix-your-vga-dacs/p1

    There are also the spreadsheets to use to calculate the values, and the less used 3-2-3 DAC option.

  • Hmm, that ha 240 for MSB instead of the 270 I listed/used - oops?

Sign In or Register to comment.