Name:
infraout
Syntax:

INFRAOUT device,data

device - is a constant/variable (valid device ID 1-31)

data - is a constant/variable (valid data 0-127)

Description:

 

This command is deprecated, please consider using the irout command instead.

Transmit an infra-red signal, modulated at 40kHz. This command is used to transmit the infra-red data to Sony ™ device (can also be used to transmit data to another PICAXE that is using the infrain or infrain2 command). Data is transmitted via an infra-red LED (connected on output 0) using the SIRC (Sony Infra Red Control) protocol.

  device 5 bit device ID (0-31)
  data 7 bit data (0-127)

When using this command to transmit data to another PICAXE the device ID used must be value 1 (TV). The infraout command can be used to transmit any of the valid TV command 0-127. Note that the Sony protocol only uses 7 bits for data, and so data of value 128 to 255 is not valid. Therefore the valid infraout command for use with infrain2 is:

  infraout 1,x '(where x = 0 to 127)

Sony SIRC protocol

The SIRC protocol uses a 40KHz modulated infra-red signal consisting of a start bit (2.4ms) followed by 12 data bits (7 data bits and 5 device ID bits). Logic level 1 is transmitted as a 1.2 ms pulse, logic 0 as a 0.6ms pulse. Each bit is separated by a 0.6ms silence period. Interaction between infrain, infrain2 and infraout command.

Start Data0 Data1 Data2 Data3 Data4 Data5 Data6 ID0 ID1 ID2 ID3 ID4
2.4ms 1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms
1.2 or
0.6ms

Infrain and Infraout

The original infrain command was designed to react to signals from the TV style remote control TVR010. Therefore it only acknowledges the data sent from the 17 buttons on this remote (1-9, 0. 10+, P+, P-, V+, V-, MUTE, PWR) with a value between 1 and 17. The infraout command can be used to 'emulate' the TVR010 remote to transit signals that will be acceptable for the infrain command. The values to be used for each TV remote button are shown in the table.

Infrain2 and Infraout

The infrain2 command will react to any of the valid TV data commands (0 to 127). The infraout command can be used to transmit any of the valid TV command 0-127. Note that the Sony protocol only uses 7 bits for data, and so data of 128 to 255 is not valid. Therefore the valid infraout command for use with infrain2 is (where x = 0 to 127)

TVR010 TV
Remote Control
irout command infrain variable
data value
infrain2 variable
data value
1 irout pin,1,0 1 0
2 irout pin,1,1 2 1
3 irout pin,1,2 3 2
4 irout pin,1,3 4 3
5 irout pin,1,4 5 4
6 irout pin,1,5 6 5
7 irout pin,1,6 7 6
8 irout pin,1,7 8 7
9 irout pin,1,8 9 8
P+ irout pin,1,16 10 16
0 irout pin,1,9 11 9
V+ irout pin,1,18 12 18
P- irout pin,1,17 13 17
10+ irout pin,1,12 14 12
V- irout pin,1,19 15 19
MUTE irout pin,1,20 16 20
PWR irout pin,1,21 17 21

Effect of Increased Clock Speed:

This command will only function at 4MHz.

 

Common Sony Device IDs

TV 1 VTR3 11
VTR1 2 Surround Sound 12
Text 3 Audio 16
Widescreen 4 CD Player 17
MDP / Laserdisk 6 Pro-Logic 18
VTR2 7 DVD 26

Button infraout data for a typical Sony TV (device ID 1)

000 1 button
001 2 button
002 3 button
003 4 button
004 5 button
005 6 button
006 7 button
007 8 button
008 9 button
009 10 button/0 button
011 Enter
016 channel up
017 channel down
018 volume up
019 volume down
020 Mute
021 Power
022 Reset TV
023 Audio Mode:Mono/SAP/Stereo
024 Picture up
025 Picture down
026 Color up
027 Color down
030 Brightness up
031 Brightness down
032 Hue up
033 Hue down
034 Sharpness up
035 Sharpness down
036 Select TV tuner
038 Balance Left
039 Balance Right
041 Surround on/off
042 Aux/Ant
047 Power off
048 Time display
054 Sleep Timer
058 Channel Display
059 Channel jump
064 Select Input Video1
065 Select Input Video2
066 Select Input Video3
074 Noise Reduction on/off
078 Cable/Broadcast
079 Notch Filter on/off
088 PIP channel up
089 PIP channel down
091 PIP on
092 Freeze screen
094 PIP position
095 PIP swap
096 Guide
097 Video setup
098 Audio setup
099 Exit setup
107 Auto Program
112 Treble up
113 Treble down
114 Bass up
115 Bass down
116 + key
117 - key
120 Add channel
121 Delete channel
125 Trinitone on/off
127 Displays a red RtestS on the screen

Button infraout data for a typical Sony VCR (device ID 2 or 7)

000 1 button
001 2 button
002 3 button
003 4 button
004 5 button
005 6 button
006 7 button
007 8 button
008 9 button
009 10 button/0 button
010 11 button
011 12 button
012 13 button
013 14 button
020 X 2 play w/sound
021 power
022 eject
023 L-CH/R-CH/Stereo
024 stop
025 pause
026 play
027 rewind
028 FF
029 record
032 pause engage
035 X 1/5 play
040 reverse visual scan
041 forward visual scan
042 TV/VTR
045 VTR from TV
047 power off
048 single frame reverse/slow reverse play
049 single frame advance/slow forward play
060 aux
070 counter reset
078 TV/VTR
083 index (scan)
106 edit play
107 mark
Applies To:
08M, 08M2, 14M, 14M2, 18M, 18M2, 20M, 20M2
See Also:
Related Create:
Share:
Print:

Send an IR remote control

Send an IR remote control command to push button "6" for a TV

Code Example:
	for b1 = 1 to 10
	  infraout 1,5
	  pause 45
	next b1
Copy Code Submit an Example

Submit Your Own Code!

You must be logged in to submit code examples. Login now.

Comments

  • Login to leave a comment.