- Name:
- irout
- Syntax:
-
IROUT pin,device,data
Pin - is a variable/constant which specifies the i/o pin to use.
Device - is a constant/variable (valid device ID 1-31)
Data - is a constant/variable (valid data 0-127)
- Description:
-
Transmit an infra-red signal, modulated at 40kHz on any output pin.
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 irin, infrain or infrain2 command). Data is transmitted via an infra-red LED 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 irout 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 irin is irout 1,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. For more information about the protocol see the infraout command description.
Effect of Increased Clock Speed:
This command will automatically use the internal 4MHz resonator for correct operation.
TVR010 TV Remote Control irout command irin variable data value 1 irout pin,1,0 0 2 irout pin,1,1 1 3 irout pin,1,2 2 4 irout pin,1,3 3 5 irout pin,1,4 4 6 irout pin,1,5 5 7 irout pin,1,6 6 8 irout pin,1,7 7 9 irout pin,1,8 8 P+ irout pin,1,16 16 0 irout pin,1,9 9 V+ irout pin,1,18 18 P- irout pin,1,17 17 10+ irout pin,1,12 12 V- irout pin,1,19 19 MUTE irout pin,1,20 20 PWR irout pin,1,21 21
- Applies To:
- 08M2, 14M2, 18M2, 20M2, 20X2, 28X1, 28X2, 40X1, 40X2
- See Also:
- Related Create:
Send an IR remote control
Send an IR remote control command to push button "5" for a TV via an IR LED on output B.1
- Code Example:
-
for b1 = 1 to 10 irout B.1,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.