PIC 16F Controller for Power electronics Circuits

Discussion in 'Embedded Systems and Microcontrollers' started by Navaneeth1285, Mar 19, 2015.

  1. Navaneeth1285

    Thread Starter New Member

    Mar 19, 2015
    i am designing , a PI controller for a single switch Power electronics Circuit,
    it would be a voltage mode controller, the analog input for the controller is designed for 3V,
    and the controller must vary the Duty ratio of firing pulses accordingly .Is it advisable to use 16F or should i prefer higher Versions of pic.
    Also is there any-other way to generate PWM signal (variable duty cycle),rather than using pwm block..??:(:)
  2. tshuck

    Well-Known Member

    Oct 18, 2012
    You should use whatever will meet the requirements and goals. If the 16F works use it, if not, get a better uC. There are 16F devices with a math processor meant for controllers.

    PWM is generated by setting a pin high, waiting some (variable) time and turning it off until the process repeats - any method you can think to do that will make a PWM signal (interrupts on timers to alert the uC to toggle state, delay_ms(), etc.).
    Last edited: Mar 19, 2015
  3. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    I prefer the PIC18's when there is no other constraints, though that is mostly based on compiler availability many years ago; XC8 should be up to any task. PIC16 is certainly easier to write any assembly routines you may need.

    So there's one vote definitely sitting on the fence for a 16 over an 18. You may want to consult the source on what part is best.

    Just about any processor can do a PWM signal by bit banging a port pin, or in fact several pins if required. One way is to set up a timer interrupt and increment some variable: when you are at the change point flip the port bit.
  4. John P

    AAC Fanatic!

    Oct 14, 2008
    It depends on what frequency you need the PWM to appear at, and what resolution you need (i.e. 20 different duty cycle settings, or 10000). There's also the question of what other tasks the processor is being required to perform at the same time.