Code:
pin var yourport.x ' for instance PortB.7
Duty var byte
cycle var byte
PWM pin,duty,cycle ' right out of the book
. . . . . . Or,
PWM PORTB.7,127,100 ' RIGHT FROM THE BOOK 50% duty cycle @ 100 cycles
Alter the values in the variables to change the values of the Duty time and Cycle time.
you can change them using digital methods or analog a/d converters and a potentiometer.
to alter numbers just . . . duty = 130
.................................. cycle = 150
Last edited by Archangel; - 20th September 2008 at 09:29.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks