----Original Message---- From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf Of bonzadog Sent: 22 August 2012 15:59 To: AVR-Chat@yahoogroups.com Subject: Re: [AVR-Chat] Re: fast controller > Could you please give an example. I do find it hard to > believe a 100Mhz > system is being overperformed by a > much lower speed 16Mhz. Perhaps the HW (UI,UART,CAN etc) > on the 16Mhz > is perhaps faster or offers more > possibilities? OK - the task was to pulse width modulate a number of LEDs in software by wiggling pins, while receiving serial data commands. I was surprised to find that the AVR can do 8 bit PWM faster. In fact in many bit-twiddling applications you can get better speed out of an AVR. I came to the conclusion it was mostly down to the instruction pipelining on the ARM devices which is very inefficient when jumping around code (I was using an ARM7 device, the Cortex-M3 devices are better). Basically every time you do a jump it wastes 6 cycles loading the next instruction. Also the AVR port bit set/clear instructions only take 1 cycle whereas the ARM takes 4 or 6. If the PWM is more than 8 bit then the ARM was faster (just). -- Tim Mitchell
Message
RE: [AVR-Chat] Re: fast controller
2012-08-22 by Tim Mitchell
Attachments
- No local attachments were found for this message.