Shop OBEX P1 Docs P2 Docs Learn Events
Multi-cog timing questions - providing pixel data for VGA display — Parallax Forums

Multi-cog timing questions - providing pixel data for VGA display

WossnameWossname Posts: 174
edited 2012-02-27 08:16 in Propeller 1
Any VGA / multi-cog gurus out there?

I've been trying to modify the VGA demo (512x384 with tile driver method) in order to get full access to all the individual pixels and with some success too, so far so good.

However I'd like to have my code fetch a 32-bit value out of an off-board SRAM module - an operation that takes about 50 instructions. Doing that inline with the 67Hz VGA signal generation code causes the signal to lose sync (due to the extra time taken to get through the loop) and the LCD monitor shuts down into power saving mode (because it doesn't recognise the broken signal).

So I was wondering - if I do all my SRAM stuff in a separate cog I can use wrlong/rdlong to pass the data to the VGA cog. But how do I let the SRAM cog know that the VGA cog is ready to accept another set of 32 bits? If I set a flag then the SRAM cog would somehow have to wait for it to be set. And to add further annoyance, a third cog will be talking to the SRAM module as well and reads/writes are mutually exclusive!

What would be a sensible approach to this problem? I'm not looking for code particularly, just a strategy.

Thanks for reading :)
619 x 176 - 6K

Comments

  • RaymanRayman Posts: 14,844
    edited 2012-02-27 06:25
    You might want to check out my FlashPoint TV Bitmap viewer examples...

    What I did there is define a buffer in HUB RAM that one cog fills with bitmap data and the TV driver then uses for output...
  • WossnameWossname Posts: 174
    edited 2012-02-27 08:16
    That looks awesome. I'll check it out, thanks for that.
Sign In or Register to comment.