Pages: [1]   Go Down
Author Topic: PWM  (Read 439 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
Arduino rocks
View Profile
PWM
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using an Arduino MEGA2560.

We are using the crystal timer in the chip to generate a PWM square wave
that we send out on a low voltage line.

That square wave must be within 985 and 1015 Hz.

The earlier boards we were using were generating a speed of exactly 980 and for some
reason it was working. But   newer boards are putting out 978 and it
will not work with the device communicating with the signal on the other
end.

Because the raw clock speed is 16 MHz, and it only allows you to divide it
by multiples of 2, we can't fine tune the square wave to what we need.

How can we do this with either hardware or software?

Any assistance or suggestion would be greatly appreciated.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 178
Posts: 12288
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
How can we do this with either hardware or software?

This changes the PWM frequency for timer 1 pins to 10 KHz but the technique is the same for any frequency...

http://arduino.cc/forum/index.php?topic=58757.0
Logged

Pages: [1]   Go Up
Jump to: