• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Symbol not previously defined (Send)

Status
Not open for further replies.

ttbuddy

New Member
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 8.10.00.00


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

Code:
Warning[207] D:\WATT METER (DESIRED DESIGN)\WATTMETER.ASM 1480 : Found label after column 1. (settle)
[B][COLOR="Red"]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)[/COLOR][/B]
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.
 

Attachments

Last edited:

ttbuddy

New Member
Code:
store_Ah:
	mov16	dd+2,AmpHours
[B][COLOR="Red"]call 	Serial_sent[/COLOR][/B]

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
   settle
   decfsz       tmp1, f
   goto       settle


   ; Send a character through the UART
loop
   movf AmpHours, w
   [B][COLOR="Red"]call Send[/COLOR][/B]   ;error here
   movf AmpHours+1, w
   [COLOR="Red"][B]call Send[/B][/COLOR]   ;error here
   goto      $

;----------------------
; SEND function
;----------------------
send
   banksel      TXREG
   movwf       TXREG            ; Send data which has been stored in W

trans_wt
   banksel      TXSTA
   btfss       TXSTA, TRMT         ; Loop until data is sent
   goto      trans_wt      
   return
 
Last edited:

mister_e

New Member
If you ask, MPLAB can be case sensitive, just change your label send to Send, and the problem should disappear.
 

ttbuddy

New Member
Like this?

The problem still exists:

Code:
call 	Serial_Sent

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
   settle
   decfsz       tmp1, f
   goto       settle


   ; Send a character through the UART
loop
   movf AmpHours, w
   call Send
   movf AmpHours+1, w
   call Send
   goto      $
 

mister_e

New Member
Code:
loop
   movf AmpHours, w
   call Send   ;error here
   movf AmpHours+1, w
   call Send   ;error here
   goto      $

;----------------------
; SEND function
;----------------------
[B][U][size=+1][color=red]S[/color][/size][/U][/B]end
   banksel      TXREG
   movwf       TXREG            ; Send data which has been stored in W
 
Last edited:
Status
Not open for further replies.

EE World Online Articles

Loading
Top