Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 937 → Rev 938

/Spektrum-Diversity/Software/diversity.c
1,6 → 1,13
// ***************************************************************
// ** Spektrum Diversity v2.0 - use up to 4 satellite receivers **
// ** Spektrum Diversity v2.1 - use up to 4 satellite receivers **
// ***************************************************************
// ** Spektrum DSMX Binding Extension by Johannes Stein 2011/03 **
// ** **
// ** 3 Pulses = DSM2 1024/22ms **
// ** 5 Pulses = DSM2 2048/11ms **
// ** 7 Pulses = DSMX 22ms **
// ** 9 Pulses = DSMX 11ms **
// ** **
// ** Target: An Atmel ATtiny2313 (RC-Oscillator @ 8 MHz) **
// ** controls a 74HC151 Multiplexer **
// ***************************************************************
118,9 → 125,9
 
DDRB = 0b00000000; // Sat-Pins to input again
bind++; // Save increased bind-pulse-counter for next binding.
if (bind > 6) bind = 3; // 3 pulses are for DX7+AR6200, 4-6 pulses have been seen...
eeprom_write_byte(&eebind, bind); // around the world for other combinations. Hopefully it works for them.
bind += 2;
if (bind > 9) bind = 3; // 3, 5, 7, 9 pulses, then start with 3 again
eeprom_write_byte(&eebind, bind); // Save increased bind-pulse-counter for next binding.
_delay_ms(500);
}
 
198,9 → 205,9
PORTB = 0b11110000; // Port B Pullup's for (unused) satellites
PORTD = 0b1100001; // Port D Pullup's for Switch & Test, LED off
 
if (eeprom_read_byte(&eecheck) != 0x42) // Invalid Data in EEPROM -> initialize
if (eeprom_read_byte(&eecheck) != 0x84) // Invalid Data in EEPROM -> initialize
{
eeprom_write_byte(&eecheck, 0x42);
eeprom_write_byte(&eecheck, 0x84);
bind = 3;
eeprom_write_byte(&eebind, bind);
}
/Spektrum-Diversity/Software/Hex-Files/diversity.hex
29,7 → 29,7
:1001C00090E048EC50E013C0909828EE33E0FA013C
:1001D0003197F1F721503040D1F7909A24EC39E073
:1001E000FA013197F1F721503040D1F79F5F98170E
:1001F00058F317BA8F5F80936300873018F083E05D
:1001F00058F317BA8E5F809363008A3018F083E05B
:100200008093630020916300E199FECF1CBA82E0E5
:1002100090E08EBB2DBB0FB6F894E29AE19A0FBE28
:1002200088E893E128EC30E0F9013197F1F7019784
54,7 → 54,7
:10035000CF93CDB7DEB72C970FB6F894DEBF0FBEA4
:10036000CDBF17BA89E181BB80EF88BB81E682BB34
:10037000E199FECF81E090E0982F8EBBE09A8DB39B
:100380008234E1F0E199FECF1CBA9EBB82E48DBBC2
:100380008438E1F0E199FECF1CBA9EBB84E88DBBB6
:100390000FB6F894E29AE19A0FBE83E0809363006F
:1003A000E199FECF1CBA82E090E08EBB83E08DBB6A
:1003B0000FB6F894E29AE19A0FBE09C0E199FECF18
/Spektrum-Diversity/Software/diversity.aps
1,0 → 0,0
<AVRStudio><MANAGEMENT><ProjectName>diversity</ProjectName><Created>23-Jul-2010 13:27:06</Created><LastEdit>27-Jan-2011 09:28:44</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>23-Jul-2010 13:27:06</Created><Version>4</Version><Build>4, 18, 0, 670</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\diversity.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>D:\Pendsa\Kopter\Diversity\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>ATmega128.xml</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>diversity.c</SOURCEFILE><OTHERFILE>default\diversity.lss</OTHERFILE><OTHERFILE>default\diversity.map</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>attiny2313</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>diversity.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>0</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\Programme\WinAVR-20081205\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\Programme\WinAVR-20081205\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><ProjectFiles><Files><Name>D:\Pendsa\Kopter\Diversity\diversity.c</Name></Files></ProjectFiles><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files><File00000><FileId>00000</FileId><FileName>diversity.c</FileName><Status>1</Status></File00000></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>
<AVRStudio><MANAGEMENT><ProjectName>diversity</ProjectName><Created>23-Jul-2010 13:27:06</Created><LastEdit>29-Mar-2011 15:30:24</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>23-Jul-2010 13:27:06</Created><Version>4</Version><Build>4, 18, 0, 670</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\diversity.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>d:\Software\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET>JTAGICE mkII</CURRENT_TARGET><CURRENT_PART>ATmega128.xml</CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM>Auto</COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>diversity.c</SOURCEFILE><OTHERFILE>default\diversity.lss</OTHERFILE><OTHERFILE>default\diversity.map</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>attiny2313</PART><HEX>1</HEX><LIST>1</LIST><MAP>1</MAP><OUTPUTFILENAME>diversity.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>0</ISDIRTY><OPTIONS/><INCDIRS/><LIBDIRS/><LIBS/><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -std=gnu99 -DF_CPU=8000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums</OPTIONSFORALL><LINKEROPTIONS></LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\Programme\WinAVR-20081205\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\Programme\WinAVR-20081205\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><ProjectFiles><Files><Name>d:\Software\diversity.c</Name></Files></ProjectFiles><IOView><usergroups/><sort sorted="0" column="0" ordername="1" orderaddress="1" ordergroup="1"/></IOView><Files><File00000><FileId>00000</FileId><FileName>diversity.c</FileName><Status>1</Status></File00000></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>
/Spektrum-Diversity/Software/diversity.aws
1,0 → 0,0
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA128"/><Files><File00000 Name="D:\Pendsa\Kopter\Diversity\diversity.c" Position="262 71 1682 776" LineCol="122 58" State="Maximized"/></Files></AVRWorkspace>
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA128"/><Files><File00000 Name="d:\Software\diversity.c" Position="262 71 1682 776" LineCol="128 1" State="Maximized"/></Files></AVRWorkspace>