50 HZ PWM from PIC 16f873

Discussion in 'Embedded Systems and Microcontrollers' started by babuchittilappilly, Feb 17, 2007.

  1. babuchittilappilly

    Thread Starter New Member

    Nov 10, 2006
    1
    0
    I am working on PIC 16f873

    Pl help me to to generate code for 50Hz PWM. I used the formula in the dta sheets.BUt i Found that it canbe used upto 600HZ

    Pl help Me
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Find the code that sets the frequency. Adjust it to 50 Hz (hint - if the freq will go up, it will also go down).
     
  3. andig

    New Member

    Oct 1, 2006
    1
    0
    Hi,

    You cannot use the Hardware PWM modules to generate a 50Hz PWM signal. Use your timer instead to interrupt at every 10ms for every half cycle. In the ISR decide which channel to fire. Use another variable (0-to-10ms) timebase to shut the firing output. You thus get the PWM @ 50Hz. What is choice of development ? ASM, C, Basic ???? I may find some time to post some sample codes.

    Regards

    Sougata Das
    Kolkata - India
     
Loading...