> -----Original Message----- > From: D Yates [mailto:piclist@NERDULATOR.NET] > Sent: 05 December 2003 07:09 > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC] : Choice of PIC > > Sounds like any chip with more than 8 I/O pins could do it in > some form or > fashion. 200khz of bandwidth (4x50khz) takes up only 4% of > the available > instruction cycles on a pic running at 20mhz, leaving quite a > few cycles to > sample your input, do some math, then generate PWM on the output. That sounds very optimistic to me, not to mention a somewhat novel method of calulating CPU usage. You have just 20us to run an 8 bit counter at a rate of 256 * 50Kz = 12.8MHz and perform the comparisons for each channel and set clear the appropriate port pins. At 20MHz this is 100 instructions. A 4% CPU usage suggests you can execute the whole 4 channle PWM in just 4 instructions. In fact, even running one 8 bit channel at 50KHz purely through software is simply not possible. The CCP module tops out at 78kHz with a 20MHz clock for 8 bit resolution which is OK, so I'd suggest that a PIC with 4 CCP channels is required for this task (or two smaller PIC's with two channels each). Regards Mike ======================================================================= This e-mail is intended for the person it is addressed to only. The information contained in it may be confidential and/or protected by law. If you are not the intended recipient of this message, you must not make any use of this information, or copy or show it to any person. Please contact us immediately to tell us that you have received this e-mail, and return the original to us. Any use, forwarding, printing or copying of this message is strictly prohibited. No part of this message can be considered a request for goods or services. ======================================================================= Any questions about Bookham's E-Mail service should be directed to postmaster@bookham.com. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.