The Arduino documentation states that the maximum resolution of the PWM analogWrite (not the DAC analogWrite) is 12 bits. However the SAMD21 has 16-bit timer/counters and the actual resolution is 16 bits. So you can call analogWriteResolution(16) successfully. Because of the high resolution, the PWM frequency is a fairly low 732Hz, being 48MHz/65536. If the …
I’ve neglected blogging because I really don’t have any progress to show. I’ve been dealing with sketchy and possibly wrong documentation so have been tediously testing out each feature figuring out exactly what is needed and what is not needed to get things to work. The net result should be that the next book (on …
The SAMD21 has 7 clock sources. Each clock source can drive one or more of the nine Generic Clock Generators. The generic clock generators have a programmable clock divider, and each of the 37 peripheral clocks can be fed from one of the clock generators. This is a somewhat formidable mess. The Arduino boards that …
As I’ve been going far inside the SAMD21 Arduino boards, I’ve realized the main distinction of the ARM-core SAMD21 compared to the AVR architecture ATMega microcontrollers, and indeed to other microcontrollers I’ve used in the past. The ARM-core microcontrollers are actually a two part design. There is the ARM designed processor core, and the vendor …
While one usually thinks “ATmega328” when presented with “Arduino”, and that microcontroller does represent the highest volume of boards, more models use the SAMD21G18 microcontroller than any other. That’s 11 of 23 different Arduino boards. So having finished the 37 Sensors book, and taken some time off for other things, I am back to writing. …
I’ve previously shown that the SAMD21 is slower than the ATMega328P when accessing GPIO ports, however it does have a major advantage performing arithmetic. There’s quite an advantage to a 32-bit processor over an 8-bit processor. I was also interested in seeing the performance impact of using floating point, which is done in software on …
Finally I finished the first draft of my next book Son of Far Inside The Arduino* along with writing and testing about 35 example programs, almost all of which had to be tested on Arduino boards using the four different AVR microcontrollers the book covers. I think I spent more time on the example programs …