Direct addressing LCD pixel buffer

I started coding some basic coding on Fez Spider. I get some data out of SPI / UART module and transmit it through UDP. Alongside, I would like to have a visualization of data I am transmitting on the 4.3" Touch+LCD module. I initially coded the prototype using WPF and quickly realized that the performance was nowhere near where it needed to be.

I coded a quick prototype using RLP and demonstrated that I can fill memory buffer in the size needed quick enough to keep up with the data capture. However, the moment I push the byte array back out to managed code, turn it into Bitmap and flush it, the perf is completely blown again.

So, my logical conclusion it that I need to directly fill the LCM pixel buffer from my RLP code. There are hints elsewhere on the boards that this has been done successfully. But I cannot find documentation that shows the memory map to Fez Spider so I can tell where in the memory to dump the bits. Can someone point me to the doc?

My assumption is that once I have the starting address, rendering is a simple matter of writing a 16bit 5-6-5 coded pixel data onto the starting address + x*y offset to set pixel color.

If there is a better way to gain higher perf, I am open for suggestion.

Thank you.


You can use Register class to read the memory address.

Edit: Check this codeshare it has define for the base address

Thank you for the quick response. However, using the register class still requires the physical memory address of the LCM memory buffer, no? The datasheet for the Fez Spider or the EMX module does not seem to go into the level of detail needed to determine what the address is for the LCM memory buffer. Can you point me to a document that has the information?


There is a register in the LCD hardware that holds (we set it to) the VRAM address. Your code should not tie to a fixed address, instead read that register to determine where the memory is located.

To Architect:
I have seen that code share article. Yes, I have seen the base address that was coded in there. At the same time, I saw that it was written for a different module than mine and it was not clear if the base addresses were universal for all FEZ units nor was it clear where that value was obtained from.

To Gus:
The register location sounds very promising. Where can I find a document that tells me which register I need to read? I would much rather write a code that will work on both Spider and Hydra since I would like to run the same code on both.

Thank you both.


MCU datasheet should have register address.

Check this thread and reply #5

Took me a bit to wade through the NXP datasheet but I did find the info (and a whole lot more useful stuff for future). Thank you both for quick response. I think I am unblocked for now. Now, onto some code-writing.


Excellent! Looking forward to hear more about you project.

A quick epilogue on this issue.
With .Net MF / WPF code, I was getting the frame rate of about 1/2fps.
With native C RLP writing directly to display buffer, I am up to about 5fps.

Ideally, I would like to get to 15fps but I am not sure if that is achievable with Fez Spider. I can try with Fex Hydra I also have that has faster processor but ultimately, I cannot use that because it will preclude the use of the WiFi module.

Oh, the trade-offs.

Thank you for all the help.