12f683 variable HPWM and fixed pulse tick thickness


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default Re: 12f683 variable HPWM and fixed pulse tick thickness

    One of many possible approaches. Here the way I have done this.

    First I generated my adjustable frequency using HPWM set to approximately 50% duty. Next I fed the output from CCP1 pin
    to Portb.0 pin. Using DT interupts "INT_INT" set to trigger on the rising edge of my pwm signal. In the ISR the output pin was toggled

    Basic concept
    Code:
    Setup HPWM
    Set INTCON to trigger on rising edge
    Main:
     Read Buttons or ADC
     Set HPWM Frequency
     Goto main
    
    
    Interupt Service Routine:
    gpio.x = 1
    pauseus 5
    gpio.x = 0
    INT_RETURN
    Not sure if you have enough pins using a 12f683 to do this and what ever else you need?

  2. #2
    Join Date
    Jan 2006
    Location
    North of France
    Posts
    18


    Did you find this post helpful? Yes | No

    Default Re: 12f683 variable HPWM and fixed pulse tick thickness

    Thanx a little bit late for your both replies.
    Not as easy as I expected, I'll have to learn more and will start seeing Darrel's Instant Interrupts.

    ... and will be back again if I need help with these interrupts.

    Thank you.

Similar Threads

  1. Measuring a variable freq/length pulse and generating more pulses.
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 18th September 2014, 10:10
  2. AND HPWM with variable
    By dnyanesh in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th March 2013, 11:55
  3. Maximum HPWM freq. 12F683
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th August 2008, 16:55
  4. 12F683 HPWM Usage
    By MARAD75 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 15th November 2007, 03:16
  5. Time delay by incrementing a variable using incoming pulse
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 28th October 2005, 04:50

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