How to buffer data more efficiently?

Thread Starter

DavidHov

Joined Sep 3, 2016
2
Planning on using a RN4677 BlueTooth module and a PIC32MZ2048EFH144 to send an image from my android to the PIC through bluetooth and display the image on a screen.

So android device sends wireless data to RN4677;
the RN4677 is hooked up to the PIC32MZ2048EFH144. PIC32MZ2048EFH144 also has a display attached to it.

Planning on using a 5" display. If it is a 640 x 480 display, that is 307,200 pixels of information. Approximately equivalent to 5Meg with of DATA. So for just a static photo that I will not have to update often, how often will it take to buffer and display?
https://learn.sparkfun.com/tutorials/bluetooth-basics/common-versions
BlueTooth Classic (2.1) can do up to 3Mbps data rates, but 2Mpbs is more
realistic.

Any ideas on how to buffer all that data so it updates nicely for when I do change the image?

Thanks
 

NorthGuy

Joined Jun 28, 2014
611
If it is a 640 x 480 display, that is 307,200 pixels of information. Approximately equivalent to 5Meg with of DATA.
How's that 5 MBytes of data? Even with 24-bit colors it's less than 1 MByte. If you use JPEG or other compressed format, it'll be much less than this. For example my 12MP camera's highest quality JPEGs are 6-7MBytes at most. So, you only need about 200 KBytes for high quality JPEG.
 

dannyf

Joined Sep 13, 2015
2,197
that is 307,200 pixels of information
you will need to figure out how many bytes there are per pixel.

The best approach would be to use two buffers, one for receiving, and another for sending, ping-pong style. Coupled with DMA, this approach allows seamless transmission from the blue tooth to the mcu, and then from the mcu to the display, with minimum mcu participation.
 
Top