Assembler errors trying to use MIBAM


Results 1 to 9 of 9

Threaded View

  1. #1

    Default Assembler errors trying to use MIBAM

    I have been trying to use the simple example of MYBAM, but keep getting two assembler errors.
    I have posted the code below.

    First, MYBAM is installed in C:\PBPW.EXE

    I have the processor type (18F2520) selected correctly (other programs assemble correctly)

    Since an 18F device is selected, assembling with MPASM is required and selected

    I have PBPL selected since the final program will be using LONGS

    I'm using PBP2.60.

    The two errors I get are:

    Error 129 xxxxxxx\mybam.asm 1 : expected (end)
    Error 131 xxxxxxxx\mybam.asm 1 : processor type is undefined

    As is usually the case with me, some stupid omission somewhere, but I can't find it

    Below is the code, mostly cut and pasted from the example - all I changed was the RED - GREEN - BLUE definitions to L1B L2B L3B


    Code:
    '****************************************************************
    '*  Name    :MIBAM TESTS                                    *
    '*  Author  : [select VIEW...EDITOR OPTIONS]                    *
    '*  Notice  : Copyright (c) 2010 [select VIEW...EDITOR OPTIONS] *
    '*          : All Rights Reserved                               *
    '*  Date    : 12/9/2010                                         *
    '*  Version : 1.0                                               *
    '*  Notes   :                                                   *
    '*          :                                                   *
    '**************************************************************
    INCLUDE "alldigital.pbp" 
    INCLUDE "MIBAM.pbp"                 ' Mirror Image BAM module                                           
        OSCCON = $70
        OSCTUNE.6 = 1                                                
    DEFINE OSC 32
    
    TRISA = %00000000
    TRISB = %00000000
    TRISC = %00000000
    
    L1B         VAR    PORTC.0      
    L2B         VAR    PORTC.2      
    L3B         VAR    PORTC.4     
    
    BAM_COUNT   CON 3                     ; How many BAM Pins are used?
    Speed       CON 20      ' Smaller = Faster
    Brightness  CON 200     ' Max DutyCycle
    
    
      ASM
    BAM_LIST  macro                     ; Define PIN's to use for BAM
         BAM_PIN (PORTC,0, L1B)         ;   and the associated Duty variables
         BAM_PIN (PORTC,2, L2B)
         BAM_PIN (PORTC,4, L3B)
      endm
      BAM_INIT  BAM_LIST                ; Initialize the Pins
    ENDASM
    
    
    
      
    Main:
        FOR L1B = 0 to Brightness -1          ' Ramp up 1 by 1
            PAUSE Speed
        NEXT L1B
        FOR L2B = 0 to Brightness -1
            PAUSE Speed
        NEXT L2B
        FOR L3B = 0 to Brightness -1
            PAUSE Speed
        NEXT L3B
    
        FOR L1B = Brightness to 1 STEP -1     ' Ramp down 1 by 1
            PAUSE Speed
        NEXT L1B
        FOR L2B = Brightness to 1 STEP -1
            PAUSE Speed
        NEXT L2B
        FOR L3B = Brightness to 1 STEP -1
            PAUSE Speed
        NEXT L3B
    GOTO Main
    
    End
    Last edited by Darrel Taylor; - 9th December 2010 at 17:57. Reason: Added [code][/code] so I could see the indentation

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