Symbol not previously defined (Send)

Discussion in 'Embedded Systems and Microcontrollers' started by twister, Apr 19, 2009.

  1. twister

    twister Thread Starter Member

    Mar 31, 2009
    Hi to all the prof. here...
    I am adding a serial send routine to my existing code in PIC assembly.
    I am using PIC 16F88 with MPLAB version

    However when i compile my file, i get this error:

    Warning[207] D:\WATT METER (DESIRED DESIGN)\WATTMETER.ASM 1480 : Found label after column 1. (settle)
    Error[113]   D:\WATT METER (DESIRED DESIGN)\WATTMETER.ASM 1488 : Symbol not previously defined (Send)
    Error[113]   D:\WATT METER (DESIRED DESIGN)\WATTMETER.ASM 1490 : Symbol not previously defined (Send)
    The post below is the file I am implementing. Red highlighted part is the one i added for send serial routine. Thanks. I wonder what silly mistakes i had done.
  2. twister

    twister Thread Starter Member

    Mar 31, 2009
        mov16    dd+2,AmpHours
    call     Serial_sent
       banksel      SPBRG
       movlw      .25                  ; 9.6kbps
       movwf      SPBRG
       movlw      b'00100100'      ; brgh = high (2)
       movwf      TXSTA            ; enable Async Transmission, set brgh
       ; Provide a settling time for startup
       banksel      tmp1
       clrf       tmp1
       decfsz       tmp1, f
       goto       settle
       ; Send a character through the UART
       movf AmpHours, w
       call Send   ;error here
       movf AmpHours+1, w
       call Send   ;error here
       goto      $
    ; SEND function
       banksel      TXREG
       movwf       TXREG            ; Send data which has been stored in W
       banksel      TXSTA
       btfss       TXSTA, TRMT         ; Loop until data is sent
       goto      trans_wt      
  3. SgtWookie

    SgtWookie Expert

    Jul 17, 2007
    In the vast midwest of the USA; CST
    In the 3rd line of the code you posted, you have "call" starting in column 1. Move it over past column 2.

    Right after that, you're letting the program crash into a called subroutine.

    The called subroutine does not have a return statement; instead it has a GOTO that exits the routine.
    Subroutines should have only one entrance and only one RETURN to exit.

    Why is "settle" all by itself in the middle of the code? Is that supposed to be a label?

    You are not being consistent with your use of colons. Labels should have colons.
Similar Threads
Forum Title Date
Embedded Systems and Microcontrollers Symbol not previously defined (B’00000000’) error in my first program... Oct 24, 2010
Embedded Systems and Microcontrollers symbol "u687" defined more than once Feb 13, 2009
Embedded Systems and Microcontrollers Error [1105] symbol 'ADC_16ANA' has not been defined Jun 12, 2008

Share This Page