First, Im not going to laugh at you not understanding ASM, I don't either. but your on a forum for pick basic pro, so ASM is almost a moot point. What your wanting to do is only 1 line of code other than your pin setting statements. and is easily available in every pic basic pro manual, and instructional book out there. its probobly under the HPWM code, the 683 is a great chip for that exact code, as thats the same I am using for that purpose except im not driving leds.
You really should try doing a search before posting a question, ive seen this code in the forum, I know im bad about asking questions that are already out there too, but I do try to look up some of the answers first.
Also Dont use others posts to ask a question that doesnt really help that persons post get answered, the post here is how to drive 2 PWM from a 683 chip, as far as I know it cant be done, and it looks like they have went to another chip to solve this. this thread should be on its way to being a dead thread. However if someone keeps adding other info in it keeps it alive and will hinder people that are looking at the article for info, they dont find what their looking for. Go ahead and post a thread with your question, there may be someone out there that needs that direct question answered later on and your thread could help, where the tile of this one would not.
I will answer your question with a direct statement out of an instruction book
HPWM
HPWM Channel, Dutycycle, Frequency
Some PIC microcontrollers have one or more built-in circuits to generate pulse width–modulated
square-wave signals (PWM). For example, PIC16F877 has two PWM Channels. Channel 1 is
known as CCP1 (also PORTC.2) and Channel 2 is known as CCP2 (also PORTC.1).
Dutycycle can vary from 0 to 255 which corresponds to 0% (low all the time) to 100% (high all
the time), respectively. A value of 127 gives 50% duty cycle. The highest Frequency is 32,767 Hz,
and on microcontrollers with two channels, the Frequency must be the same on both channels.
The PWM signal is output from the specified pin continuously in the background while the program
executes other instructions.
In the following example, a 1 kHz, 50% duty cycle PWM signal is generated from Channel 1
(CCP1) of a PIC16F683 type microcontroller:
HPWM 1, 127, 1000
this is copied directly from 30 Projects Using PIC BASIC and PIC BASIC PRO
this book came out in 2006, and is available on Google Books for free.
it pretty much teaches you everything you need to know.
I
Bookmarks