I'm still searching for what I was talking about. I KNOW I read somewhere awhile back that PBP was inserting the CLEARWDT before each PBP command (not PIC instruction) starting with one of the newer versions. It used to be after the command in the older versions, and it used to be not nearly as often as needed. Back when I first got PBP 2.3.something, the WDT would kick out once in awhile, and the .lst file showed CLEARWDT almost at random places, really didn't correspond well with how much time a specific sequence of instructions would use or anything.
At any rate, yes, 'automatically inserted at appropriate places'...in which the appropriate place would be before an instruction vs. after it.
Regardless, the faster you run thru the PWM routine posted earlier, with the smaller duty cycles, the greater the percentage of CLEARWDT instructions executed per unit time.
Although I don't know in this case if those 'extra' CLEARWDT instructions would account for the 2x difference in frequency. Hardware/Interrupt driven PWM is still the way to go.
Bookmarks