Shop OBEX P1 Docs P2 Docs Learn Events
ColorPtr and AN004 [Getting Started with VGA ... ] — Parallax Forums

ColorPtr and AN004 [Getting Started with VGA ... ]

atexit8atexit8 Posts: 13
edited 2014-09-12 21:36 in General Discussion
ColorPtr — A pointer to up to 64 words that define the foreground and background colors for each text row. The lower byte of each word contains the foreground RGB color for that row, while the upper byte contains the background RGB color for that row. The RGB data in each byte is in 2-bits-per-channel format in the following order:
%RRGGBB00 = RGB [2:2:2:0], where the lower 2 bits are always 0.
Each color has 4 possible intensity levels, so there are 4*4*4=64 possible colors for each row’s foreground and background color. For example, the color word %%0020_3300 would be yellow on blue.

Can someone explain how %%0020_3300 equates to yellow on blue?

Also what does the %% mean?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-09-12 08:54
    The %% signifies base 4 (i.e. two bits per digit. So %%0020 == R = 0, G = 0, B = 2; and %3300 == R = 3, G = 3, B = 0. Red and green combined give yellow.

    -Phil
  • atexit8atexit8 Posts: 13
    edited 2014-09-12 10:58
    Thank you.

    How does a blue of 2 appear to the human eye versus blue of 1 or 3?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2014-09-12 12:20
    1 would be dimmest, 2 medium, and 3 brightest.

    -Phil
  • atexit8atexit8 Posts: 13
    edited 2014-09-12 12:57
    Thank you.

    After getting to page 5, I realized that I would need a Propeller development board which probably is not the same as my Propeller QuickStart board.
  • kwinnkwinn Posts: 8,697
    edited 2014-09-12 13:59
    atexit8 wrote: »
    Thank you.

    After getting to page 5, I realized that I would need a Propeller development board which probably is not the same as my Propeller QuickStart board.

    Not really, you can add the resistors required for video to the board or as part of the cable. For short cables you can use twisted pairs with a signal and ground per pair for each signal. For a while I had a protoboard attached to the back of a monitor using such a cable and it worked fine.
  • GenetixGenetix Posts: 1,754
    edited 2014-09-12 21:36
    As Kwinn mentioned the QuickStart board doesn't have the video circuits built in so you would need to use one of the following:
    http://www.parallax.com/product/40003
    http://www.parallax.com/product/28076
    http://www.parallax.com/product/28075

    Or you could build the circuit yourself using the circuit in the lower right corner. The LEDs are not necessary, only the resistor circuits to the DB15 connector.
    http://www.parallax.com/downloads/propeller-demo-board-schematic
Sign In or Register to comment.