CHALLENGE: ==Graphics-object-compatible TV driver with SRAM buffer.==
Microcontrolled
Posts: 2,461
I am not currently offering a prize for this one: so for now it's just for the fame and glory of the parallax forums.· Your username will be annouced as winner in my signature for 3 months.·
This is the challenge: Create a standard TV driver that is compatible with an external SRAM chip in which it will use as the display buffer. The more fuctions the better; and you get even more points if you can make it able to run 2 screens at once on different cogs, since all buffer space must be on the external SRAM. I do not know anything about composite video, so I won't be trying to make this too. The driver MUST BE COMPATIBLE WITH·THE PARALLAX GRAPHICS DRIVER!!!
This is a just-for-fun contest that will hopefully challenge, create, and just give you something to do.·
Good Luck!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
This is the challenge: Create a standard TV driver that is compatible with an external SRAM chip in which it will use as the display buffer. The more fuctions the better; and you get even more points if you can make it able to run 2 screens at once on different cogs, since all buffer space must be on the external SRAM. I do not know anything about composite video, so I won't be trying to make this too. The driver MUST BE COMPATIBLE WITH·THE PARALLAX GRAPHICS DRIVER!!!
This is a just-for-fun contest that will hopefully challenge, create, and just give you something to do.·
Good Luck!!!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
The difficulty comes from having to sync reads and writes from two different cogs that aren't going to be synced very well due to the way the graphics commands work. It may be possible to get the job done by just using the locks but there isn't any room in the graphics driver to fit anything more in unless you start using overlays or take stuff out.
I believe that Baggers or someone was experimenting with tv/vga drivers that used the 512kB hydra sram card. If you have a look in the hydra forum you should be able to find it.
so basically all the sram access time is used up by reading the display for rendering, during display time, you are then free to write to sram in the vertical borders and blanking time, not overly much time to update the whole screen, ie, you couldn't clear the frame buffer each frame because you would probably only get a third ( don't quote me on that third I just picked that out of thin air but it wouldn't be a LOT of writing time. ) cleared before the next frame,
You could however try for 16 colours per pixel, giving you more time, also maybe some time for writing some bytes during screen display time too.
I've got a display driver working 256x192 8bit with sprites ( from hub-ram ) but i'm not overly happy with performance of updating the background.
will do some more jiggery pokery and show all as it were.
Baggers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://www.propgfx.co.uk/forum/·home of the PropGFX Lite
·
@jazzed: I have thought of that too. If you want, you could just write a combanation TV/Graphics driver.
@steavenmess2004: I have seen the one in the Hydra forum. The problem is, few people own a Hydra, and of those who do few people own an expantion card.
P.S. My signature is ready for the winner!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
Propeller SRAM TV driver winner: ==NOT COMPLEATED: 3 WEEKS UNTIL ENDING TIME==
Performance can be improved by writing more than a byte at a time with 2 COGs ... I've seen a PASM design using 5 COGS for block access. For 2 COGS, COG1 sets address, data, and enables ctra controlled write strobe, and triggers COG2; COG2 is the address stepper COG. By using a long write and 2 COGS, one can realistically get 3 instructions/byte for random long access or 2 instructions/byte for a block write.
The spin *move instruction loop takes 6 instructions per long (after setup) for block move. So if one creates a specialized longmove that sets address and signals the address stepper cog at startup, the situation looks better.
The net effect could be that the block move may add 8 instructions to the "block loop" per long vs spin's longmove (6 intra hub -> becomes -> 14 inter device).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Some alternatives do exist of course including having another cog handle the address [noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Post Edited (kuroneko) : 6/11/2009 11:39:59 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
Post Edited (jazzed) : 6/11/2009 11:56:55 PM GMT
1) The Sharp LQ043T3DX0A (PSP), the touch verion of that sold by Sparkfun
4.3", 480*272, 9MHz dot clock
This screen has very lean blanking intervals but a low dot clock
2) AU Optronics G065VN01 (TTL version)
6.5", 640*480, 20 MHz dot clock
This screen *may* have relatively large blanking intervals which would allow some sprite manipulation at the end of each horizontal line. According to the datasheet,
Horizontal max: 640 active pixel clocks + (130-430 blanking clocks) 430 is 40%, double the standard
Vertical max: 480 active lines + (40-142 blanking lines). 142 is 22.8%, again about double the standard.
*If* all stretches can be simultaneously exploited, that gives an overall active % of (640*480)/(1070*622) or 46%, leaving up to 54% of the time for SRAM writing
I should declare my own goal is just to prove the concept for static images at 20 Mhz. I probably will just pre-load the SRAMs at leisure using SPIN with a blank screen, then switch over to 'sync clocked display mode'. I'll do a simple PCB to suit the proto board. Then others more familiar with this PASM can work on the driver smarts.
tubular
Edit: sorry if it sounded like I was yelling at you. Things always read different then you type them to be.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
Propeller SRAM TV driver winner: ==NOT COMPLEATED: 3 WEEKS UNTIL ENDING TIME==
Post Edited (microcontrolled) : 6/12/2009 10:49:38 PM GMT
As indicated in the other thread it should be possible by adding a RGB to NSTC chip such as the AD723. I do intend trying this but haven't checked the detail on the required timing just yet. Due to the interlace it will require graphics written to two locations in the SRAM.
I don't have the AD723 yet but to have the LCDs handy
This schematic from the AD723 datasheet makes it look quite possible...
There's two benefits to this: one, it does the hard work of generating the NTSC signal so your front end can be simpler. Both in the respect of not needing to do the hard programming, but also in terms of the front-end cog not needing to spend *time* doing the NTSC. I've pretty much convinced myself that there is not enough time to do a lot of the more complicated things in the same cog as what's generating the NTSC; I'm pretty sure for a lot of these things (accessing SRAM being one of them) you're going to need 2 cogs, one to talk to the RAM, the other to make the NTSC.
But the other benefit is that having this buffer of some number of scanlines allows the front end to have time to "catch up" during the lull periods while the NTSC driver is waiting for HSyncs and VSyncs. I originally wrote the driver for my Prop6502 laptop; I wanted to make a TV driver that used the 6502's SRAM as a framebuffer. The fastest I was able to overclock the 6502 to pull data from the SRAM chip was 3.6 MB/sec, and I needed at least 3.8 MB/sec to keep up with the TV scan! But, if I made the buffer big enough, I could pre-load part of the frame, fall behind throughout the whole frame because my data pull can't keep up, but by the time we get to the end of the frame it's Vsync time and I can catch up and preload lines for the next frame.
I've started and stopped working on this driver over a course of about 2 years - I keep getting busy and not finishing it. The state that it's at right now, if I recall, is that it does work to generate NTSC from a framebuffer, but currently it uses a rolling buffer that's still as large as all the scanlines. That's because the part I haven't finished is the design of the synchronization mechanism that will tell the front end what scanline it's on and when to run & when to stop (because if the frontend goes too fast, it could overwrite lines that haven't yet been displayed). The other part not finished but planned is a way for the front end to tell the driver "whoa, whoa, I can't keep up!". When that happens, what you would do is set a flag in your front end code that says "I took too long to render this line; please DOUBLE UP on this last line when you display it (display same line twice in a row); meanwhile I'm going to elect to skip the next line and render the one after that."
Post Edited (Dennis Ferron) : 6/12/2009 9:09:36 PM GMT
I am developing a "Propeller moble device development kit" as soon as I get enough money, so this is just what I needed! However, to not interfere with the other developers I will reserve a special place for you in the annoucment if you evr get it made.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
Propeller SRAM TV driver winner: ==NOT COMPLEATED: 3 WEEKS UNTIL ENDING TIME==
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
Propeller SRAM TV driver winner: ==NOT COMPLEATED: 3 WEEKS UNTIL ENDING TIME==
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
-Phil
As far as I can tell, the 25 Mhz dot clock isn't required for VGA. What is required is accurate timing, but because of the highly divisable (/16) nature of the prescribed porch and sync intervals, it should be easy to underclock but with the same overall absolute timing. This is why I chose 0.75* - dot clock is 18.9 Mhz, 480 rather than 640 active pixels, but in the same 25.17 uSec active time.
Phil, I think the double buffering should be useful for interlaced video output.
I haven't designed up a PCB but am starting to think what could be done. I'm thinking mounting the SRAMs on both side of the board (TSSOP or perhaps even twin DIP) would at least keep up with the 0.1" pitch per pin.
tubular
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
Propeller SRAM TV driver winner: ==NOT COMPLEATED:·2 1/2·WEEKS UNTIL ENDING TIME==
If you want "Mobile Device Development Kit" hardware, why don't you just use a $15.00 Nokia Knockoff 1.5" LCD which has SDIO accessible SRAM (not TV fast) and controller already built in?· You could use the $40 on a breakout card with supporting regulator ... or custom board with a Propeller for about the same price. I have a device driver and graphics widgets you can use for your dev-kit already written.·Maybe you saw the video http://www.youtube.com/watch?v=YalcMqkdHEU .... There is Rayman's PSD of course ...·don't know if the·QVGA·has buffer memory or not.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
Propeller SRAM TV driver winner: ==NOT COMPLEATED:·2 1/2·WEEKS UNTIL ENDING TIME==
I've attached a picture of my hacked case, LCD, 3.6V NiMh·battery (3x1.2V), and a quarter. The Propeller is on a hacked protoboard and mems accelerometer resting behind the LCD. The program is the same one from the video.
Problems to overcome are: finding an attractive case and keypad, designing a pcb for the case, and having a reasonable battery charger or 3AAA case (I'm using a cordless phone for charging now). I have no idea how to find such a small touch screen. At least the propeller has lots of free pins for this [noparse]:)[/noparse]
Anything else on this device should be in another thread I guess.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Steve
Propalyzer: Propeller PC Logic Analyzer
http://forums.parallax.com/showthread.php?p=788230
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
Propeller SRAM TV driver winner: ==NOT COMPLEATED:·2 1/2·WEEKS UNTIL ENDING TIME==
I see no reason why such a chip could not be produced at reasonable cost. This would essentially be an updated Intel 8275/Motorola 6845 with a built in processor.
The display parameters (dot clock frequency, H Sync, V Sync, H Pixels, V Pixels, etc.) would be programmable.
It should be able to handle 2meg of 8, 16, or 24 bit wide memory for 256, 64k, or 16M colors, and maximum resolution would be 1920x1080. If this resolution can’t be achieved economically then 1280x1024 or 1024x768 could be used.
Communications between the controller and the micro would be serial (I2C, SPI, ?) to minimize signal lines.
Objects to be displayed would be uploaded as sprites (widgets?) and commands would place them where wanted on the screen along with information to be displayed. The controller would update the ram image based on the commands sent by the microcontroller.
Oops, almost forgot the block diagram.
Post Edited (kwinn) : 6/21/2009 7:51:21 PM GMT