Hello everyone, I found out this weekend that I a PID loop for the motor control on my bot. I'm using the F877's PWM output to control my drive motors thru an H-bridge setup. The motor has a shaft protruding from both sides. The wheel will go on one side and I'll put a shaft encoder of some type of the other side. With the shaft encoder, I'll be able to determine speed, direction, stall, and whatever else I need. I have NO clue about a PID loop, so if someone could give me some code to look at and get an understanding, I'd greatly appreciate it! Thanks, Duane Brantley -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads