At 02:17 PM 12/30/97 -0000, you wrote: >Andy Kunz wrote: >> At 11:42 PM 12/30/97 +1100, you wrote: >> >Hi >> >I am thinking of designing an electronic speed controller for a remote >> control car using a PIC. I have a number of ideas at the moment, but my >> favourite is to use the microchip application notes for creating a pwm >> (an654) with the 16f84, then convert the incoming pulse into a pwm >stream. >> >> That makes your entire program about 20 lines or so of C. > >I think you'll find it isn't quite as simple as that. I read "using a PWM chip." In a PWM chip, it really is VERY simple. My ESC (http://www.users.fast.net/~montana/products.html) is a 2.8KHz PWM rate, with about 100 speeds betweeen "OFF" and "FULL" available. The input is measured in 6uS increments, and has several safety features to handle things such as loss of signal, invalid pulses, etc. as well as power-on safety (it powers up in OFF mode, no matter where your stick is set. You must go to "OFF" with the stick to activate it). And it's all in a '508 running at 4MHz (and could be run off the internal oscillator, too). Or you can go buy an Astro Flight controller, which uses essentially the same firmware. >a 0.5 to 2 ms pulse occurring anywhere between 50 and 400 times a second >(more usually 50Hz, but depends how many channels the reciever has) is No, actually, most of them are 45-60 Hz, and there is no bearing on the refresh rate from any transmitter I've ever used (and I've seen a lot of them, believe me). Andy ================================================================== Andy Kunz - Statistical Research, Inc. - Westfield, New Jersey USA ==================================================================