1. 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.
    Dismiss Notice

Record Signal (IR from pin)

Discussion in 'Microcontrollers' started by AtomSoft, Apr 30, 2009.

  1. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Here is my RC-5 Code. It will send all info correctly except for that toggle bit aka control bit. It will always send one cuz i havent coded that in yet lol but this will send the data correctly since i tested it in the logic analyzer. i thought id put the beta online for all to see. The delays are modded to fit with the cycles used before the calling of them. meaning a 7uS delay is not actually 7uS its less since it takes time to get called.

    Code (text):

    ;******************************************************************************
    ;                                                                             *
    ;    Filename: RC-5 Remote                                                    *
    ;    Date: Sunday, May 03, 2009                                               *
    ;    File Version: 001                                                        *
    ;                                                                             *
    ;    Author:   Jason Lopez                                                    *
    ;    Company:  AtomSoft                                                       *
    ;                                                                             *
    ;******************************************************************************
    ;                                                                             *
    ;    Files Required: P18F2525.INC                                             *
    ;                                                                             *
    ;******************************************************************************

        LIST P=18F2525  ;directive to define processor
        #include <P18F2525.INC> ;processor specific variable definitions


        CONFIG  OSC = INTIO67, WDT = OFF, LVP = OFF, XINST = OFF
       

    #DEFINE irL LATB
    #DEFINE irT TRISB
    #DEFINE ir 0

            CBLOCK  0x000
            EXAMPLE     ;example of a variable in access RAM
            d1
            d2
            d3
            tmp1
            dev
            cmd
            ENDC

            ORG 0x0000
    Init:
        movlw   0x72
        movwf   OSCCON
        movlw   0x0F
        movwf   ADCON1
        bcf     irT,ir
    RemoteData:
        movlw   0x03
        movwf   dev

        movlw   0x11
        movwf   cmd
    Main:
        bsf     irL,ir
        call    SendData
    Loop4Ever:
        NOP
        goto    Loop4Ever

    ;*****************************************
    ;* Send IR Data                          *
    ;* ------------------------------------- *
    ;* Dev = Address of device               *
    ;* Cmd = Command                         *
    ;*****************************************
    SendData
        call    One
        call    One
        call    One

        movlw   0x10
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x08
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x04
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x02
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x01
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x20
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x10
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x08
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x04
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x02
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x01
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        call    Delay890uS
        return
    ;***************************************
    ;Send a Logic 1
    ;***************************************
    One:
        bcf     irL, ir
        call    Delay890uS
        movlw   d'32'
        movwf   tmp1
    loop1:
        decfsz  tmp1, f
        goto    $+6
        return
        bsf     irL, ir
        call    Delay7uS
        bcf     irL, ir
        call    Delay21uS
        goto    loop1
    ;***************************************
    ;Send a Logic 0
    ;***************************************
    Zero:
        movlw   d'32'
        movwf   tmp1
    loop2:
        bsf     irL, ir
        decfsz  tmp1, f
        goto    $+6
        goto    Zero1
        call    Delay7uSZ
        bcf     irL, ir
        call    Delay21uS
        goto    $+4
        NOP
        goto    loop2
    Zero1:
        bcf     irL, ir
        call    Delay890uS
        return

    ;***************************************
    ;6.95uS 14 Cycles (7 uS) @ 8 Mhz
    ;***************************************
    Delay7uS
        goto    $+4
        goto    $+4
        goto    $+4
        goto    $+4
        NOP
        return
    Delay7uSZ
        goto    $+4
        goto    $+4
        NOP
        return
    ;***************************************
    ;20.85uS 42 Cycles (21 uS) @ 8 Mhz
    ;***************************************
    Delay21uS
        movlw   0x09
        movwf   d1
    Delay21uS_0
        decfsz  d1, f
        goto    Delay21uS_0
        goto    $+4
        return
    ;***************************************
    ;1780 Cycles (890 uS) @ 8 Mhz
    ;***************************************
    Delay890uS
        movlw   0x60 ;2
        movwf   d1
        movlw   0x02
        movwf   d2
    Delay890uS_0
        decfsz  d1, f
        goto    $+6
        decfsz  d2, f
        goto    Delay890uS_0
        goto    $+4
        nop
        return

            END

     
     
    Last edited: May 3, 2009
  2. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    What sends your Modulated Carrier
     
  3. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    The image is the IR DATA from my remote. Can anyone determine what kind is it.

    The below code is my RC-5 Remote code. Not useful to me anymore since i know mines isnt RC-5 lol but it might be usefull to others.

    Code (text):

    ;******************************************************************************
    ;                                                                             *
    ;    Filename: RC-5 Remote                                                    *
    ;    Date: Sunday, May 03, 2009                                               *
    ;    File Version: 001                                                        *
    ;                                                                             *
    ;    Author:   Jason Lopez                                                    *
    ;    Company:  AtomSoft                                                       *
    ;                                                                             *
    ;******************************************************************************
    ;                                                                             *
    ;    Files Required: P18F2525.INC                                             *
    ;                                                                             *
    ;******************************************************************************

        LIST P=18F2525  ;directive to define processor
        #include <P18F2525.INC> ;processor specific variable definitions


        CONFIG  OSC = INTIO67, WDT = OFF, LVP = OFF, XINST = OFF
       

    #DEFINE irL LATB
    #DEFINE irT TRISB
    #DEFINE ir 0

    #define btnT TRISC
    #define btn  PORTC
    #define btnUp 0
    #define btnDwn 1


            CBLOCK  0x000
            EXAMPLE     ;example of a variable in access RAM
            d1
            d2
            d3
            tmp1
            dev
            cmd
            ENDC

            ORG 0x0000
    Init:
        movlw   0x72
        movwf   OSCCON
        movlw   0x0F
        movwf   ADCON1
        bcf     irT,ir
        bsf     btnT,btnUp
        bsf     btnT,btnDwn
    Main:
        bsf     irL,ir
        btfss   btn,btnUp
        goto    UpBtn
        btfss   btn,btnDwn
        goto    DwnBtn
        goto    Main
    UpBtn:
        movlw   0x03
        movwf   dev
        movlw   0x11
        movwf   cmd
        goto    SendIt
    DwnBtn:
        movlw   0x00
        movwf   dev
        movlw   0x11
        movwf   cmd
        goto    SendIt
    SendIt:
        call    SendData
        goto    Main

    ;*****************************************
    ;* Send IR Data                          *
    ;* ------------------------------------- *
    ;* Dev = Address of device               *
    ;* Cmd = Command                         *
    ;*****************************************
    SendData
        call    One
        call    One
        call    One

        movlw   0x10
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x08
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x04
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x02
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x01
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x20
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x10
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x08
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x04
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x02
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x01
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        call    Delay890uS
        call    Delay120mS
        return
    ;***************************************
    ;Send a Logic 1
    ;***************************************
    One:
        bcf     irL, ir
        call    Delay890uS
        movlw   d'32'
        movwf   tmp1
    loop1:
        decfsz  tmp1, f
        goto    $+6
        return
        bsf     irL, ir
        call    Delay7uS
        bcf     irL, ir
        call    Delay21uS
        goto    loop1
    ;***************************************
    ;Send a Logic 0
    ;***************************************
    Zero:
        movlw   d'32'
        movwf   tmp1
    loop2:
        bsf     irL, ir
        decfsz  tmp1, f
        goto    $+6
        goto    Zero1
        call    Delay7uSZ
        bcf     irL, ir
        call    Delay21uS
        goto    $+4
        NOP
        goto    loop2
    Zero1:
        bcf     irL, ir
        call    Delay890uS
        return

    ;***************************************
    ;6.95uS 14 Cycles (7 uS) @ 8 Mhz
    ;***************************************
    Delay7uS
        goto    $+4
        goto    $+4
        goto    $+4
        goto    $+4
        NOP
        return
    Delay7uSZ
        goto    $+4
        goto    $+4
        NOP
        return
    ;***************************************
    ;20.85uS 42 Cycles (21 uS) @ 8 Mhz
    ;***************************************
    Delay21uS
        movlw   0x09
        movwf   d1
    Delay21uS_0
        decfsz  d1, f
        goto    Delay21uS_0
        goto    $+4
        return
    ;***************************************
    ;1780 Cycles (890 uS) @ 8 Mhz
    ;***************************************
    Delay890uS
        movlw   0x60 ;2
        movwf   d1
        movlw   0x02
        movwf   d2
    Delay890uS_0
        decfsz  d1, f
        goto    $+6
        decfsz  d2, f
        goto    Delay890uS_0
        goto    $+4
        nop
        return
    ;***************************************
    ;120mS () @ 8 Mhz
    ;***************************************
    Delay120mS
        movlw   0x7E
        movwf   d1
        movlw   0xBC
        movwf   d2
    Delay120mS_0
        decfsz  d1, f
        goto    $+6
        decfsz  d2, f
        goto    Delay120mS_0
        goto    $+4
        nop
        return



            END

     
     

    Attached Files:

    Last edited: May 3, 2009
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn

    NEC IR Code Format Looks like what you have I guess your not worried about
    your just catching the code look here http://www.necel.com/en/faq/mi_com/__com_remo.html#0101
     
    Last edited: May 3, 2009
  6. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    i dont know if its NEC. I tried to check it against it and if i do it by hand:

    vol up sends: 8, 1, 1, 18
    vol down sends: 8, 1, 1, 9

    No inversion there. Its funny lol
     
  7. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
  8. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
  9. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    not enough info there. I always go there :D I need to know the length of the individual pulses.

    For RC-5 its 27.8uS for 1 pulse. Where 6.95uS the pulse is high and 20.85uS the pulse is low.
     
  10. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    Last edited: May 3, 2009
  11. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Not sure if its me but some how that doesnt seem correct.

    SB-Projects has never been wrong for me and they state:
    on the other page it says 38.4khz
     
  12. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    I have seen it from 36 to 40 and higher i don't think the carrier frequency is that important. The carrier frequency only matters to your Ir module they look at any thing out of there frequency as noise. That why Ir modules are no good if you don't send them modulated Ir
     
  13. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    since RC-5 and RC-6 are so similar. Can i use the same: 27.8uS pulse?
     
  14. be80be

    be80be Well-Known Member

    Joined:
    Aug 23, 2008
    Messages:
    4,794
    Likes:
    134
    Location:
    morristown,tn
    This is the only real thing different
    Where you get the program you used the volup
     
  15. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    its freeware audio application called:

    Audacity

    i connected the IR part to gnd and 5+ and the signal to the right channel of headset and Gnd
     
  16. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,211
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE
    RC6 is just an extended version of RC5, both use exactly the same Manchester coding - essentially RC6 gives more scope for expansion, more device codes, and more command codes.

    As suggested, the actual modulation frequency makes little difference, as does the precise pulse width - the whole point of Manchester coding is that the pulse width isn't important, it's the change from high to low, and low to high, that carries the data, and not the pulse width.
     
  17. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    heh ok cool ill try it out today.
     
  18. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    heh here is the code i have so far. Untested not sure if it works at all lol but it makes a nice form on the Logic Analyzer in MPLAB:
    Code (text):

    ;******************************************************************************
    ;                                                                             *
    ;    Filename: RC-6 Remote                                                    *
    ;    Date: Sunday, May 03, 2009                                               *
    ;    File Version: 001                                                        *
    ;                                                                             *
    ;    Author:   Jason Lopez                                                    *
    ;    Company:  AtomSoft                                                       *
    ;                                                                             *
    ;******************************************************************************
    ;                                                                             *
    ;    Files Required: P18F2525.INC                                             *
    ;                                                                             *
    ;******************************************************************************

        LIST P=18F2525  ;directive to define processor
        #include <P18F2525.INC> ;processor specific variable definitions


        CONFIG  OSC = INTIO67, WDT = OFF, LVP = OFF, XINST = OFF
       

    #DEFINE irL LATB
    #DEFINE irT TRISB
    #DEFINE ir 0

    #define btnT TRISC
    #define btn  PORTC
    #define btnUp 0
    #define btnDwn 1


            CBLOCK  0x000
            EXAMPLE     ;example of a variable in access RAM
            d1
            d2
            d3
            tmp1
            dev
            cmd
            ENDC

            ORG 0x0000
    Init:
        movlw   0x72
        movwf   OSCCON
        movlw   0x0F
        movwf   ADCON1
        bcf     irT,ir
        bsf     btnT,btnUp
        bsf     btnT,btnDwn
    Main:
        bsf     irL,ir
        btfss   btn,btnUp
        goto    UpBtn
        btfss   btn,btnDwn
        goto    DwnBtn
        goto    Main
    UpBtn:
        movlw   0x01
        movwf   dev
        movlw   0x08
        movwf   cmd
        goto    SendIt
    DwnBtn:
        movlw   0x01
        movwf   dev
        movlw   0x12
        movwf   cmd
        goto    SendIt
    SendIt:
        call    SendData
        goto    Main

    ;*****************************************
    ;* Send IR Data                          *
    ;* ------------------------------------- *
    ;* Dev = Address of device               *
    ;* Cmd = Command                         *
    ;*****************************************
    SendData
        call    Header

    ;*********** DEV *******************
        movlw   0x80
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x40
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x20
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x10
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x08
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x04
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x02
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x01
        ANDWF   dev, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero
    ;*********** CMD *******************
        movlw   0x80
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x40
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x20
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x10
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x08
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x04
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x02
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero

        movlw   0x01
        ANDWF   cmd, 0
        btfss   STATUS, Z
        call    One
        btfsc   STATUS, Z
        call    Zero
    ;*********** Signal Free *******************
        call    Delay2_66mS

        return
    ;***************************************
    ;Send a Header
    ;***************************************
    Header:
        call    Leader
        call    One
        call    Zero
        call    Zero
        call    Zero
        call    trOne
        return
    ;***************************************
    ;Send a Leader
    ;***************************************
    Leader:
        movlw   d'95'
        movwf   tmp1
    loopl:
        bsf     irL, ir
        decfsz  tmp1, f
        goto    $+6
        goto    Leader1
        call    Delay7uSZ
        bcf     irL, ir
        call    Delay21uS
        goto    $+4
        NOP
        goto    loopl
    Leader1:
        bcf     irL, ir
        call    Delay890uS
        return
    ;***************************************
    ;Send a Logic 0
    ;***************************************
    Zero:
        bcf     irL, ir
        call    Delay444uS
        movlw   d'32'
        movwf   tmp1
    loop0:
        decfsz  tmp1, f
        goto    $+6
        return
        bsf     irL, ir
        call    Delay7uS
        bcf     irL, ir
        call    Delay21uS
        goto    loop0
    ;***************************************
    ;Send a Logic 1
    ;***************************************
    One:
        movlw   d'32'
        movwf   tmp1
    loop1:
        bsf     irL, ir
        decfsz  tmp1, f
        goto    $+6
        goto    One1
        call    Delay7uSZ
        bcf     irL, ir
        call    Delay21uS
        goto    $+4
        NOP
        goto    loop1
    One1:
        bcf     irL, ir
        call    Delay444uS
        return

    ;***************************************
    ;Send a Trailer Logic 0
    ;***************************************
    trZero:
        bcf     irL, ir
        call    Delay890uS
        movlw   d'32'
        movwf   tmp1
    loopt0:
        decfsz  tmp1, f
        goto    $+6
        return
        bsf     irL, ir
        call    Delay7uS
        bcf     irL, ir
        call    Delay21uS
        goto    loopt0
    ;***************************************
    ;Send a Trailer Logic 1
    ;***************************************
    trOne:
        movlw   d'32'
        movwf   tmp1
    loopt1:
        bsf     irL, ir
        decfsz  tmp1, f
        goto    $+6
        goto    OneTR1
        call    Delay7uSZ
        bcf     irL, ir
        call    Delay21uS
        goto    $+4
        NOP
        goto    loopt1
    OneTR1:
        bcf     irL, ir
        call    Delay890uS
        return

    ;***************************************
    ;6.95uS 14 Cycles (7 uS) @ 8 Mhz
    ;***************************************
    Delay7uS
        goto    $+4
        goto    $+4
        goto    $+4
        goto    $+4
        NOP
        return
    Delay7uSZ
        goto    $+4
        goto    $+4
        NOP
        return
    ;***************************************
    ;20.85uS 42 Cycles (21 uS) @ 8 Mhz
    ;***************************************
    Delay21uS
        movlw   0x09
        movwf   d1
    Delay21uS_0
        decfsz  d1, f
        goto    Delay21uS_0
        goto    $+4
        return
    ;***************************************
    ;1780 Cycles (890 uS) @ 8 Mhz
    ;***************************************
    Delay890uS
        movlw   0x60 ;2
        movwf   d1
        movlw   0x02
        movwf   d2
    Delay890uS_0
        decfsz  d1, f
        goto    $+6
        decfsz  d2, f
        goto    Delay890uS_0
        goto    $+4
        nop
        return
    ;***************************************
    ;120mS () @ 8 Mhz
    ;***************************************
    Delay120mS
        movlw   0x7E
        movwf   d1
        movlw   0xBC
        movwf   d2
    Delay120mS_0
        decfsz  d1, f
        goto    $+6
        decfsz  d2, f
        goto    Delay120mS_0
        goto    $+4
        nop
        return

    Delay444uS
        movlw   0xB0
        movwf   d1
        movlw   0x01
        movwf   d2
    Delay444uS_0
        decfsz  d1, f
        goto    $+6
        decfsz  d2, f
        goto    Delay444uS_0
        nop
        return

    Delay2_66mS
        movlw   0x26
        movwf   d1
        movlw   0x05
        movwf   d2
    Delay2_66_0
        decfsz  d1, f
        goto    $+6
        decfsz  d2, f
        goto    Delay2_66_0
        goto    $+4
        nop
        return

            END

     
    This is the HEADER:
    [​IMG]

    This is the actual data:
    [​IMG]

    Remember @ 8Mhz its 2 Cycles = 1uS
    The below 14 in uS = 7uS .

    [​IMG]

    The below 55 in uS = 27.5 uS
    [​IMG]
     

    Attached Files:

    Last edited: May 4, 2009
  19. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    ima have to put this on hold for a while. I got asked to actually create something useful for someone else lol

    Using that RFID reader i had a while back. Heh ill make some money finally lol. Ill still work on this on the side but not as much. I guess ill buy a logic analyzer from saleae with the money i make but i wont be paid till im done and that may be weeks since i need to order the final board online :( but heh i guess itll be worth it.

    Welcome to Saleae

    That would help alot with finding out the control codes and stuff like header info.
     
    Last edited: May 4, 2009
  20. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,211
    Likes:
    640
    Location:
    Derbyshire, UK
    ONLINE
    PICKit2 logic analyser

    Having a few spare minutes, I threw together an IR receiver to feed to my PICKit2 (IR receiver IC, 47Ω, 47µF), and here are some sample remote signals.

    They are all ON/OFF signals, the first two are from satellite TV (Sky) boxes, a normal Sky box then a Sky+ (PVR), notice the slight difference because of the different device ID. These both use Philips RC6.

    The third one is Sony SIRC's, and is a nice simple system to read, which was why I choose it for my tutorials.
     

    Attached Files:

  21. AtomSoft

    AtomSoft Well-Known Member

    Joined:
    Feb 7, 2008
    Messages:
    5,670
    Likes:
    41
    Location:
    Brooklyn, NY US
    Cool. I guess ima have to try to setup the IR Reciever again and Pickit 2 also.

    How did you setup the PICKIT 2? In the Logic window i mean.

    Trigger When:
    Sample Rate:
    Trigger Position:

    Thanks.
     

Share This Page