HPWM min freq ?


Results 1 to 14 of 14

Thread: HPWM min freq ?

Threaded View

  1. #14
    swordman's Avatar
    swordman Guest


    Did you find this post helpful? Yes | No

    Default

    Hi,
    In main program I have many pause command, if I use
    pidout:
    high pidout ause (error*100):low pidout: (pause error*50)
    goto pidout

    the work very slow and unstable.I must use gosub adread in loops(for/next) becouse loops are 1-180min.When I use that sample (pidout) pic work unstable(slow).



    Timed out must be like this:
    ----_______-------------_______--------____-----___----__--_-____
    ~~!~~~~~~~~~~~ Error ~ ~~~~~~~~~~~~~~~~~~~~~~~!Set Point





    main:
    gosub button
    gosub adread
    high portc.2 : pause 2000
    gosub adread
    high portc.4 : pause 1000
    gosub adread
    low portc.2 : pause 2000
    gosub adread
    for x

    gosub adread
    next x
    gosub lcd: gosub lcd

    goto main

    adread:

    adcin 0,read1 : pauseus 16 : adcin 0,read2 : pauseus 16
    adcin 0,read3 : pauseus 16 : adcin 0,read4 : pauseus 16

    readt = (read1 + read2 + read3 + read4 ) / 4
    z = ( readt*40 )/130
    error = t -z
    ....... PID calculation+ PID controlled out
    return


    lcd:...........return
    loop:........return
    button:....return

    end
    Last edited by swordman; - 6th September 2004 at 14:55.

Similar Threads

  1. Maximum HPWM freq. 12F683
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th August 2008, 15:55
  2. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 14:14
  3. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  4. Changing Freq of HPWM
    By Rayneobid in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 12th April 2005, 18:55
  5. HPWM on a 628 is not changing freq.
    By dtit in forum General
    Replies: 2
    Last Post: - 25th February 2005, 09:34

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