Shop OBEX P1 Docs P2 Docs Learn Events
Who may have Ir- transmition protocols ? — Parallax Forums

Who may have Ir- transmition protocols ?

ArchiverArchiver Posts: 46,084
edited 2002-03-13 20:58 in General Discussion
Hi Larry,
thanks for Your code!!
the pulsin of the bs2p is counted in 0.75µs steps so for my test
I hade eave to use a word for the pulsin so I think it is to do with the bs2p.
Could You tell me or copy me the protocol of Your Ir-remote
controle Sony Type ??
Do You may have others like Kenwood etc ??
I believe there are some different Ir- transmition protocols...?
I even don't know how long the protocol is,(how many bit they use)
or if they use the time of the pulse or the time between the pulse to
detect highs or lows
The main Ir-program I think to do similar to Your first program
but too I hope to use ANY remote control as I wont "in the learn mode"
to save, the pulsin series of 3 button of the remote controle in the EEPROM.
After read them back to.variables or scratch ram, to be used.
Very helpfully would be to have as much as possible protocols of
Ir -remote controls to get an idea what "possible timing" is waiting for me.
thanks and regards Heinz


> > I did this in PBP the BS2 was not fast enough at least with my
> > programming skills but it will give you some ideas. The first
> > program is a little harder on the processor the second may work
> > on a slower processor.
> >
> > The leader or start bit is 2.20mS, a highbit is 1.10mS, and a
> > lowbit
> > is .55mS, synch bit is also .55mS
> >
> >
> > ' IR CODE READER SONY TYPE
> > ' LARRY GAMINDE LGAMINDE@T...
> > '
> > ' PIC16F84-10 USED IN THIS EXAMPLE AND TIMING IS DEPENDENT
> > ' ON PROCESSOR SPEED 10MHZ
> > ' I USED A SERIAL BACKPACK ON PORTB.3 FOR DISPLAY AND DEBUGGING
> > ' INPUT FROM RADIO SHACK 40KHZ RECEIVER TO PORTB.1
> > '
> >
> >
> > DEFINE OSC 10
> > TRISB= %01000000
> >
> > A VAR BYTE(16)
> > I VAR BYTE
> > LEADER VAR WORD
> > VALUE VAR WORD
> >
> > PAUSE 500
> > SEROUT2 PORTB.3, $4054,[noparse][[/noparse]254,1]
> > PAUSE 100
> > SEROUT2 PORTB.3, $4054,[noparse][[/noparse]" IR CODE READER"]
> > PAUSE 2000
> >
> > MAIN: LEADER = 0 'LOOK FOR LEADER OR START BIT
> > PULSIN PORTB.1, 0, LEADER
> > IF (LEADER < 310) THEN MAIN
> > IF (LEADER > 320) THEN MAIN
> >
> > FOR I = 0 TO 11 'I USED 8 OF THE 12 BITS FOR DISPLAY
> > PULSIN PORTB.1, 0, A(I)
> > NEXT
> >
> > FOR I = 0 TO 11
> > IF A(I) > 150 THEN ONE
> > IF A(I) < 130 THEN ZERO
> > 'NEXT THREE LINES USED FOR DEBUGGING
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]"A",DEC I,DEC A(I)]
> > PAUSE 2000
> >
> > ONE:
> > A(I) = 1
> > GOTO ENDD
> > ZERO:
> > A(I) = 0
> > ENDD:
> > NEXT
> >
> > VALUE1:
> >
> > VALUE.BIT0 = A(0)
> > VALUE.BIT1 = A(1)
> > VALUE.BIT2 = A(2)
> > VALUE.BIT3 = A(3)
> > VALUE.BIT4 = A(4)
> > VALUE.BIT5 = A(5)
> > VALUE.BIT6 = A(6)
> > VALUE.BIT7 = A(7)
> > VALUE.BIT8 = A(8)
> > VALUE.BIT9 = A(9)
> > VALUE.BIT10 = A(10)
> > VALUE.BIT11 = A(11)
> > VALUE.BIT12 = 0
> > VALUE.BIT13 = 0
> > VALUE.BIT14 = 0
> > VALUE.BIT15 = 0
> >
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]" ",DEC VALUE]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,192]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]BIN VALUE]
> > PAUSE 2000
> >
> >
> > IF VALUE = 4074 THEN VALUE = 1
> > IF VALUE = 4042 THEN VALUE = 2
> > IF VALUE = 4010 THEN VALUE = 3
> > IF VALUE = 3978 THEN VALUE = 4
> > IF VALUE = 3946 THEN VALUE = 5
> > IF VALUE = 3914 THEN VALUE = 6
> > IF VALUE = 3882 THEN VALUE = 7
> > IF VALUE = 3850 THEN VALUE = 8
> > IF VALUE = 3818 THEN VALUE = 9
> > IF VALUE = 3786 THEN VALUE = 0
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]" BUTTON # ",DEC VALUE]
> > LEADER = 0
> > VALUE = 0
> > PAUSE 500
> > GOTO MAIN
> >
> >
> >
> > 'second program starts here
> >
> > DEFINE OSC 10
> > TRISB= %01000000
> >
> >
> > TOTAL VAR BYTE
> > LEADER VAR WORD
> > VALUE VAR WORD
> > A VAR BYTE(16)
> >
> >
> > PAUSE 500
> > SEROUT2 PORTB.3, $4054,[noparse][[/noparse]254,1]
> > PAUSE 100
> > SEROUT2 PORTB.3, $4054,[noparse][[/noparse]" IR CODE READER"]
> > PAUSE 2000
> >
> > MAIN:
> > PULSIN PORTB.1, 0, LEADER
> > IF (LEADER < 310) THEN MAIN
> > IF (LEADER > 320) THEN MAIN
> >
> > PULSIN PORTB.1, 0, A(0)
> > PULSIN PORTB.1, 0, A(1)
> > PULSIN PORTB.1, 0, A(2)
> > PULSIN PORTB.1, 0, A(3)
> > PULSIN PORTB.1, 0, A(4)
> > PULSIN PORTB.1, 0, A(5)
> > PULSIN PORTB.1, 0, A(6)
> > PULSIN PORTB.1, 0, A(7)
> > PULSIN PORTB.1, 0, A(8)
> > PULSIN PORTB.1, 0, A(9)
> > PULSIN PORTB.1, 0, A(10)
> > PULSIN PORTB.1, 0, A(11)
> >
> > 'PULSIN PORTB.1, 0, A(12)
> > 'PULSIN PORTB.1, 0, A(13)
> > 'PULSIN PORTB.1, 0, A(14)
> > 'PULSIN PORTB.1, 0, A(15)
> >
> > FOR TOTAL = 0 TO 11
> > IF A(TOTAL) > 150 THEN ONE
> > IF A(TOTAL) < 130 THEN ZERO
> >
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]"A",DEC TOTAL,DEC A(TOTAL)]
> > PAUSE 2000
> >
> > ONE:
> > A(TOTAL) = 1
> > GOTO ENDD
> > ZERO:
> > A(TOTAL) = 0
> > ENDD:
> > NEXT
> >
> > VALUE1:
> > VALUE.BIT0 = A(0)
> > VALUE.BIT1 = A(1)
> > VALUE.BIT2 = A(2)
> > VALUE.BIT3 = A(3)
> > VALUE.BIT4 = A(4)
> > VALUE.BIT5 = A(5)
> > VALUE.BIT6 = A(6)
> > VALUE.BIT7 = A(7)
> > VALUE.BIT8 = A(8)
> > VALUE.BIT9 = A(9)
> > VALUE.BIT10 = A(10)
> > VALUE.BIT11 = A(11)
> > VALUE.BIT12 = 0 'A(12)
> > VALUE.BIT13 = 0 'A(13)
> > VALUE.BIT14 = 0 'A(14)
> > VALUE.BIT15 = 0 'A(15)
> >
> > DISPLAY:
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]" ",DEC VALUE]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,192]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]BIN VALUE]
> > PAUSE 2000
> >
> >
> > IF VALUE = 4074 THEN VALUE = 1
> > IF VALUE = 4042 THEN VALUE = 2
> > IF VALUE = 4010 THEN VALUE = 3
> > IF VALUE = 3978 THEN VALUE = 4
> > IF VALUE = 3946 THEN VALUE = 5
> > IF VALUE = 3914 THEN VALUE = 6
> > IF VALUE = 3882 THEN VALUE = 7
> > IF VALUE = 3850 THEN VALUE = 8
> > IF VALUE = 3818 THEN VALUE = 9
> > IF VALUE = 3786 THEN VALUE = 0
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
> > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]" BUTTON # ",DEC VALUE]
> > LEADER = 0
> > VALUE = 0
> > PAUSE 500
> >
> > DONE: GOTO MAIN
> >
> >
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the
> > Subject and Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed. Text in the Subject and
Body of the
> message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
>
>

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-03-13 20:58
    Yes sony I think, how is that for a straight answer. If you are
    really going to get into this you should have a scope, and
    preferably a storage scope of some type. With this you can see
    the pulse width of any remote you wish as long as it matches the
    correct pulsed data 40khz or 38khz. Just get a metal can IR
    receiver at radio shack and hook to gnd, +5vdc and read the
    output pin.


    Original Message
    From: "H Schwenk GMX" <hschwenk@g...>
    To: <basicstamps@yahoogroups.com>
    Sent: March 13, 2002 2:46 AM
    Subject: [noparse][[/noparse]basicstamps] Who may have Ir- transmition protocols ?



    Hi Larry,
    thanks for Your code!!
    the pulsin of the bs2p is counted in 0.75µs steps so for my test
    I hade eave to use a word for the pulsin so I think it is to do
    with the bs2p.
    Could You tell me or copy me the protocol of Your Ir-remote
    controle Sony Type ??
    Do You may have others like Kenwood etc ??
    I believe there are some different Ir- transmition protocols...?
    I even don't know how long the protocol is,(how many bit they
    use)
    or if they use the time of the pulse or the time between the
    pulse to
    detect highs or lows
    The main Ir-program I think to do similar to Your first program
    but too I hope to use ANY remote control as I wont "in the learn
    mode"
    to save, the pulsin series of 3 button of the remote controle in
    the EEPROM.
    After read them back to.variables or scratch ram, to be used.
    Very helpfully would be to have as much as possible protocols of
    Ir -remote controls to get an idea what "possible timing" is
    waiting for me.
    thanks and regards Heinz


    > > I did this in PBP the BS2 was not fast enough at least with
    my
    > > programming skills but it will give you some ideas. The first
    > > program is a little harder on the processor the second may
    work
    > > on a slower processor.
    > >
    > > The leader or start bit is 2.20mS, a highbit is 1.10mS, and a
    > > lowbit
    > > is .55mS, synch bit is also .55mS
    > >
    > >
    > > ' IR CODE READER SONY TYPE
    > > ' LARRY GAMINDE LGAMINDE@T...
    > > '
    > > ' PIC16F84-10 USED IN THIS EXAMPLE AND TIMING IS DEPENDENT
    > > ' ON PROCESSOR SPEED 10MHZ
    > > ' I USED A SERIAL BACKPACK ON PORTB.3 FOR DISPLAY AND
    DEBUGGING
    > > ' INPUT FROM RADIO SHACK 40KHZ RECEIVER TO PORTB.1
    > > '
    > >
    > >
    > > DEFINE OSC 10
    > > TRISB= %01000000
    > >
    > > A VAR BYTE(16)
    > > I VAR BYTE
    > > LEADER VAR WORD
    > > VALUE VAR WORD
    > >
    > > PAUSE 500
    > > SEROUT2 PORTB.3, $4054,[noparse][[/noparse]254,1]
    > > PAUSE 100
    > > SEROUT2 PORTB.3, $4054,[noparse][[/noparse]" IR CODE READER"]
    > > PAUSE 2000
    > >
    > > MAIN: LEADER = 0 'LOOK FOR LEADER OR START BIT
    > > PULSIN PORTB.1, 0, LEADER
    > > IF (LEADER < 310) THEN MAIN
    > > IF (LEADER > 320) THEN MAIN
    > >
    > > FOR I = 0 TO 11 'I USED 8 OF THE 12 BITS FOR DISPLAY
    > > PULSIN PORTB.1, 0, A(I)
    > > NEXT
    > >
    > > FOR I = 0 TO 11
    > > IF A(I) > 150 THEN ONE
    > > IF A(I) < 130 THEN ZERO
    > > 'NEXT THREE LINES USED FOR DEBUGGING
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]"A",DEC I,DEC A(I)]
    > > PAUSE 2000
    > >
    > > ONE:
    > > A(I) = 1
    > > GOTO ENDD
    > > ZERO:
    > > A(I) = 0
    > > ENDD:
    > > NEXT
    > >
    > > VALUE1:
    > >
    > > VALUE.BIT0 = A(0)
    > > VALUE.BIT1 = A(1)
    > > VALUE.BIT2 = A(2)
    > > VALUE.BIT3 = A(3)
    > > VALUE.BIT4 = A(4)
    > > VALUE.BIT5 = A(5)
    > > VALUE.BIT6 = A(6)
    > > VALUE.BIT7 = A(7)
    > > VALUE.BIT8 = A(8)
    > > VALUE.BIT9 = A(9)
    > > VALUE.BIT10 = A(10)
    > > VALUE.BIT11 = A(11)
    > > VALUE.BIT12 = 0
    > > VALUE.BIT13 = 0
    > > VALUE.BIT14 = 0
    > > VALUE.BIT15 = 0
    > >
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]" ",DEC VALUE]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,192]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]BIN VALUE]
    > > PAUSE 2000
    > >
    > >
    > > IF VALUE = 4074 THEN VALUE = 1
    > > IF VALUE = 4042 THEN VALUE = 2
    > > IF VALUE = 4010 THEN VALUE = 3
    > > IF VALUE = 3978 THEN VALUE = 4
    > > IF VALUE = 3946 THEN VALUE = 5
    > > IF VALUE = 3914 THEN VALUE = 6
    > > IF VALUE = 3882 THEN VALUE = 7
    > > IF VALUE = 3850 THEN VALUE = 8
    > > IF VALUE = 3818 THEN VALUE = 9
    > > IF VALUE = 3786 THEN VALUE = 0
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]" BUTTON # ",DEC VALUE]
    > > LEADER = 0
    > > VALUE = 0
    > > PAUSE 500
    > > GOTO MAIN
    > >
    > >
    > >
    > > 'second program starts here
    > >
    > > DEFINE OSC 10
    > > TRISB= %01000000
    > >
    > >
    > > TOTAL VAR BYTE
    > > LEADER VAR WORD
    > > VALUE VAR WORD
    > > A VAR BYTE(16)
    > >
    > >
    > > PAUSE 500
    > > SEROUT2 PORTB.3, $4054,[noparse][[/noparse]254,1]
    > > PAUSE 100
    > > SEROUT2 PORTB.3, $4054,[noparse][[/noparse]" IR CODE READER"]
    > > PAUSE 2000
    > >
    > > MAIN:
    > > PULSIN PORTB.1, 0, LEADER
    > > IF (LEADER < 310) THEN MAIN
    > > IF (LEADER > 320) THEN MAIN
    > >
    > > PULSIN PORTB.1, 0, A(0)
    > > PULSIN PORTB.1, 0, A(1)
    > > PULSIN PORTB.1, 0, A(2)
    > > PULSIN PORTB.1, 0, A(3)
    > > PULSIN PORTB.1, 0, A(4)
    > > PULSIN PORTB.1, 0, A(5)
    > > PULSIN PORTB.1, 0, A(6)
    > > PULSIN PORTB.1, 0, A(7)
    > > PULSIN PORTB.1, 0, A(8)
    > > PULSIN PORTB.1, 0, A(9)
    > > PULSIN PORTB.1, 0, A(10)
    > > PULSIN PORTB.1, 0, A(11)
    > >
    > > 'PULSIN PORTB.1, 0, A(12)
    > > 'PULSIN PORTB.1, 0, A(13)
    > > 'PULSIN PORTB.1, 0, A(14)
    > > 'PULSIN PORTB.1, 0, A(15)
    > >
    > > FOR TOTAL = 0 TO 11
    > > IF A(TOTAL) > 150 THEN ONE
    > > IF A(TOTAL) < 130 THEN ZERO
    > >
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]"A",DEC TOTAL,DEC A(TOTAL)]
    > > PAUSE 2000
    > >
    > > ONE:
    > > A(TOTAL) = 1
    > > GOTO ENDD
    > > ZERO:
    > > A(TOTAL) = 0
    > > ENDD:
    > > NEXT
    > >
    > > VALUE1:
    > > VALUE.BIT0 = A(0)
    > > VALUE.BIT1 = A(1)
    > > VALUE.BIT2 = A(2)
    > > VALUE.BIT3 = A(3)
    > > VALUE.BIT4 = A(4)
    > > VALUE.BIT5 = A(5)
    > > VALUE.BIT6 = A(6)
    > > VALUE.BIT7 = A(7)
    > > VALUE.BIT8 = A(8)
    > > VALUE.BIT9 = A(9)
    > > VALUE.BIT10 = A(10)
    > > VALUE.BIT11 = A(11)
    > > VALUE.BIT12 = 0 'A(12)
    > > VALUE.BIT13 = 0 'A(13)
    > > VALUE.BIT14 = 0 'A(14)
    > > VALUE.BIT15 = 0 'A(15)
    > >
    > > DISPLAY:
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]" ",DEC VALUE]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,192]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]BIN VALUE]
    > > PAUSE 2000
    > >
    > >
    > > IF VALUE = 4074 THEN VALUE = 1
    > > IF VALUE = 4042 THEN VALUE = 2
    > > IF VALUE = 4010 THEN VALUE = 3
    > > IF VALUE = 3978 THEN VALUE = 4
    > > IF VALUE = 3946 THEN VALUE = 5
    > > IF VALUE = 3914 THEN VALUE = 6
    > > IF VALUE = 3882 THEN VALUE = 7
    > > IF VALUE = 3850 THEN VALUE = 8
    > > IF VALUE = 3818 THEN VALUE = 9
    > > IF VALUE = 3786 THEN VALUE = 0
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]254,1]
    > > SEROUT2 PORTB.3,$4054,[noparse][[/noparse]" BUTTON # ",DEC VALUE]
    > > LEADER = 0
    > > VALUE = 0
    > > PAUSE 500
    > >
    > > DONE: GOTO MAIN
    > >
    > >
    > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    > > Subject and Body of the message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    > > http://docs.yahoo.com/info/terms/
    > >
    > >
    > >
    > >
    > > To UNSUBSCRIBE, just send mail to:
    > > basicstamps-unsubscribe@yahoogroups.com
    > > from the same email address that you subscribed. Text in the
    Subject and Body of the
    > message will be ignored.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    > >
    > >
    >
    >


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the
    Subject and Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
Sign In or Register to comment.