Shop OBEX P1 Docs P2 Docs Learn Events
A question about VPins and VGroup — Parallax Forums

A question about VPins and VGroup

cbmeekscbmeeks Posts: 634
edited 2015-05-06 02:51 in Propeller 1
OK, let's say I have this following VCFG:
0_11_1_0_1_000_00000000000_001_0_01110000

If I read that correctly, that says I will be using Group 1 (pins P15..P8) which is 8 pins. Now, within those 8 pins, I will only output video using a MASK of VPins which is 01110000.

So, that translates to only outputting video on pins P14, P13 and P12.

My questions are:

1) Is that correct logic?

2) Does that mean I only have 8 logic levels of luma? Well, 7 really because one is lost to HSYNC. In other words, like having a 3 bit DAC with 000 = HSYNC, 111 = WHITE, 001 = BLACK and everything else = shades of gray?

3) What would happen if I used 11111111 as my mask for VPins? Would that mean I have an 8 bit DAC and 256"ish" shades of gray?

4) I am saying "shades of gray" (please, no movie book references!!). But, what I really mean is luma values. So that if I had 3 bit DAC and display red, would that mean I have 6 shades of red? (minus HSYNC and BLACK/0.3v)

Thanks!

Comments

  • potatoheadpotatohead Posts: 10,261
    edited 2015-05-04 11:19
    You end up with about 160 or so greys doing that with a linear R2R ladder type circuit. Beau did that at one point, I believe. A bunch of the values get used up as they are in the sync range and not useful for the active display.

    And yes, run the Prop in VGA mode, use all 8 pins, and generate grey scale composite. And you can mix 'n match too. If you want to use the Prop color system, you are limited to it's use of one DAC pin, but it does the phase work needed to produce color. Color can also be done in software, and there is code out there for that use case. If you are creative, add a few different resistors in there, change the mask, and get more luma values on most drivers.

    02 is actually black. 00 and 01 are both sync signals. Many displays will tolerate 01 in the display, but it's not standard.

    Yes, for a given hue, you get however many shades your luma circuit provides for. Run graphics_palette.spin for an example of this.

    For non-standard DAC circuits, most drivers can be modified to use them. It's all about that DAC, and the values needed to setup the sync properly. Once that is done, the propeller color circuit works with whatever luma is being generated. Software color is possible too. Eric Ball did a driver that generates the necessary color signals that way.
  • ericballericball Posts: 774
    edited 2015-05-05 08:53
    Just to be clear, VGA uses 3 signal wires (RGB) while composite TV uses a single wire with a color signal (phase=hue, amplitude=saturation) modulated on the luma (B&W) signal. So while 256 shades of red on VGA just needs an 8 bit DAC, doing the same for composite TV is considerably more difficult without an external modulator.

    On the Propeller all video is effectively software defined, although restricted due to the limitations of the Propeller hardware (even with custom drivers & output circuits).
  • cbmeekscbmeeks Posts: 634
    edited 2015-05-05 11:47
    Thanks for the info. :-)

    I've often wondered what a propeller driving an AD725 and an external DAC could do.
  • Cluso99Cluso99 Posts: 18,069
    edited 2015-05-06 02:51
    Not sure if you understand the props video circuitry present.

    The prop can do VGA using up to 8 pins (normally). In fact, you could use up to 10 pins - some time ago this was discussed on the forum here.

    Two pins are used for HSYNC and VSYNC.

    Normally 6 pins as 3 sets of 2 pins are used to generate the Red, Green and Blue respectively. Each pair of pins use an R2R ladder, and the prop can generate a DAC on each of these pins according to a CLUT (color lookup value). The VGA configuration determines how many data bits are used for these lookups.
    I am sure there is a better writeup than I have tried to explain. Just not sure where to point you to for this.
    To see the usual 8 pin 8 resistor circuit, see the circuit of one of the propeller boards with VGA.


    The prop can also generate B&W or Color NTSC or PAL. This is done on 3 pins using a R2R4R ladder. The fourth pin is rarely used, and is used to generate modulation to the old analog TV frequency. Sync is contained on the 3 pins.
Sign In or Register to comment.