yes..we finally manage to test the rfkit and it works..
now its the time for me to alter the code..the transmitter right now required no external input except from the switch to operate. we planned to replace the gp4 with input from sensor and the input is digital . however there are some part of the demo program that i dont understand the purpose which i pasted below.
under part "fill in transmission buffer" , why they purposely inserted the random number into the buffer register?and then will be ignored by receiver ? and how the receiver is going to ignore it?
and since the input for this demo is analog signal, they have used the converter and have the result stored in register ADRESH and ADRESL. so as for me who has a digital input, i should be able to read straight from the gpio port , but im not sure how is the command since im only read from one bit of register.
and this command means the input data being read and stored in temp register?
the part of demo program that im confused
;----------------------------------
; fill in transmission buffer
;----------------------------------
XMIT
bsf RFENA ; Enable Transmitter
movlw 0x73 ; send Serial number
movwf CSR0
movfw FuncBits ; send Function Bits
movwf CSR1
; send 16-bit Counter
;
; send analog value (this is modified from the fixed
; KeeLoq(r) protocol; these two fields are normally
; used for 16-bit counter value)
bsf STATUS, RP0 ; ----- Select Bank 1 -----
movfw ADRESL ; ADRESL Result
bcf STATUS, RP0 ; ----- Select Bank 0 -----
movwf CSR2
movfw ADRESH ; ADRESH Result
movwf CSR3
movlw 0x56 ; send 32-bit serial number 1 (ignored by receiver)
movwf CSR4
movlw 0x34
movwf CSR5
movlw 0x12
movwf CSR6
movlw 0x20
movwf CSR7
movlw 0x55 ; send Flags
movwf CSR8
Bookmarks