need fast help, speed contol with pot on 18f452

Discussion in 'Embedded Systems and Microcontrollers' started by ahmad87, Apr 11, 2010.

  1. ahmad87

    Thread Starter New Member

    Apr 11, 2010
    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: Apr 12, 2010
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    What are the specs of the motor?
  3. SgtWookie


    Jul 17, 2007
    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.