Author Topic: ATmeage32U4 floating point calculations per second?  (Read 2055 times)

0 Members and 1 Guest are viewing this topic.

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 10027
  • Country: my
  • reassessing directives...
Re: ATmeage32U4 floating point calculations per second?
« Reply #25 on: February 22, 2019, 07:04:11 am »
Thread: how to know how many calc per second? Answer: you dont need float math (wave jedi hand).. :palm: this is how my wife answer things. Her reason is because i know what you want in mind, she actually can read mind :o (but sadly, most of the time she's wrong about what i have in mind) i'm wondering am i the abnormal one?  My answer is do whatever calculation you want in a loop, simulated or real code doesnt matter, and then at the end of before the loop, toggle a io pin, and probe with dso. This give you indisputable freq figure of the calc, the real life performance or near about. whatever math library you are using. You want more efficient code? ask again in another thread.
« Last Edit: February 22, 2019, 08:48:15 am by Mechatrommer »
It's extremely difficult to start life.. one features of nature.. physical laws are mathematical theory of great beauty... You may wonder Why? our knowledge shows that nature is so constructed. We simply have to accept it. One could describe the situation by saying that... (Paul Dirac)
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4644
  • Country: au
  • Question Everything... Except This Statement
Re: ATmeage32U4 floating point calculations per second?
« Reply #26 on: February 22, 2019, 08:20:35 am »
Mechatrommer, this tripped my XY type problem senses, and indeed, really simple integer math can solve it, not fixed point, not even divide or root, just add subtract and multiply,

to 3dgeo, I now see what your doing with your led driver chips. the driver chips seem to be immediate update to me,

still 8 bit per colour per led per frame at 60Hz, Equals 151200 bits per second, I hope your running I2C at atleast 400KHz,

A possible alternative using SPI would let you update faster, then keep the leds on as long as possible, instead of currently having there large ripples from no time being left from the updates, and being able to update with a latch.

Method would be, while your showing your current update, you load up all the shift registers, turn off 1 pfet, toggle the latch, turn on the next pfet and then start loading the next frame.

e.g. https://au.mouser.com/datasheet/2/389/aled1642gw-973895.pdf

I will also say the spi transfers should not be too costly if you use CLK/2, With some overhead, the spi transfer would only be about 7% of your processor time.
« Last Edit: February 22, 2019, 08:34:05 am by Rerouter »
 

Offline 3dgeo

  • Frequent Contributor
  • **
  • Posts: 250
  • Country: au
Re: ATmeage32U4 floating point calculations per second?
« Reply #27 on: February 22, 2019, 01:47:56 pm »
I tried to troubleshoot whats happening and I managed to eliminate flickering, even tho fets doesn't switch off as clean and fast as I wish it wasn't  the problem, problem was too slow LED update time, but this is getting way out of topic. I will create another thread on troubleshooting, improving LED matrix.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf