How to draw bounching ball on LEd ....

Discussion in 'Embedded Systems and Microcontrollers' started by RRITESH KAKKAR, Apr 14, 2013.

  1. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    Hi,

    I am working on LED display 8x32 with PIC16f877 and shift register 74164.....
    so, i need your suggestion if i want to make small animation like circle growing on led display..
    X1= X-N AND X+1
    Y1=Y-N AND Y+N
    WHERE N=1,2,3,4........
    but how to fill the in memory buffer (real time)???
    as we do for char was simple but in this i am not getting how to do, pls help..
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,388
    1,605
    You might consider an array to hold each pattern. An 8x32 display needs 32 bytes for a single image. If you mirror the left to right data you can get away with just 16 bytes, but you still need 16 arrays or 256 bytes for the entire animation.

    For each pattern you just read the array from 0 to 15, then 15 to 0 to fill each image.

    If you want lots of images you'll need something external to hold all the data.
     
  3. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    That mean i have to save the patter/all frame then display it??

    OK, if i will use this like real time than hpow to fill buffer???
    X1= X-N AND X+1
    Y1=Y-N AND Y+N
    WHERE N=1,2,3,4........
     
  4. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,684
    2,747
    Can also mirror up/down and reduce it to 8.
     
    ErnieM likes this.
  5. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    But how to fill in buffer in it, man!!
     
  6. mitko89

    Member

    Sep 20, 2012
    123
    19
    From what I read in your description it looks like an SPI controlled display. Do you know how the SPI interface works and how to control displays with it? What you need in my opinion is to use dynamic indication and to read from the datasheet of the uC how his SPI works.
     
  7. RRITESH KAKKAR

    Thread Starter Senior Member

    Jun 29, 2010
    2,831
    89
    The SPI is used for serial comm. but first there should be algorithm of saving pattern in buffer after that it should be displayed using shift register..
     
Loading...