Menu

HPWM

Help
2008-03-03
2013-05-30
  • Nobody/Anonymous

    I am trying to create code for driving a motor speed controller.  I thought the following code would increase the speed of the motor as the the loop executed but the motor rpm just runs at full speed.  Can someone please tell me what I may be doing wrong?  I have tested the other hardware and it is fine.  Thank you for your help.

    #CHIP 12F683, 4

    #config OSC = INT, MCLR = OFF, PWRT = OFF

    #define Delay 600 ms

    Dim I as Word

    DIR GPIO.2 OUT

    Cycle:
    Wait Delay
    For I = 1 to 255
      HPWM 1, 20, I
    Next I
    Goto Cycle

     
    • Nobody/Anonymous

      I got this problem solved.  I still don't know why it wasn't working but it is now.  Thanks for looking!

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.