Thanks for the help. I noticed that the max frequency is "o The base frequency for pins 5 and 6 is 62500 Hz." Can i achive more than 62khz ???
can i use inline assembler code to do the pwm for 500khz like these page i found Arduino Playground - AVR does the new galileo board pwm around 500khz or i can used a cheaper one 'prefered' ;):).
I have a lot of question cause i need to decide on a board to do this tasks.
For a 16MHz processor a frequency of 500KHz represents only 32 clock pulses. For 8 bits of PWM you require 256 times the clock rate. 500KHz * 256 = 128 MHz clock so it is not possible to have a PWM frequency this high with any arduino.
I just checked and the intelgalileo run from an intel 400mhz frequency, can it do the pwm of 500khz. It looks like it can theoretically achive 400,000,000รท256=1,562,500 ???? Can someone advice on this.
The problem with that processor is that while it is fast the I/O is very slow, because it goes through a 100KHz I2C bus.
I think there might be one pin that can output directly but I am not sure it is that fast.
i was looking at the Arduino Due ---> 168 PWM width control at 500 kHz. it is a 32 bit 84Mhz. i wanted the pwm to be part of a variable boost converter that i am trying to figure out and learn a few things on my spare time. or if i cannot make it to the boost in a satisfactory way to reuse the board for other things also. What do you guys advice.
I suggest researching the Due forum, the SAM3X pdf, Atmel, GitHub and elsewhere for more information. I don't believe you'll find a PWM library that will meet your needs, it would more than likely require register level programming and advanced level code development.
Aliaj00:
i wanted the pwm to be part of a variable boost converter that i am trying to figure out
It is the wrong approach to the project. Don't use a processor at all. This is a job for a very cheap dedicated switching circuit rather than a very expensive embedded processor.
The only thing you will learn is that this is the wrong approach.
thanks a lot for your support. will try to use a boost controller chip. while writing the reply to you. i tried to check for a cheap chip to do the variable boost controller and found this one:
LT3757AEDD#PBF Boost, Flyback, SEPIC, and Inverting Controller DFN 10 $2.94
its NOT expensive and from the preliminary data has the option to synchronize the clock externally making it configurable from any arduino with ad8950 or ad8951, for boost buck and fly-back. so it seem to be perfect candidate for arduino in numerous application/ more like experiments i may try it :). i also got the datasheet for chip used for the arduino due board thanks to the link from "dlloyd" that will surely help a lot.