RC6SEND

From MCS Wiki AVR
(Difference between revisions)
Jump to: navigation, search
(Created page with "<parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black"> === This page contains ...")
 
 
Line 1: Line 1:
<parsererror style="display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black">
+
= <span class="f_Header">Action</span> =
=== This page contains the following errors: ===
+
 
<div style="font-family:monospace;font-size:12px">error on line 1 at column 13435: Comment not terminated </div>
+
Sends RC6 remote code.
=== Below is a rendering of the page up to the first error. ===
+
 
</parsererror>
+
<span style="font-family: Arial;">&nbsp;</span>
= <span class="f_Header">Action</span> = Sends RC6 remote code. <span style="font-family: Arial;">&nbsp;</span> <span style="font-family: Arial;">&nbsp;</span> = <span class="f_Header">Syntax</span> = <span class="f_Syntax">RC6SEND</span>&nbsp;togglebit, address, command <span style="font-family: Arial;">&nbsp;</span> <span style="font-family: Arial;">&nbsp;</span> = <span class="f_Header">Uses</span> = TIMER1 <span style="font-family: Arial;">&nbsp;</span> <span style="font-family: Arial;">&nbsp;</span> = <span class="f_Header">Remarks</span> =
+
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">{| width="602" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;" |- style="vertical-align: top;" | valign="top" width="14%" style="width: 81px; border: 1px solid rgb(0, 0, 0);" | Togglebit | valign="top" width="100%" style="width: 512px; border: 1px solid rgb(0, 0, 0);" | Make the toggle bit 0 or 1 to set the toggle bit |- style="vertical-align: top;" | valign="top" width="14%" style="width: 81px; border: 1px solid rgb(0, 0, 0);" | Address | valign="top" width="100%" style="width: 512px; border: 1px solid rgb(0, 0, 0);" | The RC6 address |- style="vertical-align: top;" | valign="top" width="14%" style="width: 81px; border: 1px solid rgb(0, 0, 0);" | Command | valign="top" width="100%" style="width: 512px; border: 1px solid rgb(0, 0, 0);" | The RC6 command. |}</div>
+
<span style="font-family: Arial;">&nbsp;</span>
<span style="font-family: Arial;">&nbsp;</span> The resistor must be connected to the OC1A pin. In the example a 2313 micro was used. This micro has pin portB.3 connected to OC1A. Look in a data sheet for the proper pin when used with a different chip. <span style="font-family: Arial;">&nbsp;</span> <span style="font-family: Arial;">&nbsp;</span> Most audio and video systems are equipped with an infrared remote control. The RC6 code is a 16-bit word bi-phase coded signal. The header is 20 bits long including the toggle bits. Eight system bits hold the system address so that only the right system responds to the code. <span style="font-family: Arial;">&nbsp;</span> Usually, TV sets have the system address 0, VCRs the address 5 and so on. The command sequence is eight bits long, allowing up to 256 different commands per address. <span style="font-family: Arial;">&nbsp;</span> The bits are transmitted in bi-phase code (also known as Manchester code). <span style="font-family: Arial;">&nbsp;</span> <span style="font-family: Arial;">&nbsp;</span> An IR booster circuit is shown below: <span style="font-family: Arial;">&nbsp;</span> &#x5B;&#x5B;File:Irboost.gif|center&#x5D;&#x5D; <span style="font-family: Arial;">&nbsp;</span>
+
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">{| width="344" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;" |- style="vertical-align: top;" | valign="top" width="21%" bgcolor="#ffff99" style="width: 168px; height: 16px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" | <span style="font-weight: bold;">Device</span> | valign="top" width="21%" bgcolor="#ffff99" style="width: 167px; height: 16px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" | <span style="font-weight: bold;">Address</span> |- style="vertical-align: top;" | valign="top" width="21%" style="width: 168px; border: 1px solid rgb(0, 0, 0);" | TV | valign="top" width="21%" style="width: 167px; border: 1px solid rgb(0, 0, 0);" | 0 |- style="vertical-align: top;" | valign="top" width="21%" style="width: 168px; border: 1px solid rgb(0, 0, 0);" | VCR | valign="top" width="21%" style="width: 167px; border: 1px solid rgb(0, 0, 0);" | 5 |- style="vertical-align: top;" | valign="top" width="21%" style="width: 168px; border: 1px solid rgb(0, 0, 0);" | SAT | valign="top" width="21%" style="width: 167px; border: 1px solid rgb(0, 0, 0);" | 8 |- style="vertical-align: top;" | valign="top" width="21%" style="width: 168px; border: 1px solid rgb(0, 0, 0);" | DVD | valign="top" width="21%" style="width: 167px; border: 1px solid rgb(0, 0, 0);" | 4 |}</div>
+
= <span class="f_Header">Syntax</span> =
<span style="font-family: Arial;">&nbsp;</span> This is not a complete list. <span style="font-family: Arial;">&nbsp;</span>
+
 
