tahmod:
1.I read analogueWrite code in Arduino website, the frequency most of the pins is 490Hz, it is very slow?"The frequency of the PWM signal on most pins is approximately 490 Hz. On the Uno and similar boards, pins 5 and 6 have a frequency of approximately 980 Hz. " From the Arduino website
2. It is really this? I though the Microcontroller could output big frequency like it's clock 16MHz,
the 16MHz is only for the program speed and the 490Hz for the output of the microcontroller frequency?
A PWM (Pulse Width Modulation) signal has a completely different purpose from the 16MHz Arduino clock. The purpose of PWM is to control (for example) an electric motor by switching the power of and on quickly. If the pulse width is narrow the power will be off for most of the time and the motor will run slowly. If the pulse width is wide the power will be on most of the time so the motor will run quickly. The PWM frequency is chosen to be suitable for its task. If you supplied a 16MHz PWM frequency to an electric motor it wouldn't work.
You should also be aware that although the Arduino clock runs at 16MHz it usually takes a few instructions (i.e. a few clock cycles) to do anything useful so that the output from Arduino pins will always be much slower than 16MHz.
...R