Sony ir protocol transmission
Archiver
Posts: 46,084
Parallax has an excellent AP note or receiving Sony ir from a Sony
remote.
Does anyone know of code or resources for the Stamp 2 to transmit
Sony ir protocol ?
TIA
remote.
Does anyone know of code or resources for the Stamp 2 to transmit
Sony ir protocol ?
TIA
Comments
> Parallax has an excellent AP note or receiving Sony ir from a Sony
> remote.
>
> Does anyone know of code or resources for the Stamp 2 to transmit
> Sony ir protocol ?
I have managed to get my stamp2 to control my Olympus digital
camera via the Sony codes. It was a real hassle with a lot of
O'scope work. The biggest challenge is getting the 600ms gaps
right. The stamp2 is just barely fast enough to do it and the
instruction time constants must be factored in when creating the
sony instruction. I have not found a way to generalize the code
with the slow speed of the BS2... just not enough time for the
stamp token interpreter and the timing requirments of the Sony
code... so you have to inline code each Sony instruction (at
least that's my experience). Note especially my trick of
pusling an *unused* pin for the timing delays.
Here is some of my code which may get you started in the right
direction. It causes my camera to take a picture every 10
seconds - and I've gotten a range of 35' with it too! If you
find any better approaches please share them!
Hope this helps - Michael
'{$STAMP BS2}
'{$PBASIC 2.5}
'--- lcd constants
I CON 254
CLCD CON 1
N96N CON $4054
'--- other variables
'--- initialize the lcd
LOW 0
PAUSE 1000
SEROUT 0,N96N,[noparse][[/noparse]I,CLCD]
SEROUT 0,N96N,[noparse][[/noparse]I,128,"Shutterbug"]
shutter:
'--- shutter trigger IR code is 0x61DC807F with a strange
start bit
'--- sequence. Note that to send the '1's we pulse an unused
pin,
'--- this lets the real pin stay high for the specified
amount of time.
'--- send the start bit sequence
PULSOUT 8,4400 'preamble 8800 uS low
PULSOUT 9,2100 'preamble 4400 uS high
PULSOUT 8,300 'gap
'--- send hex 6
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
'--- send hex 1
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
'--- send hex D
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
'--- send hex C
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
'--- send hex 8
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
'--- send hex 0
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
'--- send hex 7
PULSOUT 9,100 '0
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
'--- send hex F
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
PULSOUT 9,600 '1
PULSOUT 8,300 'gap
'--- for testing only
PAUSE 10000
GOTO shutter
>Parallax has an excellent AP note or receiving Sony ir from a Sony
>remote.
>
>Does anyone know of code or resources for the Stamp 2 to transmit
>Sony ir protocol ?
>
>TIA
You may find this to be an excellent source for SIRCS timing information,
which
seems to be the real key to the Sony IR Protocol:
http://www.geocities.com/CapeCanaveral/Launchpad/4652/sircs.htm
Secondary to that, but just as important, is the excellent Stamp
instruction timing information provided by Tracy Allen on his web site here:
http://www.emesystems.com/BS2speed.htm
Hope that is helpful.
Regards,
Bruce Bates
Thankyou for the excellent disertation/code; esp. the "unused" pin
trick( an OUTSTANDING discovery).
I am having trouble getting the stamp to transmit the Sony ir
protocol start bit(to another Stamp) using your information---any
guidance/help ? The strange start bit sequence for the Olympus
somehow apply in a similar way to Sony ir protocol start bit?
TIA
John Bell
--- In basicstamps@yahoogroups.com, Michael Burr <mburr@b...> wrote:
> jabajohn wrote:
> > Parallax has an excellent AP note or receiving Sony ir from a
Sony
> > remote.
> >
> > Does anyone know of code or resources for the Stamp 2 to
transmit
> > Sony ir protocol ?
>
> I have managed to get my stamp2 to control my Olympus digital
> camera via the Sony codes. It was a real hassle with a lot of
> O'scope work. The biggest challenge is getting the 600ms gaps
> right. The stamp2 is just barely fast enough to do it and the
> instruction time constants must be factored in when creating the
> sony instruction. I have not found a way to generalize the code
> with the slow speed of the BS2... just not enough time for the
> stamp token interpreter and the timing requirments of the Sony
> code... so you have to inline code each Sony instruction (at
> least that's my experience). Note especially my trick of
> pusling an *unused* pin for the timing delays.
>
> Here is some of my code which may get you started in the right
> direction. It causes my camera to take a picture every 10
> seconds - and I've gotten a range of 35' with it too! If you
> find any better approaches please share them!
>
> Hope this helps - Michael
>
>
> '{$STAMP BS2}
> '{$PBASIC 2.5}
>
> '--- lcd constants
> I CON 254
> CLCD CON 1
> N96N CON $4054
>
> '--- other variables
>
> '--- initialize the lcd
> LOW 0
> PAUSE 1000
> SEROUT 0,N96N,[noparse][[/noparse]I,CLCD]
> SEROUT 0,N96N,[noparse][[/noparse]I,128,"Shutterbug"]
>
> shutter:
> '--- shutter trigger IR code is 0x61DC807F with a strange
> start bit
> '--- sequence. Note that to send the '1's we pulse an unused
> pin,
> '--- this lets the real pin stay high for the specified
> amount of time.
>
> '--- send the start bit sequence
> PULSOUT 8,4400 'preamble 8800 uS low
> PULSOUT 9,2100 'preamble 4400 uS high
> PULSOUT 8,300 'gap
>
> '--- send hex 6
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
>
> '--- send hex 1
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
>
> '--- send hex D
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
>
> '--- send hex C
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
>
> '--- send hex 8
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
>
> '--- send hex 0
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
>
> '--- send hex 7
> PULSOUT 9,100 '0
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
>
> '--- send hex F
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
> PULSOUT 9,600 '1
> PULSOUT 8,300 'gap
>
> '--- for testing only
> PAUSE 10000
> GOTO shutter
> Michael,
>
> Thankyou for the excellent disertation/code; esp. the "unused" pin
> trick( an OUTSTANDING discovery).
>
> I am having trouble getting the stamp to transmit the Sony ir
> protocol start bit(to another Stamp) using your information---any
> guidance/help ? The strange start bit sequence for the Olympus
> somehow apply in a similar way to Sony ir protocol start bit?
John, I responded to your message you sent me off list a couple
of days ago with a rather long note and some more code for
receiving the IR that I feel is much more reliable than the APP
note code you are using. Did you not receive it? Let me know
off list and I'll resend it if necessary.
Michael