<div style="padding: 0px; margin: 0px 0px 0px 4px;">{| width="631" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;" |- style="vertical-align: top;" | valign="top" width="100%" bgcolor="#ffff99" style="width: 460px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" | <span style="font-weight: bold;">Command</span> | valign="top" width="100%" bgcolor="#ffff99" style="width: 41px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" | <span style="font-weight: bold;">Value</span> | valign="top" width="100%" bgcolor="#ffff99" style="width: 74px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" | <span style="font-weight: bold;">Command</span> | valign="top" width="100%" bgcolor="#ffff99" style="width: 41px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" | <span style="font-weight: bold;">Value</span> |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Key 0 | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 0 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Balance right | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 26 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Key 1 | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 1 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Balance left | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 27 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Key 2-9 | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 2-9 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Channel search+ | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 30 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Previous program | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 10 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Channel search - | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 31 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Standby | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 12 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Next | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 32 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Mute/un-mute | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 13 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Previous | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 33 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Personal preference | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 14 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | External 1 | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 56 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Display | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 15 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | External 2 | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 57 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Volume up | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 16 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | TXT submode | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 60 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Volume down | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 17 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Standby | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 61 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Brightness up | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 18 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Menu on | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 84 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Brightness down | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 19 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Menu off | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 85 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Saturation up | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 20 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Help | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 129 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Saturation down | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 21 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Zoom - | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 246 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Bass up | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 22 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | Zoom + | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 247 |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Bass down | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 23 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | <span style="font-family: Arial;">&nbsp;</span> | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | <span style="font-family: Arial;">&nbsp;</span> |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Treble up | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 24 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | <span style="font-family: Arial;">&nbsp;</span> | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | <span style="font-family: Arial;">&nbsp;</span> |- style="vertical-align: top;" | valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" | Treble down | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | 25 | valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" | <span style="font-family: Arial;">&nbsp;</span> | valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" | <span style="font-family: Arial;">&nbsp;</span> |}</div>
+
<span class="f_Syntax">RC6SEND</span>&nbsp;togglebit, address, command
<span style="font-family: Arial;">&nbsp;</span> This list is by far not complete. Since there is little info about RC6 on the net available, use code at your own risk! <span style="font-family: Arial;">&nbsp;</span> <span style="font-family: Arial;">&nbsp;</span> <span style="font-family: Arial;">&nbsp;</span> = <span class="f_Header">See also</span> = &#x5B;&#x5B;CONFIG_RC5|CONFIG RC5&#x5D;&#x5D;&nbsp;,&nbsp;&#x5B;&#x5B;GETRC5&#x5D;&#x5D;&nbsp;,&nbsp;&#x5B;&#x5B;RC5SEND&#x5D;&#x5D; <span style="font-family: Arial;">&nbsp;</span> <span style="font-family: Arial;">&nbsp;</span> = <span class="f_Header">Example</span> = <br/> <source lang="bascomavr"></source>
+
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
= <span class="f_Header">Uses</span> =
 +
 
 +
TIMER1
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
= <span class="f_Header">Remarks</span> =
 +
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 +
{| width="602" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 +
|- style="vertical-align: top;"
 +
| valign="top" width="14%" style="width: 81px; border: 1px solid rgb(0, 0, 0);" |  
 +
Togglebit
 +
 
 +
| valign="top" width="100%" style="width: 512px; border: 1px solid rgb(0, 0, 0);" |  
 +
Make the toggle bit 0 or 1 to set the toggle bit
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="14%" style="width: 81px; border: 1px solid rgb(0, 0, 0);" |  
 +
Address
 +
 
 +
| valign="top" width="100%" style="width: 512px; border: 1px solid rgb(0, 0, 0);" |  
 +
The RC6 address
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="14%" style="width: 81px; border: 1px solid rgb(0, 0, 0);" |  
 +
Command
 +
 
 +
| valign="top" width="100%" style="width: 512px; border: 1px solid rgb(0, 0, 0);" |  
 +
The RC6 command.
 +
 
 +
|}
 +
</div>
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
The resistor must be connected to the OC1A pin. In the example a 2313 micro was used. This micro has pin portB.3 connected to OC1A.
 +
 
 +
Look in a data sheet for the proper pin when used with a different chip.
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
Most audio and video systems are equipped with an infrared remote control.
 +
 
 +
The RC6 code is a 16-bit word bi-phase coded signal.
 +
 
 +
The header is 20 bits long including the toggle bits.
 +
 
 +
Eight system bits hold the system address so that only the right system responds to the code.
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
Usually, TV sets have the system address 0, VCRs the address 5 and so on. The command sequence is eight bits long, allowing up to 256 different commands per address.
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
The bits are transmitted in bi-phase code (also known as Manchester code).
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
An IR booster circuit is shown below:
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
 
 +
 
 +
[[File:Irboost.gif|center|Irboost.gif]]
 +
 
 +
 
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 +
{| width="344" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 +
|- style="vertical-align: top;"
 +
| valign="top" width="21%" bgcolor="#ffff99" style="width: 168px; height: 16px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-weight: bold;">Device</span>
 +
 
 +
| valign="top" width="21%" bgcolor="#ffff99" style="width: 167px; height: 16px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-weight: bold;">Address</span>
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="21%" style="width: 168px; border: 1px solid rgb(0, 0, 0);" |  
 +
TV
 +
 
 +
| valign="top" width="21%" style="width: 167px; border: 1px solid rgb(0, 0, 0);" |  
 +
0
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="21%" style="width: 168px; border: 1px solid rgb(0, 0, 0);" |  
 +
VCR
 +
 
 +
| valign="top" width="21%" style="width: 167px; border: 1px solid rgb(0, 0, 0);" |  
 +
5
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="21%" style="width: 168px; border: 1px solid rgb(0, 0, 0);" |  
 +
SAT
 +
 
 +
| valign="top" width="21%" style="width: 167px; border: 1px solid rgb(0, 0, 0);" |  
 +
8
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="21%" style="width: 168px; border: 1px solid rgb(0, 0, 0);" |  
 +
DVD
 +
 
 +
| valign="top" width="21%" style="width: 167px; border: 1px solid rgb(0, 0, 0);" |  
 +
4
 +
 
 +
|}
 +
</div>
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
This is not a complete list.
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
<div style="padding: 0px; margin: 0px 0px 0px 4px;">
 +
{| width="631" cellspacing="0" cellpadding="1" border="1" style="border: 2px solid rgb(0, 0, 0); border-spacing: 0px; border-collapse: collapse;"
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" bgcolor="#ffff99" style="width: 460px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-weight: bold;">Command</span>
 +
 
 +
| valign="top" width="100%" bgcolor="#ffff99" style="width: 41px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-weight: bold;">Value</span>
 +
 
 +
| valign="top" width="100%" bgcolor="#ffff99" style="width: 74px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-weight: bold;">Command</span>
 +
 
 +
| valign="top" width="100%" bgcolor="#ffff99" style="width: 41px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-weight: bold;">Value</span>
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Key 0
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
0
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Balance right
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
26
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Key 1
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
1
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Balance left
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
27
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Key 2-9
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
2-9
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Channel search+
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
30
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Previous program
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
10
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Channel search -
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
31
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Standby
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
12
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Next
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
32
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Mute/un-mute
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
13
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Previous
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
33
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Personal preference
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
14
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
External 1
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
56
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Display
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
15
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
External 2
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
57
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Volume up
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
16
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
TXT submode
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
60
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Volume down
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
17
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Standby
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
61
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Brightness up
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
18
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Menu on
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
84
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Brightness down
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
19
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Menu off
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
85
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Saturation up
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
20
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Help
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
129
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Saturation down
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
21
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Zoom -
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
246
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Bass up
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
22
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
Zoom +
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
247
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Bass down
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
23
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Treble up
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
24
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="100%" style="width: 460px; border: 1px solid rgb(0, 0, 0);" |  
 +
Treble down
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
25
 +
 
 +
| valign="top" width="100%" style="width: 74px; border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
| valign="top" width="100%" style="width: 41px; border: 1px solid rgb(0, 0, 0);" |  
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
|}
 +
</div>
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
This list is by far not complete.
 +
 
 +
Since there is little info about RC6 on the net available, use code at your own risk!
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
= <span class="f_Header">See also</span> =
 +
 
 +
[[CONFIG RC5|CONFIG RC5]]&nbsp;,&nbsp;[[GETRC5]]&nbsp;,&nbsp;[[RC5SEND]]
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
<span style="font-family: Arial;">&nbsp;</span>
 +
 
 +
= <span class="f_Header">Example</span> =
 +
 
 +
<br/><source lang="bascomavr">
 +
'-----------------------------------------------------------------------------------------
 +
'name : sendrc6.bas
 +
'copyright : (c) 1995-2005, MCS Electronics
 +
'purpose : code based on application note from Ger Langezaal
 +
'micro : AT90S2313
 +
'suited for demo : yes
 +
'commercial addon needed : no
 +
'-----------------------------------------------------------------------------------------
 +
 +
$regfile = "2313def.dat" ' specify the used micro
 +
$crystal = 4000000 ' used crystal frequency
 +
$baud = 19200 ' use baud rate
 +
$hwstack = 32 ' default use 32 for the hardware stack
 +
$swstack = 10 ' default use 10 for the SW stack
 +
$framesize = 40 ' default use 40 for the frame space
 +
 +
' +5V <---[A Led K]---[220 Ohm]---> Pb.3 for 2313.
 +
' RC6SEND is using TIMER1, no interrupts are used
 +
' The resistor must be connected to the OC1(A) pin , in this case PB.3
 +
 +
Dim Togbit As Byte , Command As Byte , Address As Byte
 +
 +
'this controls the TV but you could use rc6send to make your DVD region free as well :-)
 +
'Just search the net for the codes you need to send. Do not ask me for info please.
 +
Command = 32 ' channel next
 +
Togbit = 0 ' make it 0 or 32 to set the toggle bit
 +
Address = 0
 +
Do
 +
Waitms 500
 +
Rc6send Togbit , Address , Command
 +
Loop
 +
End
 +
</source><br/>{{Languages}}
 +
 
 +
[[Category:BASCOM Language Reference]]

Latest revision as of 23:52, 11 February 2013

Contents

Action

Sends RC6 remote code.

 

 

Syntax

RC6SEND togglebit, address, command

 

 

Uses

TIMER1

 

 

Remarks

Togglebit

Make the toggle bit 0 or 1 to set the toggle bit

Address

The RC6 address

Command

The RC6 command.

 

The resistor must be connected to the OC1A pin. In the example a 2313 micro was used. This micro has pin portB.3 connected to OC1A.

Look in a data sheet for the proper pin when used with a different chip.

 

 

Most audio and video systems are equipped with an infrared remote control.

The RC6 code is a 16-bit word bi-phase coded signal.

The header is 20 bits long including the toggle bits.

Eight system bits hold the system address so that only the right system responds to the code.

 

Usually, TV sets have the system address 0, VCRs the address 5 and so on. The command sequence is eight bits long, allowing up to 256 different commands per address.

 

The bits are transmitted in bi-phase code (also known as Manchester code).

 

 

An IR booster circuit is shown below:

 


Irboost.gif


 

Device

Address

TV

0

VCR

5

SAT

8

DVD

4

 

This is not a complete list.

 

Command

Value

Command

Value

Key 0

0

Balance right

26

Key 1

1

Balance left

27

Key 2-9

2-9

Channel search+

30

Previous program

10

Channel search -

31

Standby

12

Next

32

Mute/un-mute

13

Previous

33

Personal preference

14

External 1

56

Display

15

External 2

57

Volume up

16

TXT submode

60

Volume down

17

Standby

61

Brightness up

18

Menu on

84

Brightness down

19

Menu off

85

Saturation up

20

Help

129

Saturation down

21

Zoom -

246

Bass up

22

Zoom +

247

Bass down

23

 

 

Treble up

24

 

 

Treble down

25

 

 

 

This list is by far not complete.

Since there is little info about RC6 on the net available, use code at your own risk!

 

 

 

See also

CONFIG RC5 , GETRC5 , RC5SEND

 

 

Example


'-----------------------------------------------------------------------------------------
'name : sendrc6.bas
'copyright : (c) 1995-2005, MCS Electronics
'purpose : code based on application note from Ger Langezaal
'micro : AT90S2313
'suited for demo : yes
'commercial addon needed : no
'-----------------------------------------------------------------------------------------
 
$regfile = "2313def.dat" ' specify the used micro
$crystal = 4000000 ' used crystal frequency
$baud = 19200 ' use baud rate
$hwstack = 32 ' default use 32 for the hardware stack
$swstack = 10 ' default use 10 for the SW stack
$framesize = 40 ' default use 40 for the frame space
 
' +5V <---[A Led K]---[220 Ohm]---> Pb.3 for 2313.
' RC6SEND is using TIMER1, no interrupts are used
' The resistor must be connected to the OC1(A) pin , in this case PB.3
 
Dim Togbit As Byte , Command As Byte , Address As Byte
 
'this controls the TV but you could use rc6send to make your DVD region free as well :-)
'Just search the net for the codes you need to send. Do not ask me for info please.
Command = 32 ' channel next
Togbit = 0 ' make it 0 or 32 to set the toggle bit
Address = 0
Do
Waitms 500
Rc6send Togbit , Address , Command
Loop
End

Languages   English Deutsch  
Personal tools
Namespaces
Variants
Actions
Navigation
In other languages
Language