Post Created date
UPDI--Configuring with fuse setting??
davethomaspilot wrote:I need a LUT input for CCL.  The only one available if you use alternate TWI0 is LUT0   But you can route any pin to LUT0-IN0 via the event system...
Tuesday, 7 April 2020 - 22:14
UPDI--Configuring with fuse setting??
davethomaspilot wrote:I just want to make sure UPDI can safely be shared with another input.     It can, but if it's in UPDI mode, both the CPU and the UPDI unit...
Tuesday, 7 April 2020 - 15:21
Fast dividing by 5 and by 10 for uint32_t input data for ATMEGA16A
Ah, modular arithmetic... 4%5 = 4 but we can interpret it as -1, therefore (4^n)%5 = (-1)^n. This means the decimal representation of powers of 4 ends in either 4 or 6 (alternates...
Sunday, 5 April 2020 - 21:54
A Concept of Electrostatic Pump...
Looks similar to the one in #16. I remember this artificial muscle stuff was a very active field of research some years ago.
Sunday, 5 April 2020 - 15:52
A Concept of Electrostatic Pump...
  Ah ok I understand the concept now. The formula for the attractive force I found is where A is the area of the plates, V is the potential difference between them, d is the...
Saturday, 4 April 2020 - 22:55
A Concept of Electrostatic Pump...
Magnus1 wrote:It works, if capacitors actually squish when they charge,  if they dont, it doesnt work.   Ceramic caps do squish and expand, because of piezoelectric...
Saturday, 4 April 2020 - 20:40
Fast division of 32 bits by 5, code in assembly
Ah, I devised a simple hack to tilt the calculations in the right direction, I changed the lower order 0xCC into 0xCD. Now, I don't think this is actually mathematically...
Thursday, 2 April 2020 - 20:34
Fast division of 32 bits by 5, code in assembly
sparrow2 wrote:   So show the PC code you use, and see if we can "hack" some kind of check into that :)    Here, it's functionally equivalent but of course the...
Thursday, 2 April 2020 - 15:40
Fast division of 32 bits by 5, code in assembly
sparrow2 wrote:Have you checked for all values ?   Yes but I'm checking with C on a PC, to check in such detail would be a bit of a pain. Checking on an AVR with the...
Thursday, 2 April 2020 - 14:33
Fast division of 32 bits by 5, code in assembly
Ok, I fixed it at the cost of 5 cycles    .equ testval = 0xFFFFFFF0 .def zero = r25 .def magic = r24 start: ldi r19, byte4(testval) ldi r18, byte3(...
Thursday, 2 April 2020 - 13:53
Fast division of 32 bits by 5, code in assembly
I should have been more precise, the result is in r23:r22:r21:r20.   Anyway, I translated the algo to C so that I can test it better on a PC. I think I see some ways to...
Thursday, 2 April 2020 - 12:46
Fast division of 32 bits by 5, code in assembly
You're right it's messing up large numbers. Well, I expected precision would not be good, I guess I cut too many corners.
Thursday, 2 April 2020 - 11:27

Pages