me again


Closed Thread
Results 1 to 6 of 6

Thread: me again

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default


    Code:
    HPWM 1, 25, 200 'Channel1, duty cycle%, 2kHz
    try with
    Code:
    HPWM 1, 25, 2000 'Channel1, duty cycle%, 2kHz
    Code:
            @  __CONFIG _XT_OSC & _LVP_OFF
    
    PORTC=0
    TRISC=0
    
    duty var byte
    DEFINE HPWM2_TMR 2
    
    Start:
        for duty =0 to 255
            hpwm 1,(255-DUTY),2000
            hpwm 2,DUTY,2000
            pause 10
            next
        goto start
    Last edited by mister_e; - 1st March 2007 at 17:59.
    Steve

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

  2. #2
    Join Date
    Mar 2006
    Posts
    24


    Did you find this post helpful? Yes | No

    Smile Again Thanks

    Once again mate,
    Thanks for the help

    This is what the help file says in the package I have been using

    DEFINE HPWM2_TIMER 1 'Hpwm 2 timer select
    DEFINE HPWM3_TIMER 1 'Hpwm 3 timer select

    Example

    HPWM 1,127,1000 ' Send a 50% duty cycle PWM signal at 1kHz
    HPWM 1,64,200 ' Send a 25% duty cycle PWM signal at 2kHz

    See Also

    PWM

    Copyright © 2001 microEngineering Labs, Inc.
    All rights reserved.


    That is where the 200 came from. I thought it didnt look right at the time but didnt have enough experience to challenge it.

    Anyway. It all works now.

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