1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

PICMICRO 16F1939 5DOF

Discussion in 'SimTools compatible interfaces' started by kubing, Feb 27, 2011.

  1. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    today I start a new project using 16F1939...my goal is

    -support up to 5DOF
    -1ms refresh time
    -olimex usb ready board compitable
    -fully adjustable PID

    ps: code 40% done means 60% of my social time gone.. :lol:

    remapping pin out from my previous project..done.
  2. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    [​IMG]
    code for 3dof done...hope to finish 5dof in a week..
  3. Frakk

    Frakk Active Member

    Joined:
    Apr 15, 2009
    Messages:
    1,144
    Balance:
    328Coins
    Ratings:
    +4 / 0 / -0
    What is so hard in the I term? :)

    sum = sum + error
    if sum overflow -> sum = 0xFFFF (16bit int)
    Iterm = Igain * sum
    Output = Pterm + Iterm + Dterm
  4. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    debug debug and debug... :sos: yeah its harder when more DOF in my head. :hi:
  5. kubing

    kubing Member

    Joined:
    Sep 27, 2010
    Messages:
    259
    Occupation:
    teacher, Industrial electronic programmer
    Location:
    kelantan Malaysia
    Balance:
    350Coins
    Ratings:
    +0 / 0 / -0
    I have remapped motor direction pin out..here is what i've got so far using pic16f1937. hex code are smaller than my kubing 2dof since this version using C rather than Basic.

    http://www.youtube.com/watch?v=hgksQP2RTXE