bigdogguru
Administrator
- Joined
- Mar 12, 2010
- Messages
- 9,821
- Helped
- 2,350
- Reputation
- 4,694
- Reaction score
- 2,272
- Trophy points
- 1,413
- Location
- Southwest, USA
- Activity points
- 62,383
C:\Program Files\Microchip\MPASM Suite\LKR
;**********************************************************************
; *
; Filename: mtxv4.inc *
; Date: *
; File Version: *
;
; *
;**********************************************************************
; Notes:
;
; RF transmitter prot.v4 (Manchester)
;**********************************************************************
EXTERN mtx_buffer, mtx_delay
EXTERN mtx_init, mtx_send
Debug build of project `C:\Users\PRAMOD\Desktop\HEX files\servo1.mcp' started.
Preprocessor symbol `__DEBUG' is defined.
Fri Jun 15 19:29:59 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\Users\PRAMOD\Desktop\HEX files\enc-044.o".
Clean Warning: File "C:\Users\PRAMOD\Desktop\HEX files\C:\Users\PRAMOD\Desktop\important\8758\enc-044.lst" doesn't exist.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F628 "C:\Users\PRAMOD\Desktop\important\8758\enc-044.asm" /l"enc-044.lst" /e"enc-044.err" /o"enc-044.o" /d__DEBUG=1
Message[302] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 59 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 61 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 63 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 65 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[224] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 84 : Use of this instruction is not recommended.
Warning[224] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 91 : Use of this instruction is not recommended.
Warning[224] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 101 : Use of this instruction is not recommended.
Warning[224] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 125 : Use of this instruction is not recommended.
Executing: "C:\Program Files\Microchip\MPASM Suite\mplink.exe" "..\..\..\..\Program Files\Microchip\MPASM Suite\LKR\16f628_g.lkr" "enc-044.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"servo1.cof" /M"servo1.map" /W
MPLINK 4.20, Linker
Copyright (c) 2008 Microchip Technology Inc.
Error - could not find definition of symbol 'mtx_buffer' in file './enc-044.o'.
Errors : 1
Link step failed.
----------------------------------------------------------------------
Debug build of project `C:\Users\PRAMOD\Desktop\HEX files\servo1.mcp' failed.
Preprocessor symbol `__DEBUG' is defined.
Fri Jun 15 19:30:00 2012
----------------------------------------------------------------------
BUILD FAILED
Error - could not find definition of symbol 'mtx_buffer' in file './enc-044.o'.
;**********************************************************************
; *
; Filename: mtxv4.asm *
; Date: *
; File Version: *
; *
; *
;**********************************************************************
; Notes:
;
; RF transmitter prot.v4.2 (Manchester)
;**********************************************************************
;
; header : 20xbit1, 1xbit0
; bytes : 8xbitX, 1xbit1, 1xbit0
;
; packet structure: <data0> <data1> <data2> <checksum>
;
; 020 - library version
; untested!
;
; 021 - add half frame variable
; remove buffer initialization
;
; 030-20050102 codec-v4.2:
; checksum with CRC-8
; T=350 usec
; 3-byte buffer length
;
;**********************************************************************
;define TXINV
;invert TX output so inactive is HIGH?
list p=16F628
#include <p16F628.inc>
txbit EQU 0x01
txport EQU PORTA
#ifndef TXINV
#define TXLOW 0
#define TXHIGH txbit
#else
#define TXLOW txbit
#define TXHIGH 0
#endif
GLOBAL mtx_buffer, mtx_init, mtx_send, mtx_delay
packet_len EQU 2
;***** VARIABLE DEFINITIONS
mtxdata UDATA
count1 res 1
count2 res 1
ncnt res 1
bt res 1
sum res 1
mtx_buffer res 2
mtx_delay res 1 ; half_frame delay
;**********************************************************************
mtx CODE
mtx_init movlw .117 ; 350 usec
movwf mtx_delay
return
;
mtx_send
; send out buffer
outbuf movlw 0x14 ; 20xbit1, 1xbit0
header movwf count2
head0 call bit1
decfsz count2,F
goto head0
call bit0
movlw mtx_buffer
movwf FSR
movlw packet_len
movwf count1
movlw 0xff
movwf sum
;
outbu0 movf INDF,W
call update_sum
movf INDF,W
call outbyte
incf FSR,F
decfsz count1,F
goto outbu0
movf sum,W
call outbyte
; buffer is sent
return
update_sum ; fast CRC-8 algorithm with poly x^8+x^5+x^4+1
; executes in 23 cycles per update
xorwf sum,f
clrw
btfsc sum,7
xorlw 0x7a
btfsc sum,6
xorlw 0x3d
btfsc sum,5
xorlw 0x86
btfsc sum,4
xorlw 0x43
btfsc sum,3
xorlw 0xb9
btfsc sum,2
xorlw 0xc4
btfsc sum,1
xorlw 0x62
btfsc sum,0
xorlw 0x31
movwf sum
return
;
outbyte movwf bt
movlw 8
movwf count2
outby0 rlf bt,F
btfsc STATUS,C
goto outby1
call bit0
goto outby2
outby1 call bit1
outby2 decfsz count2,F
goto outby0
;
call bit1
; and bit0
bit0 movlw TXHIGH ; HIGH
movwf txport
ndelaya0 movf mtx_delay, W
movwf ncnt
ndelaya1 decfsz ncnt, F
goto ndelaya1
movlw TXLOW ; to LOW transition
movwf txport
ndelayb0 movf mtx_delay, W
movwf ncnt
ndelayb1 decfsz ncnt, F
goto ndelayb1
return
bit1 movlw TXLOW ; LOW
movwf txport
ndelayc0 movf mtx_delay, W
movwf ncnt
ndelayc1 decfsz ncnt, F
goto ndelayc1
movlw TXHIGH ; to HIGH transition
movwf txport
ndelaye0 movf mtx_delay, W
movwf ncnt
ndelaye1 decfsz ncnt, F
goto ndelaye1
return
end
----------------------------------------------------------------------
Debug build of project `C:\Users\PRAMOD\Desktop\HEX files\servo1.mcp' started.
Preprocessor symbol `__DEBUG' is defined.
Fri Jun 15 20:06:46 2012
----------------------------------------------------------------------
Clean: Deleting intermediary and output files.
Clean: Deleted file "C:\Users\PRAMOD\Desktop\HEX files\enc-044.o".
Clean Warning: File "C:\Users\PRAMOD\Desktop\HEX files\C:\Users\PRAMOD\Desktop\important\8758\enc-044.lst" doesn't exist.
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F628 "C:\Users\PRAMOD\Desktop\important\8758\enc-044.asm" /l"enc-044.lst" /e"enc-044.err" /o"enc-044.o" /d__DEBUG=1
Message[302] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 59 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 61 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 63 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 65 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[224] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 84 : Use of this instruction is not recommended.
Warning[224] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 91 : Use of this instruction is not recommended.
Warning[224] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 101 : Use of this instruction is not recommended.
Warning[224] C:\USERS\PRAMOD\DESKTOP\IMPORTANT\8758\ENC-044.ASM 125 : Use of this instruction is not recommended.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F628 "C:\Users\PRAMOD\Desktop\important\16f628\mtxv4.asm" /l"mtxv4.lst" /e"mtxv4.err" /o"mtxv4.o" /d__DEBUG=1
Executing: "C:\Program Files\Microchip\MPASM Suite\mplink.exe" "..\..\..\..\Program Files\Microchip\MPASM Suite\LKR\16f628_g.lkr" "enc-044.o" "mtxv4.o" /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /o"servo1.cof" /M"servo1.map" /W
MPLINK 4.20, Linker
Copyright (c) 2008 Microchip Technology Inc.
Errors : 0
MP2HEX 4.20, COFF to HEX File Converter
Copyright (c) 2008 Microchip Technology Inc.
Errors : 0
Loaded C:\Users\PRAMOD\Desktop\HEX files\servo1.cof.
----------------------------------------------------------------------
Debug build of project `C:\Users\PRAMOD\Desktop\HEX files\servo1.mcp' succeeded.
Preprocessor symbol `__DEBUG' is defined.
Fri Jun 15 20:06:48 2012
----------------------------------------------------------------------
BUILD SUCCEEDED
ya..there is one more file......
when i added this to the project..........SUCCEFUL....... we done
..thank u...thank u very much..im not sure abt wheather the code is working or not...but i got the hex file....
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?