assembler errors


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2011
    Posts
    37

    Default assembler errors

    hi,m learning pic basic pro programming and i developed code which will turn on 8 LEDs which are connected to PORTB of a PIC microcontroller.When the project is started (or when reset), the LEDs scroll to the right with a 250ms delay between each output. The sample code developed is as follows

    j var byte 'define variable jam as byte type
    trisb=0 'set port direction
    mwanzo: 'start of the loop
    j=128 'initialize counter
    while j<1
    PORTB=j 'send the counter value to the port
    pause 250 'delay for 250ms
    j=j>>1 'shift right once
    wend
    goto mwanzo 'repeat once again
    end

    when i compiled the program on MCS IDE i with pic16f877 selected i get the following errors:

    Error LED_SC~1.ASM 48:[255] undifined symbol 'chk?rp'
    Error LED_SC~1.ASM 48:[255] undifined symbol 'move?cb'
    Error LED_SC~1.ASM 52:[231] attempt to redifine 'label?l'
    Error LED_SC~1.ASM 51:[255] undifined symbol 'chk?rp'
    Error LED_SC~1.ASM 51:[255] undifined symbol 'move?cb'
    Error LED_SC~1.ASM 52:[231] attempt to redifine 'label?l'
    Error LED_SC~1.ASM 53:[255] undifined symbol 'cpmge?bcl'
    Fatal LED_SC~1.ASM 53:[300] to many errors

    when i change the pic selection to 16f628 the program run successful!!but development board im using have pic16f877 and i got the same type of errors in other programs i developed although some other program compiled secessfully. I need help on this

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


    Did you find this post helpful? Yes | No

    Default Re: assembler errors

    Those are the standard Library macro's.
    Have you edited your 16F877.bas file for any reason?
    Were there any other errors BEFORE those?

    Make sure your c:\pbp\16f877.bas file looks like this ...
    Code:
    '****************************************************************
    '*  16F877.BAS                                                  *
    '*                                                              *
    '*  By        : Leonard Zerman, Jeff Schmoyer                   *
    '*  Notice    : Copyright (c) 1998 microEngineering Labs, Inc.  *
    '*              All Rights Reserved                             *
    '*  Date      : 10/23/98                                        *
    '*  Version   : 2.11                                            *
    '*  Notes     :                                                 *
    '****************************************************************
    
    BANK0   $0020, $007F
    BANK1   $00A0, $00EF
    BANK2   $0110, $016F
    BANK3   $0190, $01EF
    EEPROM  $2100, $21FF
    LIBRARY "PBPPIC14"
    DEFINE  CODE_SIZE 8
    
            include "PIC14EXT.BAS"
    
    PORTL   VAR     PORTB
    PORTH   VAR     PORTC
    TRISL   VAR     TRISB
    TRISH   VAR     TRISC
    
            include "PBPPIC14.RAM"
    
    '*-----------------------* EOF 16F877.BAS *---------------------*
    And your program won't work, because j will never be less than 1 and the WHILE won't execute.
    DT

  3. #3
    Join Date
    Feb 2011
    Posts
    37


    Did you find this post helpful? Yes | No

    Unhappy Re: assembler errors

    Thanx Darren, I've not changed the 16f877.bas file and i had only syntax error before the assembler errors occurred. The 16f877.bas looks the same as yours.i have changed the loop but still the same errors occur. the code is

    j var byte 'define variable j as byte type
    trisb=0 'set portb direction
    mwanzo: 'start of the main program
    j=128 'initialize counter
    again: 'start of the loop
    PORTB=j 'send the counter value to the port
    pause 250 'delay for 250ms
    if j=1 then mwanzo
    j=j>>1 'shift right once
    goto again 'repeat once again
    end

    i wonder why the same errors still persist...i need more help on this

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


    Did you find this post helpful? Yes | No

    Default Re: assembler errors

    Could you email the .LST file after a failed compile?

    [email protected]
    DT

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