Code Monkey home page Code Monkey logo

Comments (2)

efthym avatar efthym commented on July 24, 2024

Hi. I've studied this repository recently for a similar project that I am planning. The main code regarding the led matrix is in matrix.c.

Here's the outline of how I think it works. Two operations happen in parallel after each latch/strobe pulse (which copies the scanned in data from the shift register to a latch/register):

  • The scan-in of the RGB pixel data using DMA. When all data have been scanned in, an interrupt handler is called (DMA2_Stream5_IRQHandler)
  • A timer (TIM3) is set which outputs the OE (output enable - active low) immediately and after some time OE becomes high (stop displaying) and an interrupt is triggered calling (TIM3_IRQHandler)

The above interrupt handlers must synchronize when the next latch/strobe pulse will happen (to load the just scanned-in data of a row). The last one of these handler to arrive, calls matrix_next(), which handles the latch/strobe pulse and prepares the next DMA transfer and the next timer-controlled OE pulse.

Initially I was buffled by the use of another timer (TIM1) in the code. This is set to trigger each DMA transfer. Normaly the DMA is triggered by a peripheral when it is ready to send/accept data. However the GPIO does not have this capability, hence the use of TIM1.

from ledmatrixhub75.

Frans-Willem avatar Frans-Willem commented on July 24, 2024

In case either of you is interested, I know I wrote a blog post at the time writing down my thoughts and why I ended up the way I did here:
https://fw.hardijzer.nl/?p=223

from ledmatrixhub75.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.