P2 full motion video larger than RAM on a SSD1331
ke4pjw
Posts: 1,155
Thanks to @Rayman and @cheezus and others for getting fsrw running on the P2.
I will share the code and file needed for this to work ASAP. It really needs to be cleaned up.
Enjoy!
Update: Even faster and code is attached below
Code for this Project
I will share the code and file needed for this to work ASAP. It really needs to be cleaned up.
Enjoy!
Update: Even faster and code is attached below
Code for this Project
Comments
There's a LOT of places where the sd driver is going to be improved but there's a couple quick places that should help a lot. In SDSPI readblock and writeblock, changing
should give you a good bump to framerate, as long as you don't use a standard SD. There are some other changes that should be made but I left this in for compatibility. Once converted to ASM the overhead for supporting SD is an extra instruction but here it's significant.
That looks great. I'm glad you got it working and it turned out not to be very complex.
I imagine you haven't employed the streamer to make this happen, but when you do, you'll be able to get another speed boost - unless the SD card is the limit, which it sounds may the case.
What is the resolution of that tiny OLED screen?
Really nice work, makes me want to get back to writing RC3! If you'd like I can make the previously mentioned mods to sdspi for you to see if you can approach 30fps (or 29 or whatever source is). I'm really excited to see your source, might give me a boost with spawning cogs and /or smartpins. I have some notes and code to test over the next few days.
The SD card is not meeting it's full potential, there are several efficiencies that could be gained by just implementing block mode and implementing a frame buffer. @cheezus has pointed me in the right direction on that. Right now it's just reading two bytes from the SD and handing them off to the OLED cog to write them to the display and repeats until the file ends. That's done in 4 lines of spin.
The streamer is a bit intimidating, as things always are when you don't understand them I will see what can be done there.
The screen is the one Parallax sells, the "96 x 64 Color OLED Display Module" Product ID: 28087. Super cheap and works GREAT!
More to come!
--Terry
I will give this a try! Right now I suspect that the code is running in hubexec mode, so there may be some efficiencies to be gained there.
Is it using smart pins for the SPI implementation?
I see that it isn't. You might have a look at the 5 wire implementation I used for the display. It uses smartpins.
I'm working on a project to drive a small OLED display and currently am also doing this using SPI. I'm going to parallel not only to speed up the screen, but to also free up my processor to do other tasks. The less time it's sending serial data, the more time it has to do other tasks.