kennethlimpc, I looked at the code and it seems very hardware specific. So the code may compile but it most likely will not work. Pin assignments, timer1 usage and register manipulation are all not compatible with the STM32 Spark. Any thoughts?
That but more. TIMER1 is off limits since it is used by systicks, the core system timer. Second, the timer overflow is used to fire an XLAT pulse so we need to figure out how that works on the STM32 timers (should be ok). If servos are used, the code interferes with the existing servo library which also uses timers. I wonder if there is an existing driver for the SMT32 platform or even ARM. It may provide a better start.
Did a bit of research. I believe you may be right… it comes down to the timer and its interrupt. The pin-specific I/O can easily rewritten for the Spark. So, another member re-tasked TIMER2 in another topic. It may be worth looking at.
So the thing is I am not a very good C++ programmer. Especially when it comes to hardware programming.
What would be great is to be pointed to a resource that I can learn about all this timer/clock stuff that is used by all these chips so I can get a better understanding of how I could port libraries. So where on the internet can I learn about general hardware programming for stuff like this? I also need it for accelerometer that i would like to use.
I definitely am looking at wanting to use the tlc5940 library since it was very simple to setup in Arduino.
Has anyone made any progress on the library for the tlc5940 led driver?
I have a internship project where I have to use the tlc5940 so I am going to try and write a library for it.
I am looking for a library to use with a photon to control a TLC5940. Is there any update to this thread or does anyone have a link to one that has been worked out? Thanks!