I want program a POV ( spinning leds ) application with MIOS_C. So I need to switch leds on/off with a very high speed. What kind of speeds can I achieve ? Does it depend on the amount of outputs ( I want to use all the 128 pins ). I calculated that I need a refreshrate of about 25kHz ( 38 us ).
Any tips or things people experienced. Or do I just have to start programming and measuring the outputs with a scope ?
The DOUT registers are refreshed at 1 mS maximum, if you need higher frequencies, you need to write an own SR handler which is doing this (and nothing else) from the main thread (-> Tick()). The scan matrix examples are a good template, how to realize this.
Addendum: since the high update rate must be guaranteed for really good results, the MIOS ISRs should not run in background, the program should just loop itself. I’m also not sure, if programming this in C is a good choice, with assembly you would have better timings.
The MBHP_TV application is maybe a good programming example for such applications, it generates a TV picture which *must* be 100% accurate to the scanline frequency
Thank you for the fast answers. So if I understand it all well, its better to start with programming the PIC from scratch and not using the MIOS software (IRS?) at all ?
I wanted to use some midi control of the POV and doing some stuff on the BPM. It seemed to my it was easier to take the MIOS platform as basis ( as it already implements a lot of midi stuff of course ).