PicPuter

  Home
  Products
  Contact

Using

  Download
  Manual
  Examples
  UserGroup

Development

  Revision
  Future
  Bugs

Other

  DLHexRec
  Modd Audio
  Veracity
  DSP
  Blinky

Miscellaneous

  Links
  Search
  Obsolete
  Site Design
  Disclaimer

 
.
PicPuter 2.0 : Using the Pulse Width Modulators

Initial PWM docs.
 
Using Radio Controlled Servos

Each of the 4 PWN can be used to control a radio control servo. Such servos require a pulse with a width from 0.5 uS to 1.5 uS. Servos run at 5V but require a lot of power, especially under load, you should not try to power a servo using a small voltage regulator such as the on on the PicPuter1 board. Use a separate voltage regulator for powering the motor of your servo.

Since PicPuter switches 12 times a uSecond, you get 12 positions for your servo. Moving a servo is as easy as changing PW0 from 6 to 7. The PP0 variable should be set to 255, and the PW0 should range from 6 to 18.
 
Making Music

The Pulse Width modulators can also be used to make simple sounds.

The frequency of a note is determinened by the fomulula frequency = (440/32) * (2 ^ ((midi_note_number-9)/12) )

while the frequency of the PWM is determined by yhe formula tick = 1/12000 second frequency=1/(x*tick)

more later.
This webpage is © Copyright 2001,2002,2003 by Todd Modjeski - All Rights Reserved - built Mon Jan 26 22:48:30 2004