Quantcast
Viewing all articles
Browse latest Browse all 20639

BASCOM-AVR : WS2811/2812 LED strip & Assembler code : REPLY

[quote:f32539ede8="MWS"][quote:f32539ede8="Flyby123"]Till now I tested all the routines and nothing running beside that. I will test the various codes & options in larger programs with other time & interrupt critical routines and give some feedback on performance.[/quote:f32539ede8] The ASM-version should work well and don't disturb other code that much, included interrupt code. But sure, I'm interested to hear about your results. [quote:f32539ede8]The color sequence vs array pos. I stated are for those interested in coding/addressing the ledarr() in such way that only led position and color is needed (maybe with overlays and such).[/quote:f32539ede8] You don't need an overlay, the led-array is already one linear array. For setting the color, only the desired led has to be multiplied by 3 and an offset added for each colour, you can do that in a sub(). [quote:f32539ede8]For that matter, it is the same sequence in both the "ASM NOP snake" and the DMA based code.[/quote:f32539ede8] Also the NOP-snake can do the job, it depends on the desired update-rate, convenience of use and whether other interrupts are active. For example: the snake doesn't like to be interrupted, it would destroy the timing. For using it with interrupts, you need to disable interrupts before executing and re-enable them after. My self-propelling DMA-code doesn't care, you only need to set other interrupts to a lower priority level. So if you use it with other interrupts, make this change: [code:1:f32539ede8]Config Dmach0 = ..., Tci = Hi ,... ' change interrupt priority for both channels to Hi Config Dmach1 = ..., Tci = Hi ,... ... Config Priority = Static , Vector = Application , Lo = Enabled , Med = Enabled , Hi = Enabled[/code:1:f32539ede8] and use Lo/Med for other interrupts. Also make sure that HW-stack is big enough.[/quote:f32539ede8]

Viewing all articles
Browse latest Browse all 20639

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>