Data processing in array


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Data processing in array

    In a noisy environment you can over sample a bit to be sure of data validity, i expect the serial data from a keeloq
    chip to be quite clean so a single sample point would suffice

    sample @50,250,450,650,850 uS past transition to hi
    where valid result is
    11000 for a 1
    11110 for a 0


    Code:
    sample var bitfail var bit
    
    
    fail=0
    pulsetrain:
    index=67 
    while index && !fail
    while  !portb.0 :wend   
    pauseus 50               ;50
    if   !portb.0 then  fail = fail | 1
    pauseus 200              ;250
    if   !portb.0 then  fail = fail | 1
    pauseus 200              ;450
    sample=portb.0
    pauseus 200               ;650
    if   portb.0^sample then  fail = fail | 1
    pauseus 200               ;850
    if   portb.0 then  fail = fail | 1
    index=index-1
    
    code.0[index]= !sample
    
    wend
    Warning I'm not a teacher

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: Data processing in array

    In general the data stream on a good signal level is very clean. But when there is no RF signal, the radio module will produce a lot of noise that is converted to random pulses through the data slicer. This creates a lot of bad data and false triggers on a non rolling code systems if digital filtering is not applied. With the keeloq encryption it is safe to assume that such triggers will not happen. The probability to have 66 bits in a correct timing and also in the correct sequence, not mentioning the other safety measures of keeloq like counter etc, is really low if not zero.

    When you referred to 5 sampling points I was thinking of timers etc to maintain a fixed sampling point in time...

    Your code showed the application of KISS in a fine way!

    Thank you for your great ideas,
    Ioannis
    Last edited by Ioannis; - 5th June 2022 at 21:33.

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Data processing in array

    The probability to have 66 bits in a correct timing and also in the correct sequence, not mentioning the other safety measures of keeloq like counter etc, is really low if not zero.
    i would not expect to ever receive a malformed bit from a keeloq serial stream , the data may be useless however.
    single point sampling should be ok imho
    Warning I'm not a teacher

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: Data processing in array

    Agree.

    Though I have checked various implementations of RF remote controls and many have wide tolerances from the specified timings.

    I am very much sure that those chips are bad copies of the original Microchip one. But are out there... If interested, I have many test of original and copy chips with the timings in excel file.

    Ioannis

Similar Threads

  1. Using Processing to display data graphs
    By ScaleRobotics in forum Off Topic
    Replies: 6
    Last Post: - 26th November 2016, 05:16
  2. How to get ASCII data in array.
    By Ioannis in forum Serial
    Replies: 8
    Last Post: - 6th November 2008, 20:14
  3. Filling pdu array with gps data!
    By camolas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th October 2008, 00:54
  4. Data logger clock and array
    By PicLearner in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 25th September 2008, 04:19
  5. Array data being corrupted
    By caverman in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th March 2006, 04:22

Members who have read this thread : 1

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