How to buffer data more efficiently?

Discussion in 'Embedded Systems and Microcontrollers' started by DavidHov, Sep 3, 2016.

  1. DavidHov

    Thread Starter New Member

    Sep 3, 2016
    2
    0
    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
     
  2. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    5 MegByte / 2 Mbps = 2.5 x 8 = 20 seconds to transfer

    Display time depends on the particular display, the interface, transfer rate, speed of display...

    External flash memory.
     
  3. NorthGuy

    Active Member

    Jun 28, 2014
    605
    121
    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.
     
  4. dannyf

    Well-Known Member

    Sep 13, 2015
    1,835
    367
    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.
     
Loading...