I'd agree with Olin. In the 16F87x series you have two registers, = CCPR1l and CCPR1H that affect the duty cycle. You will need to break = your DUTY word up into two bytes, and assign them to the low and high = byte separately. =20 If you need help in how to accomplish this, just ask.=20 --Lawrence Lile ----- Original Message -----=20 From: Olin Lathrop=20 To: PICLIST@MITVMA.MIT.EDU=20 Sent: Monday, October 29, 2001 3:04 PM Subject: Re: [PIC]: Hardware PWM at low frequency? > The way I understand it, I should get 0% - 100% for a CCPR1L = from 0 - > 333. For these lower frequencies, if I slowly increase the DUTY = cycle up > to about CCPR1L =3D75 it ramps up to 100%. They it stays at 100% = until > ~CCPR1L =3D260 at which it instantly drops to 0%. From CCPR1L = =3D260 to 333 it > again ramps up to 100%. I haven't looked at any of your code, but this makes perfect sense. = CCPR1L is an 8 bit register, so it can only hold 0 to 255. If you try to = write 256 into it, you will only write the low 8 bits in reality, which are 0. ******************************************************************** Olin Lathrop, embedded systems consultant in Littleton Massachusetts (978) 742-9014, olin@embedinc.com, http://www.embedinc.com -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics