Sadly passed away in 2015
- Nov 28, 2011
- Nov 28, 2011
Speed testing - the code that I have executes in 1,360uS, I can definitely cut some out of this (currently colours held in 16 bit but the chip only requires 12 bits per colour for example) but will have to add some more code to deal with the three colours separately. Also some code to change layer's but this will be small compared with the 60 leds x 3 colours x 12 bits for the main updates to the chips.
So.... the fact that exists is that current code is 1, 360us per update
1 update of a layer = 1,360uS, need 8 updates for the whole cube. Therefore the whole cube is turned on in total time of 8 x 1360uS = 10,880uS.
10,880us = 10.9mS = 0.00109S
10,880 us = 10.9 ms = 0.0109 seconds (not 0.00109 seconds)
BTW the letter that indicates seconds is always a lower case 's'. A capital S indicates Siemens, the unit of conductivity.
It would be if you had calculated the update time (in seconds) correctly. As it is, it looks like you are using up all your CPU power, plus a little bit, in the update ISR.If working frame rate is 100hz = 0.01S then the 0.00109S should be very adequate... Is my logic correct
You can reduce your multiplex rate to 80 Hz (12.5 ms) and get another 1.6 ms of execution time (in which to perform your calculations for the new colour values). At 80 Hz your ISR would be using 10.9 ms of every 12.5 ms, leaving 12.8% of your CPU power available for all other tasks.
One other point that I did want to check on the ICs. I had thought that I should keep the highs to each of the inputs at the same voltage. For example (for inputs 1 and 2) if I would have a high of +3.3V on input 1 and if I then needed a high on input 2 then I should also use+ 3.3V. Now, the way that this is set up then I will have a 5V high on pin 2 and then a high of 3.3V on pin 1. Reading through the datasheets (which don't mention anything other than a range of Vs )and your comments this seems to be ok and will work. Just curious that's all.?? (i.e if the high's are at different voltages then the logic will still work)
Yes, that's fine.
why take away the input decouple caps?
Because they'll slow down changes on the inputs. That's the purpose of decoupling capacitors (capacitors connected between a supply rail and the common rail (aka 0V)). They keep the voltage difference between the rail and 0V steady. That's great if you have a supply rail that you want to stay at a constant stable voltage, but it's not appropriate for signals which need to be able to change quickly.
Bye the way - the suggestion with the voltmeter measuring the average current. That is an excellent trick - does it really work?. My volt meter, while digital and quite accurate (and very budget basement!!) seems to take a little while to update to changes in voltage/resistance, I think this would hamper any average testing like suggested.
It works fine, as long as the frequency of the signal being measured is a lot faster than the voltage averaging circuitry inside the multimeter. A frequency of 100 Hz, or faster, will be smoothed out by the multimeter, which will indicate the average voltage.