That's exactly what I'm looking for :). I wasn't sure what to search on so I couldn't find any example code related to servo control. By chance do you have a link or some example code to show how to set this up? Up till now I have been using JAL to produce the asm files and then = tweaking them a bit here and their. I haven't had any experience with setting up the timer that you spoke of and for some reason all the data sheets I = find on the processor don't have the assembly command reference section in = them. Thanks again, Jeremy Darling -----Original Message----- From: Dale Botkin [mailto:dale@BOTKIN.ORG] Sent: Tuesday, July 01, 2003 10:24 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PIC]:Another newbie question JAL & PWM related On Tue, 1 Jul 2003, Jeremy Darling wrote: > But I can't get it to work with the servos and speed controls as I > can't figure out how to create a PWM. I have not been following this thread that closely, so please pardon me = if I'm way off base here... but which PWM, the servo control pulses? Near trivial. Don't look at it as a PWM problem, look at it as just = generating a pulse of X width, where 900us < X < 1.5ms or so. Different brands and models of servos need different pulse widths, you'll need to experiment = to figure out the quirks of yours. In all cases I have seen, though, 1.5ms pulses will center the servo. Once you can generate pulses of the correct width, just use a timer = driven interrupt to send the pulse every 20ms or so, maybe less. The interval = is NOT that critical in my experience (several brands of servos), but you probably dont' want a larger interval than 20ms. I don't think you can get the hardware PWM to run with a large enough interval with a useful clock speed. Anyway, servo control is pretty = well trodden ground if that's what you're trying to figure out. Dale -- It's a thankless job, but I've got a lot of Karma to burn off. Get a PicoKeyer: http://www.hamgadgets.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: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads