rfPIC Serin problem


Results 1 to 40 of 53

Threaded View

  1. #14
    Join Date
    Nov 2007
    Posts
    11


    Did you find this post helpful? Yes | No

    Smile

    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
    Last edited by medusa2584; - 22nd November 2007 at 07:36.

Similar Threads

  1. Serin Problem with 12F629/PBP
    By Flyingms in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 9th March 2009, 14:59
  2. Serin Problem 16f819
    By jjohannson in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 22nd March 2007, 22:50
  3. Serin serout problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 336
    Last Post: - 6th February 2007, 04:25
  4. Problem with PBP interrupt and Serin, please help
    By rgregor in forum mel PIC BASIC
    Replies: 0
    Last Post: - 22nd August 2006, 19:02
  5. serout and serin problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th April 2006, 19:44

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