1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PI controller programmed by PIC18F4520

Discussion in 'Microcontrollers' started by anasrab24, Oct 11, 2017.

  1. anasrab24

    anasrab24 New Member

    Joined:
    Oct 11, 2017
    Messages:
    1
    Likes:
    0
    Hi

    I'm trying now to build a Buck converter in closed loop form
    the output voltage = Duty cycle * input voltage
    the propose system uses an error signal which is the difference between the desired output and the output measured by the sensor
    in order to control the duty cycle by the controller which in my case I use programmable PI controller by PIC 18F4520

    I have read what is provided in AN937 app. Note but the source code was in Assembly
    can any one help me with the C code ?

    I have wrote my own code but it's doesn't work correctly !!

    can any one help me out please ?
     
  2. Little Ghostman

    Little Ghostman Well-Known Member Most Helpful Member

    Joined:
    Jan 7, 2011
    Messages:
    3,737
    Likes:
    433
    Location:
    SCOTLAND
    On Microchip in the code section is a PI routine written in C18. Its in one the old examples sections, give that a whirl. or post your code you have written.
     
    • Like Like x 1
  3. bigdogguru

    bigdogguru New Member

    Joined:
    Aug 21, 2011
    Messages:
    5
    Likes:
    1

Share This Page