Very true, Olin. After looking at the datasheet again, I see that it was made quite clear. The lesson here (for me) is READ the datasheet! Sean At 08:24 AM 1/10/2003 -0500, you wrote: > > That makes perfect sense now (considering how the CCP module works). > > However, I don't think it actually explicitly states this in the >datasheet > > I have. I wish they made this more explicit. > >They did. See section 8.3.2 of DS3029C, page 61: "The following equation >is used to caclulate the PWM duty cycle in time:". Figure 8-3 on the same >page also shows a diagram of a CCP module in PWM mode. > > > I was just assuming that the > > duty worked as a fraction over 255 (i.e., 0 would be 0% and 255 would be > > 100%) but now I see how poor an assumption that was. > >*Think* about how that would have to be implemented. That would require a >division or other complicated logic to compute the number of oscillator >cycles for the PWM duty cycle time. > > >***************************************************************** >Embed Inc, embedded system specialists in Littleton Massachusetts >(978) 742-9014, http://www.embedinc.com > >-- >http://www.piclist.com#nomail Going offline? Don't AutoReply us! >email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body