12F629 PWM usage


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    PWM need to be finished before jumping to the next instruction. If you can deal with it, that great, unless you may need to use a Timer interrupt to produce your PWM or switch to the 12F683 which have a built-in PWM module.

    Multitasking will be more than likely time slicing process, but fast enough to looks like multitasking. Once again Timer interrupts are pretty handy.

    You can have a periodic timer interrupt and increase/decrease some variables in. Once you reach x value, then you enable/disable your i/os in the main program or in the ISR. But i usually prefer to do it in the mainloop when possible, keeping the ISR as short as possible.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  2. #2
    Join Date
    Dec 2005
    Posts
    23


    Did you find this post helpful? Yes | No

    Wink Thanks Steve

    Thanks Steve. I never thought of timer interrupts. However, I need to use the 12F629 and will try to set up some multitasking in this and let you know if I get it going.
    Ron

Similar Threads

  1. Half-bridge PWM with a 16F684 ?
    By Byte_Butcher in forum General
    Replies: 7
    Last Post: - 17th January 2010, 23:18
  2. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 07:03
  3. PWM 'channels ...what's that all about then!
    By HankMcSpank in forum General
    Replies: 5
    Last Post: - 23rd April 2009, 17:49
  4. PWM setting PIC16F887
    By Gevo in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th June 2008, 08:24
  5. Tidying Up PWM Routine
    By Tissy in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st February 2005, 01:26

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts