Shop OBEX P1 Docs P2 Docs Learn Events
Recycling Video Generators — Parallax Forums

Recycling Video Generators

HumanoidoHumanoido Posts: 5,770
edited 2012-08-15 12:41 in Propeller 1
A computing project uses LED outputs and no Video Generators are needed. However, the Propeller chip has two independent unused generators in each Cog. Instead of 16 generators going to waste, how can Video Generators be recycled into other purposes? Thank you.

Comments

  • Mark_TMark_T Posts: 1,981
    edited 2012-08-14 06:58
    Humanoido wrote: »
    A computing project uses LED outputs and no Video Generators are needed. However, the Propeller chip has two independent unused generators in each Cog. Instead of 16 generators going to waste, how can Video Generators be recycled into other purposes? Thank you.

    One video generator per cog.

    Well I've used one to pump bytes down a parallel interface to a LCD (to its framebuffer RAM, not VGA), but any output-only bytewide channel is suitable - fast R-2R DAC, sending addresses to ROM/FLASH/RAM (and data unless ROM). Feeding a fast parallel-in serial-out shift-register? Fast transfer between Props?

    And once you bring in the TV modes there are probably some clever RF signal generation possibilities.
  • ericballericball Posts: 774
    edited 2012-08-14 07:55
    The video generators are specialized shift registers. Thus they need regular updates (via WAITVID that blocks) to do anything useful; which is difficult to multiplex with other functionality. (In fact, it would probably be easier to find something for a display driver to do during vertical blanking.) The counters are more "fire & forget", which may lend themselves to integration with other code.
  • HumanoidoHumanoido Posts: 5,770
    edited 2012-08-15 03:55
    Mark_T wrote: »
    One video generator per cog.

    Does each generator occupy the Cog with its function or is it independent like a counter?
    Mark_T wrote: »
    Well I've used one to pump bytes down a parallel interface to a LCD (to its framebuffer RAM, not VGA), but any output-only bytewide channel is suitable - fast R-2R DAC, sending addresses to ROM/FLASH/RAM (and data unless ROM). Feeding a fast parallel-in serial-out shift-register? Fast transfer between Props? And once you bring in the TV modes there are probably some clever RF signal generation possibilities.
    The shift register could have some very interesting applications. What source is available, in addition to the Propeller Manual, to learn about a Generator's shift register functions? I'm currently looking at the HYDRA book.
  • ericballericball Posts: 774
    edited 2012-08-15 06:08
    Humanoido wrote: »
    Does each generator occupy the Cog with its function or is it independent like a counter?

    The shift register could have some very interesting applications. What source is available, in addition to the Propeller Manual, to learn about a Generator's shift register functions? I'm currently looking at the HYDRA book.

    I'd recommend reviewing the datasheet adn http://propeller.wikispaces.com/Video+Generator. But the basic overview is the video generator is controlled by the VCFG and VSCL registers and clocked by CTRA. Data is fed into the shift register & MUX using the WAITVID instruction which blocks until the shift register is reloaded. (If no WAITVID is active when the VSCL counter expires then it uses whatever is on the bus.)
  • JasonDorieJasonDorie Posts: 1,930
    edited 2012-08-15 12:41
    I've used the video generator to do clock pulsing of TLC5940 chips. It lets you run them at roughly 17,000 updates per second.

    I've also used it to do high speed SPI. For each data bit, you create two 2-bit pixels. The first pixel is your data bit + a high clock bit. The second pixel is the same data bit value, but this time with a low clock bit. Each nybble (4 bits) is a single data bit, so you can send 8 bits per 32 bit waitvid instruction. It takes some effort to format the data to output it this way, but once it's done, it can be sent very quickly.
Sign In or Register to comment.