The control of the slave chip depends on exactly what you're doing which is why I didn't go into more detail. If the PWM is always a period of exactly 17ms and a fixed on time, the control can be as simple as 1 IO line to turn it on or off. If the duty cycle will be variable, you have 5 input lines to specify 1 of 32 possible conditions. If your needs are even more complex, it's easy enough to clock in serial data. The key point is that the slave chip effectively gives you another running thread, so once you tell it the specs of the PWM, it will continue doing it with no action from the main chip. You said the code in the main chip is fairly time critical, so it seems like having the PWM be set-and-forget would be a big help. If you're chaging the PWM settings a lot, this probably wouldn't be a good solution. Jason ----- Original Message ----- From: "Robert B." To: Sent: Friday, April 23, 2004 1:08 AM Subject: Re: [PIC:] Slow PWM signal in hardware > Yeah the circuit is already built and put together, and the board is out of > room so I'm pretty much stuck with the 873A. It's working now, but out of > curiosity how would you recommend controlling the slave chip? It seems like > whatever code would be needed for controlling another chip could just as > easily generate the slow PWM instead. Are you thinking like a serial line? > or just a faster PWM from the 873A's CCP module? > > > ----- Original Message ----- > From: "Jason S" > To: > Sent: Friday, April 23, 2004 3:05 AM > Subject: Re: [PIC:] Slow PWM signal in hardware > > > > Does it have to be done in your 16F873A? You can program a 12F629 to be a > > slow PWM module (doing the work in software) fairly easily and then > control > > the 12F629 from the main pic. > > > > Jason > > > > ----- Original Message ----- > > From: "Robert B." > > To: > > Sent: Thursday, April 22, 2004 9:18 AM > > Subject: [PIC:] Slow PWM signal in hardware > > > > > > > I need a PWM signal with the following specifications (from the > > > manufacturer): period 17ms, minimum duty 1ms, maximum duty 2ms. > > > > > > I'm using a PIC16F873A on this project, and would really really really > > like > > > to generate the PWM in hardware. Reading the chip's datasheet implies > > that > > > the slowest PWM signal on the CCP1/2 is 1.2kHz (about 20x too fast). > Are > > > there any clever tricks that can slow it down to about a 17ms period? > All > > > the timers and interrupts are free for use, but like I said if there's a > > way > > > to get the PWM module to do it that would be ideal. If all else fails I > > can > > > cobble together an interrupt to do it, but the code is fairly time > > critical > > > so it would need to be really quick. > > > > > > Thanks! > > > > > > -- > > > 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 > > > > > > > > > > -- > > http://www.piclist.com hint: The PICList is archived three different > > ways. See http://www.piclist.com/#archives for details. > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.