Macro Error


Closed Thread
Results 1 to 8 of 8

Thread: Macro Error

Hybrid View

  1. #1
    Join Date
    Dec 2004
    Location
    nebraska
    Posts
    79


    Did you find this post helpful? Yes | No

    Default

    Hey Darrel
    I Still can not get the ECCP Port to work. I added the three lines to the INC file.
    This is what I have for Code.

    Define OSC 20 'OSC (20Mhz)
    Include "modedefs.bas" 'Includes Definitions.
    Define Loader_USED 1
    INTCON = %00000000 'Turns off all Interrupts.
    ADCON0.0 = 1 'Turns off A/D Module
    ADCON1 = 6 'Turns PortA and PortE to Digital Pins
    'Defines wait time for PulsIn.
    TrisB.1 = 0
    CMCON = 7
    HPWM 1,127,40000
    HPWM 2,200,40000
    Main:
    PortB.1 = 1
    Pause 1000
    PortB.1 = 0
    Pause 1000
    Goto Main

    I can get this part of the code to work HPWM 1,127,40000.
    But I can not get this part to work HPWM 2,200,40000.
    I have all of the RD4 for ECCP and RC2 for CCP.
    Please tell me what I'M missing can both ECCP and CCP run at the same time?
    This is driving me nuts.
    Thanks

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Shawn,

    Oops, 1 more thing.

    Code:
    DEFINE CCP2_REG PORTD 'Hpwm 2 pin port 
    DEFINE CCP2_BIT 4     'Hpwm 2 pin bit
    That let's the compiler know which pin to set as an output for HPWM. It defaults to PORTC.1
    <br>
    DT

Similar Threads

  1. PBPro error "Macro USBINIT? not found in macro file"
    By Bonxy in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th October 2011, 09:06
  2. Replies: 6
    Last Post: - 4th November 2009, 13:36
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 04:58
  5. 16F88 Compile error
    By Toley00 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd November 2005, 00:22

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