help with HPWM on 16f684


Closed Thread
Results 1 to 3 of 3
  1. #1
    kimvellore's Avatar
    kimvellore Guest

    Unhappy help with HPWM on 16f684

    I have been trying to get HPWM to work for a while on the 16F684 and wiith no luck. I have browsed through this fourm and still cannot find my answers.

    Here is my program:


    Device 16F684
    Config CP_OFF , CPD_OFF , BOD_OFF , PWRTE_ON , WDT_OFF , INTRC_OSC_NOCLKOUT , MCLRE_OFF , FCMEN_OFF , IESO_OFF
    XTAL = 4
    ALL_DIGITAL = TRUE
    Declare CCP1_PIN PORTC.2
    CMCON0 = %00000111
    CCP1CON = %00000000

    TRISA = %00001000
    TRISC = %00000000

    MainProgram:
    HPWM 1,205,1000
    GoTo MainProgram


    I am checking portc.2 for PWM. I am sure I am missing something here I have tried all combinations of CCP port pins and HPWM 1...4. And Yes I modified the .inc file so it can compile.

    I appreciate any help.

    Thanks
    Kim

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Are you using PICBasicPro from MeLabs or someone elses compiler?

    I ask this because...

    Declare CCP1_PIN PORTC.2

    DECLARE is not a PICBasicPro statement. Actually neither is XTAL or ALL_DIGITAL = TRUE, so methinks you're on the wrong forum...

  3. #3
    kimvellore's Avatar
    kimvellore Guest


    Did you find this post helpful? Yes | No

    Default

    I am using Proton IDE. from Crownhill and thought it is the same as picBasicPro, I guess it is another fourm.

    Thanks
    Kim

Similar Threads

  1. 16F684 adcin and hpwm
    By astouffer in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 21st November 2008, 17:29
  2. need help on hpwm
    By helmut in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 28th August 2007, 15:49
  3. HPWM of the port of two HPWM
    By ja2rqk in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th April 2007, 15:05
  4. sound command & music
    By trying in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 26th May 2006, 14:14
  5. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43

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