> Bonjour Gael & PIC.ers, > > I did this a while back. You might get some ideas from the code > below, this part of the project worked well. .. Pity about the rest > of the job.... .. > I've got a similar routine, and I've had some good luck with AN512 type A/D. Gael, check it out and come back with questions about specifics. You'll find the biggest problem with AN512 is noise immunity, and in a PWM motor app that might be a real big problem. I'm currently moving a design from a PIC with A/D to a cheap PIC16c54. Should save almost $1.00 a board! One a board that costs less than $4.00 US that's a lot! -- Lawrence Lile "Nyquist was an optimist." => Median Filter Source Code => AutoCad blocks for electrical drafting at: http://home1.gte.net/llile/index.htm