need fast help, speed contol with pot on 18f452

Thread Starter

ahmad87

Joined Apr 11, 2010
1
i need asimply code to control the speed of stepper motor by potintiometer in pic 18f452 , please need a help
 
Last edited by a moderator:

SgtWookie

Joined Jul 17, 2007
22,230
Gee, your subject line really doesn't help US much, except that you want something fast (who doesn't).

You also posted in the wrong forum. It should've been in Computing and Embedded Microcontrollers.

Look in the ADC reference for PICs, how to get the value from the ADC.

Use that value in your timing loop delay. Be careful you don't step the motor faster than it's designed to go.

Use the pot across your reference voltage to ground. Connect the wiper to the input port for the ADC. Use a 10nF (0.01uF) cap from the wiper to ground to provide a low impedance source for the ADC input.
 
Top