Change from 16 to 24 Byte Config Code
authorTobias <tm@tm3d.de>
Fri, 17 Feb 2017 07:59:11 +0000 (08:59 +0100)
committerTobias <tm@tm3d.de>
Fri, 17 Feb 2017 07:59:11 +0000 (08:59 +0100)
Add REAL Working DS2423 with EEPROM Save
Non blocking on 1-Wire Bus always low (Changes in timer interrupt)
New CO2 Sensor

49 files changed:
DS18B20_BMP280/DS18B20_BMP280.c
DS18B20_BMP280/DS18B20_BMP280.cproj
DS18B20_BMP280_DS2438_SHT/DS18B20_BMP280_DS2438_SHT.cproj
DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438.c
DS18B20_CDM7160/DS18B20_CDM7160.atsln [new file with mode: 0644]
DS18B20_CDM7160/DS18B20_CDM7160.c [new file with mode: 0644]
DS18B20_CDM7160/DS18B20_CDM7160.cproj [new file with mode: 0644]
DS18B20_MAX44009/DS18B20_MAX44009.c
DS18B20_MAX44009_DS2438_SHT/DS18B20_DS2438.c
DS18B20_MAX44009_DS2438_SHT/DS18B20_MAX44009_DS2438_SHT.cproj
DS18B20_Thermocouble/DS18B20_TC.c
DS18B20_Thermocouble_DS2438_SHT/DS18B20_DS2438.c
DS18B20_Thermocouble_DS2438_SHT/DS18B20_Thermocouble_DS2438_SHT.cproj
DS18B20_VOC/DS18B20_VOC.c
DS18B20_VOC/DS18B20_VOC.cproj
DS18B20_VOC_DS2438_SHT direct/DS18B20_DS2438.c [new file with mode: 0644]
DS18B20_VOC_DS2438_SHT/DS18B20_DS2438.c
DS2406/DS2406.cproj
DS2423 - Autosave/DS2423.atsln [new file with mode: 0644]
DS2423 - Autosave/DS2423.c [new file with mode: 0644]
DS2423 - Autosave/DS2423.cproj [new file with mode: 0644]
DS2423/DS2423.c
DS2423_BMP280/DS2423_BMP280.c
DS2423_komische platine/DS2423.c
DS2423_komische platine/DS2423.cproj
DS2438_DHT22/DS2438_DHT22.c
DS2438_HDC1080/DS2438_HDC1080.c
DS2438_HDC1080/DS2438_HDC1080.cproj
DS2438_HIH9121/DS2438_HIH9121.c
DS2438_SHT2X/DS2438_SHT2X.c
DS2450/DS2450.c
DS2450_SHT2X_BMP280/DS2450_SHT2X_BMP280.c
DS2450_SHT2X_BMP280/DS2450_SHT2X_BMP280.cproj
DS2450_SHT2X_BMP280_MAX44009/DS2450_SHT2X_BMP280_MAX44009.c
DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.c
DS2450_SHT2X_MAX44009/DS2450_SHT2X_MAX44009.cproj
DS2450_VOC_SHT_BMP/DS2450.cproj
DS2450_VOC_SHT_BMP/DS2450_VOC_SHT_BMP.c
common/I2C/CDM7160.c [new file with mode: 0644]
common/I2C/CDM7160.h [new file with mode: 0644]
common/OWCRC16.s
common/OWConfig.s
common/OWDS18B20_DS2438.S
common/OWDS2423.S
common/OWRomFunctions.s
common/OWRomFunctionsDual.s
common/OWSet_ATTINYX4.s
common/OWTimerInterrupt.s
programmer/programmer/programmer.asm

index 261c78d..78bb7d6 100644 (file)
@@ -1,5 +1,4 @@
-\r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -49,7 +48,7 @@ extern void EXTERN_SLEEP();
 \r
 \r
 uint8_t owid[8]={0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40};/**/\r
-uint8_t config_info[16]={0x02,0x03, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x02,0x03, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
        \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index b41de76..25b04ce 100644 (file)
     <BootSegment>2</BootSegment>\r
     <eraseonlaunchrule>1</eraseonlaunchrule>\r
     <AsfFrameworkConfig>\r
-      <framework-data xmlns="">\r
-        <options />\r
-        <configurations />\r
-        <files />\r
-        <documentation help="" />\r
-        <offline-documentation help="" />\r
-        <dependencies>\r
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.19.0" />\r
-        </dependencies>\r
-      </framework-data>\r
+      <framework-data>\r
+  <options />\r
+  <configurations />\r
+  <files />\r
+  <documentation help="" />\r
+  <offline-documentation help="" />\r
+  <dependencies>\r
+    <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
+  </dependencies>\r
+</framework-data>\r
     </AsfFrameworkConfig>\r
     <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
     <com_atmel_avrdbg_tool_atmelice>\r
       <SubType>compile</SubType>\r
       <Link>OWDS18B20.S</Link>\r
     </Compile>\r
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">\r
+    <Compile Include="..\common\I2C\USI_TWI_Master.c">\r
       <SubType>compile</SubType>\r
       <Link>USI_TWI_Master.c</Link>\r
     </Compile>\r
     </Compile>\r
   </ItemGroup>\r
   <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
-</Project>
\ No newline at end of file
+</Project>\r
index 8fccb76..2594168 100644 (file)
     <eraseonlaunchrule>1</eraseonlaunchrule>\r
     <AsfFrameworkConfig>\r
       <framework-data>\r
-  <options />\r
-  <configurations />\r
-  <files />\r
-  <documentation help="" />\r
-  <offline-documentation help="" />\r
-  <dependencies>\r
-    <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
-  </dependencies>\r
-</framework-data>\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
+        </dependencies>\r
+      </framework-data>\r
     </AsfFrameworkConfig>\r
-    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
+    <avrtool>custom</avrtool>\r
     <com_atmel_avrdbg_tool_atmelice>\r
       <ToolOptions>\r
         <InterfaceProperties>\r
@@ -54,8 +54,7 @@
       <ToolOptions>\r
         <InterfaceProperties>\r
         </InterfaceProperties>\r
-        <InterfaceName>\r
-        </InterfaceName>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
       </ToolOptions>\r
       <ToolType>com.atmel.avrdbg.tool.simulator</ToolType>\r
       <ToolNumber>\r
       <ToolName>Simulator</ToolName>\r
     </com_atmel_avrdbg_tool_simulator>\r
     <ExternalProgrammingToolCommand />\r
-    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>\r
+    <avrtoolserialnumber>\r
+    </avrtoolserialnumber>\r
     <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
+    <custom>\r
+      <ToolOptions xmlns="">\r
+        <InterfaceProperties>\r
+        </InterfaceProperties>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType xmlns="">custom</ToolType>\r
+      <ToolNumber xmlns="">\r
+      </ToolNumber>\r
+      <ToolName xmlns="">Custom Programming Tool</ToolName>\r
+    </custom>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
     <ToolchainSettings>\r
       <SubType>compile</SubType>\r
       <Link>SHT2x.c</Link>\r
     </Compile>\r
-    <Compile Include="D:\oc\dev\owSlave2\common\calibr.c">\r
+    <Compile Include="..\common\calibr.c">\r
       <SubType>compile</SubType>\r
       <Link>calibr.c</Link>\r
     </Compile>\r
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\BMP280.c">\r
+    <Compile Include="..\common\I2C\BMP280.c">\r
       <SubType>compile</SubType>\r
       <Link>BMP280.c</Link>\r
     </Compile>\r
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">\r
+    <Compile Include="..\common\I2C\USI_TWI_Master.c">\r
       <SubType>compile</SubType>\r
       <Link>USI_TWI_Master.c</Link>\r
     </Compile>\r
-    <Compile Include="D:\oc\dev\owSlave2\common\OWDS18B20_DS2438.S">\r
+    <Compile Include="..\common\OWDS18B20_DS2438.S">\r
       <SubType>compile</SubType>\r
       <Link>OWDS18B20_DS2438.S</Link>\r
     </Compile>\r
     </Compile>\r
   </ItemGroup>\r
   <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
-</Project>
\ No newline at end of file
+</Project>\r
index d4dbcc0..191de8f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -48,8 +48,10 @@ extern void EXTERN_SLEEP();
 \r
 uint8_t owid1[8]={0x28, 0xA3, 0xD9, 0x84, 0x00, 0x16, 0x05, 0x18};/**/\r
 uint8_t owid2[8]={0x26, 0xA3, 0xD9, 0x84, 0x00, 0x16, 0x05, 0x67};/**/\r
-uint8_t config_info1[16]={0x02,0x03, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};        \r
-uint8_t config_info2[16]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};        \r
+\r
+uint8_t config_info1[26]={0x02,0x03, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info2[26]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x02,7,0x00,7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+\r
        \r
 #if (owid>128) \r
 #error "Variable not correct"\r
diff --git a/DS18B20_CDM7160/DS18B20_CDM7160.atsln b/DS18B20_CDM7160/DS18B20_CDM7160.atsln
new file mode 100644 (file)
index 0000000..bb4e41c
--- /dev/null
@@ -0,0 +1,22 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Atmel Studio Solution File, Format Version 11.00\r
+VisualStudioVersion = 14.0.23107.0\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "DS18B20_CDM7160", "DS18B20_CDM7160.cproj", "{7A5672FE-8226-4158-B931-E1F36B9A8858}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|AVR = Debug|AVR\r
+               Release|AVR = Release|AVR\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {7A5672FE-8226-4158-B931-E1F36B9A8858}.Debug|AVR.ActiveCfg = Debug|AVR\r
+               {7A5672FE-8226-4158-B931-E1F36B9A8858}.Debug|AVR.Build.0 = Debug|AVR\r
+               {7A5672FE-8226-4158-B931-E1F36B9A8858}.Release|AVR.ActiveCfg = Release|AVR\r
+               {7A5672FE-8226-4158-B931-E1F36B9A8858}.Release|AVR.Build.0 = Release|AVR\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/DS18B20_CDM7160/DS18B20_CDM7160.c b/DS18B20_CDM7160/DS18B20_CDM7160.c
new file mode 100644 (file)
index 0000000..b46797c
--- /dev/null
@@ -0,0 +1,185 @@
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
+// All rights reserved.\r
+//\r
+// Redistribution and use in source and binary forms, with or without\r
+// modification, are permitted provided that the following conditions are\r
+// met:\r
+//\r
+//  * Redistributions of source code must retain the above copyright\r
+//    notice, this list of conditions and the following disclaimer.\r
+//  * Redistributions in binary form must reproduce the above copyright\r
+//    notice, this list of conditions and the following disclaimer in the\r
+//    documentation and/or other materials provided with the\r
+//    distribution.\r
+//  * All advertising materials mentioning features or use of this\r
+//    software must display the following acknowledgement: This product\r
+//    includes software developed by tm3d.de and its contributors.\r
+//  * Neither the name of tm3d.de nor the names of its contributors may\r
+//    be used to endorse or promote products derived from this software\r
+//    without specific prior written permission.\r
+//\r
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+#define F_CPU 8000000UL\r
+#include <avr/io.h>\r
+#include <avr/interrupt.h>\r
+#include <util/delay.h>\r
+#include <avr/wdt.h>\r
+#include <avr/sleep.h>\r
+#include <avr/pgmspace.h>\r
+#include "../common/I2C/USI_TWI_Master.h"\r
+#include "../common/I2C/CDM7160.h"\r
+\r
+\r
+extern void OWINIT();\r
+\r
+extern void EXTERN_SLEEP();\r
+\r
+\r
+uint8_t owid[8]={0x28, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x77, 0x6B};/**/\r
+uint8_t config_info[26]={10,13, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,16,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+       \r
+#if (owid>128) \r
+#error "Variable not correct"\r
+#endif\r
+\r
+extern uint8_t mode;\r
+extern uint8_t gcontrol;\r
+extern uint8_t reset_indicator;\r
+extern uint8_t alarmflag;\r
+volatile uint8_t wdcounter=5;\r
+\r
+#if  defined(__AVR_ATtiny24__)||defined(__AVR_ATtiny44__)  || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny24A__)||defined(__AVR_ATtiny44A__)  || defined(__AVR_ATtiny84A__)\r
+ISR(WATCHDOG_vect) {\r
+#else\r
+ISR(WDT_vect) {\r
+#endif \r
+       wdcounter++;\r
+       if (reset_indicator==1) reset_indicator++;\r
+       else if (reset_indicator==2) mode=0;\r
+\r
+\r
+}\r
+\r
+uint8_t max_adr=0;\r
+\r
+typedef union {\r
+       volatile uint8_t bytes[8];\r
+       struct {\r
+               uint16_t temp;  //0\r
+               uint8_t TH;  //2\r
+               uint8_t TL;  //3\r
+               uint8_t config;  //4\r
+               uint8_t rrFF; //5\r
+               uint8_t rr00; //6\r
+               uint8_t rr10; //7\r
+       };\r
+} pack_t;\r
+volatile pack_t pack;\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+int main(void){\r
+    PRR|=(1<<PRADC);  // adc for save Power\r
+       pack.temp=0x0550;\r
+       pack.config=0x7F;\r
+       pack.TH=75;\r
+       pack.TL=70;\r
+       pack.rrFF=0xFF;\r
+       pack.rr00=0;\r
+       pack.rr10=0x10;\r
+       PORTA=0xFF;\r
+       PORTB=0xFF;\r
+       OWINIT();\r
+       DDRB|=(1<<PINB1);\r
+       PORTB&=~(1<<PINB1);\r
+       PORTA&=~(1<<PINA0);\r
+\r
+       MCUCR &=~(1<<PUD); //All Pins Pullup...\r
+       MCUCR |=(1<<BODS);\r
+\r
+       WDTCSR |= ((1<<WDCE) );   // Enable the WD Change Bit//| (1<<WDE)\r
+       WDTCSR |=   (1<<WDIE) |              // Enable WDT Interrupt\r
+       (1<<WDP3) | (1<<WDP0);   // Set Timeout to ~8 seconds\r
+\r
+       MCUSR=0;\r
+       USI_TWI_Master_Initialise();\r
+       //CDM7160softReset();\r
+       //_delay_ms(100);\r
+\r
+       CDM7160setMode(0); //Power Down Mode\r
+       CDM7160setAvCount(0x3F);\r
+       CDM7160setFMode(1);\r
+       pack.temp=CDM7160getCO2();\r
+       CDM7160setMode(1);\r
+       gcontrol=1;\r
+       //DDRB|=(1<<PINB1);\r
+       //while (1)                     {volatile double l=CDM7160getCO2();}\r
+\r
+       sei();\r
+       #define PBR 1\r
+    while(1)   {\r
+       \r
+               if (gcontrol) {\r
+                       if (wdcounter<PBR)      wdcounter=PBR;\r
+                       gcontrol=0;\r
+               }\r
+               if ( wdcounter==PBR) {\r
+                       //CDM7160setMode(1);\r
+               }\r
+               if (wdcounter>(PBR+1)) {\r
+                       wdcounter=0;\r
+                       //PORTB|=(1<<PINB1); //Dauer 2.3ms\r
+                       volatile uint16_t l=CDM7160getCO2();    \r
+                       uint16_t w=l;\r
+                       uint8_t t8=w>>4;\r
+                       uint8_t af=0;\r
+                       if (t8>pack.TH) af=1;\r
+                       if (t8<=pack.TL) af=1; \r
+                       cli();\r
+                       pack.temp=w;\r
+                       //pack.temp++;\r
+                       alarmflag=af;\r
+                       sei();  \r
+                       //CDM7160setMode(0);\r
+                       EXTERN_SLEEP();         \r
+                       //PORTB&=~(1<<PINB1);\r
+                                       \r
+               }\r
+\r
+               \r
+#if  defined(__AVR_ATtiny25__)||defined(__AVR_ATtiny45__)  || defined(__AVR_ATtiny85__)\r
+                       if (((TIMSK & (1<<TOIE0))==0)&& (mode==0))\r
+#endif                 \r
+#if  defined(__AVR_ATtiny24__)||defined(__AVR_ATtiny44__)  || defined(__AVR_ATtiny84__) ||defined(__AVR_ATtiny24A__)||defined(__AVR_ATtiny44A__)  || defined(__AVR_ATtiny84A__)\r
+                       if (((TIMSK0 & (1<<TOIE0))==0)&& (mode==0))\r
+#endif\r
+                         {\r
+\r
+                       MCUCR|=(1<<SE)|(1<<SM1);\r
+                       MCUCR&=~(1<<ISC01);\r
+               } else {\r
+                       MCUCR|=(1<<SE);\r
+                       MCUCR&=~(1<<SM1);\r
+               }\r
+               //MCUCR&=~(1<<ISC01);\r
+               asm("SLEEP");\r
+   }\r
+\r
+\r
+}
\ No newline at end of file
diff --git a/DS18B20_CDM7160/DS18B20_CDM7160.cproj b/DS18B20_CDM7160/DS18B20_CDM7160.cproj
new file mode 100644 (file)
index 0000000..4e4abf0
--- /dev/null
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
+    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>\r
+    <ProjectGuid>{7a5672fe-8226-4158-b931-e1f36b9a8858}</ProjectGuid>\r
+    <avrdevice>ATtiny84A</avrdevice>\r
+    <avrdeviceseries>none</avrdeviceseries>\r
+    <OutputType>Executable</OutputType>\r
+    <Language>C</Language>\r
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>\r
+    <OutputFileExtension>.elf</OutputFileExtension>\r
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>\r
+    <AssemblyName>DS18B20_MAX44009</AssemblyName>\r
+    <Name>DS18B20_CDM7160</Name>\r
+    <RootNamespace>DS18B20_MAX44009</RootNamespace>\r
+    <ToolchainFlavour>Native</ToolchainFlavour>\r
+    <KeepTimersRunning>true</KeepTimersRunning>\r
+    <OverrideVtor>false</OverrideVtor>\r
+    <CacheFlash>true</CacheFlash>\r
+    <ProgFlashFromRam>true</ProgFlashFromRam>\r
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>\r
+    <UncachedRange />\r
+    <preserveEEPROM>true</preserveEEPROM>\r
+    <OverrideVtorValue>exception_table</OverrideVtorValue>\r
+    <BootSegment>2</BootSegment>\r
+    <eraseonlaunchrule>1</eraseonlaunchrule>\r
+    <AsfFrameworkConfig>\r
+      <framework-data>\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
+        </dependencies>\r
+      </framework-data>\r
+    </AsfFrameworkConfig>\r
+    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
+    <com_atmel_avrdbg_tool_atmelice>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+        </InterfaceProperties>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
+      <ToolNumber>J41800000789</ToolNumber>\r
+      <ToolName>Atmel-ICE</ToolName>\r
+    </com_atmel_avrdbg_tool_atmelice>\r
+    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+    <com_atmel_avrdbg_tool_simulator>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+        </InterfaceProperties>\r
+        <InterfaceName>\r
+        </InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.simulator</ToolType>\r
+      <ToolNumber>\r
+      </ToolNumber>\r
+      <ToolName>Simulator</ToolName>\r
+    </com_atmel_avrdbg_tool_simulator>\r
+    <ExternalProgrammingToolCommand />\r
+    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>\r
+    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.general.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.assembler.general.IncludePaths>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.general.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.assembler.general.IncludePaths>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Compile Include="..\common\I2C\CDM7160.c">\r
+      <SubType>compile</SubType>\r
+      <Link>CDM7160.c</Link>\r
+    </Compile>\r
+    <Compile Include="..\common\OWDS18B20.S">\r
+      <SubType>compile</SubType>\r
+      <Link>OWDS18B20.S</Link>\r
+    </Compile>\r
+    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">\r
+      <SubType>compile</SubType>\r
+      <Link>USI_TWI_Master.c</Link>\r
+    </Compile>\r
+    <Compile Include="DS18B20_CDM7160.c">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
+</Project>
\ No newline at end of file
index edf1be3..4aeb0e8 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -48,7 +48,7 @@ extern void EXTERN_SLEEP();
 \r
 \r
 uint8_t owid[8]={0x28, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x77, 0x6B};/**/\r
-uint8_t config_info[16]={0x03,0x04, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x03,0x04, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
        \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index e823003..c7ff34c 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -49,8 +49,10 @@ extern void EXTERN_SLEEP();
 \r
 uint8_t owid1[8]={0x28, 0xA3, 0xD9, 0x84, 0x00, 0x16, 0x05, 0x18};/**/\r
 uint8_t owid2[8]={0x26, 0xA3, 0xD9, 0x84, 0x00, 0x16, 0x05, 0x67};/**/\r
-uint8_t config_info1[16]={0x03,0x04, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};        \r
-uint8_t config_info2[16]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};        \r
+uint8_t config_info1[26]={0x03,0x04, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info2[26]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x02,7,0x00,7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+\r
+\r
        \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index 03def20..7acbedc 100644 (file)
     <ProgFlashFromRam>true</ProgFlashFromRam>\r
     <RamSnippetAddress>0x20000000</RamSnippetAddress>\r
     <UncachedRange />\r
-    <preserveEEPROM>true</preserveEEPROM>\r
+    <preserveEEPROM>false</preserveEEPROM>\r
     <OverrideVtorValue>exception_table</OverrideVtorValue>\r
     <BootSegment>2</BootSegment>\r
     <eraseonlaunchrule>1</eraseonlaunchrule>\r
     <AsfFrameworkConfig>\r
       <framework-data>\r
-  <options />\r
-  <configurations />\r
-  <files />\r
-  <documentation help="" />\r
-  <offline-documentation help="" />\r
-  <dependencies>\r
-    <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
-  </dependencies>\r
-</framework-data>\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
+        </dependencies>\r
+      </framework-data>\r
     </AsfFrameworkConfig>\r
     <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
     <com_atmel_avrdbg_tool_atmelice>\r
       <ToolOptions>\r
         <InterfaceProperties>\r
+          <IspClock>125000</IspClock>\r
         </InterfaceProperties>\r
-        <InterfaceName>debugWIRE</InterfaceName>\r
+        <InterfaceName>ISP</InterfaceName>\r
       </ToolOptions>\r
       <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
-      <ToolNumber>J41800000779</ToolNumber>\r
+      <ToolNumber>J41800000789</ToolNumber>\r
       <ToolName>Atmel-ICE</ToolName>\r
     </com_atmel_avrdbg_tool_atmelice>\r
-    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+    <avrtoolinterface>ISP</avrtoolinterface>\r
     <com_atmel_avrdbg_tool_simulator>\r
       <ToolOptions>\r
         <InterfaceProperties>\r
@@ -63,6 +64,9 @@
       <ToolName>Simulator</ToolName>\r
     </com_atmel_avrdbg_tool_simulator>\r
     <ExternalProgrammingToolCommand />\r
+    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>\r
+    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
+    <avrtoolinterfaceclock>125000</avrtoolinterfaceclock>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
     <ToolchainSettings>\r
index 447e694..d450db4 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -53,7 +53,7 @@ const float k_rs[54] PROGMEM ={0.000000,24.125000,48.585366,72.731707,96.829268,
 \r
 \r
 uint8_t owid[8]={0x28, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0xAC};/**/\r
-uint8_t config_info[16]={0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x02,6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
        \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index d3e41f1..3cf6053 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -60,8 +60,8 @@ double gettemp_rs(double V) {
 \r
 uint8_t owid1[8]={0x28, 0xA6, 0xD9, 0x84, 0x00, 0x00, 0x03, 0x68};/**/\r
 uint8_t owid2[8]={0x26, 0xA7, 0xD9, 0x84, 0x00, 0x00, 0x03, 0x20};/**/\r
-uint8_t config_info1[16]={0x01,0x02 ,0x00,0x00, 0x00,0x00, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};        \r
-uint8_t config_info2[16]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};        \r
+uint8_t config_info1[26]={0x01,0x02 ,0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; \r
+uint8_t config_info2[26]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x02,7,0x00,7,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};    \r
        \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index adb53ac..396866d 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectVersion>7.0</ProjectVersion>
-    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
-    <ProjectGuid>{7a5672fe-8226-4158-b931-e1f36b9a8858}</ProjectGuid>
-    <avrdevice>ATtiny84A</avrdevice>
-    <avrdeviceseries>none</avrdeviceseries>
-    <OutputType>Executable</OutputType>
-    <Language>C</Language>
-    <OutputFileName>$(MSBuildProjectName)</OutputFileName>
-    <OutputFileExtension>.elf</OutputFileExtension>
-    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
-    <AssemblyName>DS18B20_DS2438</AssemblyName>
-    <Name>DS18B20_Thermocouble_DS2438_SHT</Name>
-    <RootNamespace>DS18B20_DS2438</RootNamespace>
-    <ToolchainFlavour>Native</ToolchainFlavour>
-    <KeepTimersRunning>true</KeepTimersRunning>
-    <OverrideVtor>false</OverrideVtor>
-    <CacheFlash>true</CacheFlash>
-    <ProgFlashFromRam>true</ProgFlashFromRam>
-    <RamSnippetAddress>0x20000000</RamSnippetAddress>
-    <UncachedRange />
-    <preserveEEPROM>true</preserveEEPROM>
-    <OverrideVtorValue>exception_table</OverrideVtorValue>
-    <BootSegment>2</BootSegment>
-    <eraseonlaunchrule>1</eraseonlaunchrule>
-    <AsfFrameworkConfig>
-      <framework-data>
-        <options />
-        <configurations />
-        <files />
-        <documentation help="" />
-        <offline-documentation help="" />
-        <dependencies>
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />
-        </dependencies>
-      </framework-data>
-    </AsfFrameworkConfig>
-    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
-    <com_atmel_avrdbg_tool_atmelice>
-      <ToolOptions>
-        <InterfaceProperties>
-        </InterfaceProperties>
-        <InterfaceName>debugWIRE</InterfaceName>
-      </ToolOptions>
-      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
-      <ToolNumber>J41800000779</ToolNumber>
-      <ToolName>Atmel-ICE</ToolName>
-    </com_atmel_avrdbg_tool_atmelice>
-    <avrtoolinterface>debugWIRE</avrtoolinterface>
-    <com_atmel_avrdbg_tool_simulator>
-      <ToolOptions>
-        <InterfaceProperties>
-        </InterfaceProperties>
-        <InterfaceName>
-        </InterfaceName>
-      </ToolOptions>
-      <ToolType>com.atmel.avrdbg.tool.simulator</ToolType>
-      <ToolNumber>
-      </ToolNumber>
-      <ToolName>Simulator</ToolName>
-    </com_atmel_avrdbg_tool_simulator>
-    <ExternalProgrammingToolCommand />
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>DEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>DEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="..\common\I2C\SHT2x.c">
-      <SubType>compile</SubType>
-      <Link>SHT2x.c</Link>
-    </Compile>
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">
-      <SubType>compile</SubType>
-      <Link>USI_TWI_Master.c</Link>
-    </Compile>
-    <Compile Include="D:\oc\dev\owSlave2\common\OWDS18B20_DS2438.S">
-      <SubType>compile</SubType>
-      <Link>OWDS18B20_DS2438.S</Link>
-    </Compile>
-    <Compile Include="DS18B20_DS2438.c">
-      <SubType>compile</SubType>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
+    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>\r
+    <ProjectGuid>{7a5672fe-8226-4158-b931-e1f36b9a8858}</ProjectGuid>\r
+    <avrdevice>ATtiny84A</avrdevice>\r
+    <avrdeviceseries>none</avrdeviceseries>\r
+    <OutputType>Executable</OutputType>\r
+    <Language>C</Language>\r
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>\r
+    <OutputFileExtension>.elf</OutputFileExtension>\r
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>\r
+    <AssemblyName>DS18B20_DS2438</AssemblyName>\r
+    <Name>DS18B20_Thermocouble_DS2438_SHT</Name>\r
+    <RootNamespace>DS18B20_DS2438</RootNamespace>\r
+    <ToolchainFlavour>Native</ToolchainFlavour>\r
+    <KeepTimersRunning>true</KeepTimersRunning>\r
+    <OverrideVtor>false</OverrideVtor>\r
+    <CacheFlash>true</CacheFlash>\r
+    <ProgFlashFromRam>true</ProgFlashFromRam>\r
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>\r
+    <UncachedRange />\r
+    <preserveEEPROM>true</preserveEEPROM>\r
+    <OverrideVtorValue>exception_table</OverrideVtorValue>\r
+    <BootSegment>2</BootSegment>\r
+    <eraseonlaunchrule>1</eraseonlaunchrule>\r
+    <AsfFrameworkConfig>\r
+      <framework-data>\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
+        </dependencies>\r
+      </framework-data>\r
+    </AsfFrameworkConfig>\r
+    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
+    <com_atmel_avrdbg_tool_atmelice>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+        </InterfaceProperties>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
+      <ToolNumber>J41800000779</ToolNumber>\r
+      <ToolName>Atmel-ICE</ToolName>\r
+    </com_atmel_avrdbg_tool_atmelice>\r
+    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+    <com_atmel_avrdbg_tool_simulator>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+        </InterfaceProperties>\r
+        <InterfaceName>\r
+        </InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.simulator</ToolType>\r
+      <ToolNumber>\r
+      </ToolNumber>\r
+      <ToolName>Simulator</ToolName>\r
+    </com_atmel_avrdbg_tool_simulator>\r
+    <ExternalProgrammingToolCommand />\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Compile Include="..\common\I2C\SHT2x.c">\r
+      <SubType>compile</SubType>\r
+      <Link>SHT2x.c</Link>\r
+    </Compile>\r
+    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">\r
+      <SubType>compile</SubType>\r
+      <Link>USI_TWI_Master.c</Link>\r
+    </Compile>\r
+    <Compile Include="D:\oc\dev\owSlave2\common\OWDS18B20_DS2438.S">\r
+      <SubType>compile</SubType>\r
+      <Link>OWDS18B20_DS2438.S</Link>\r
+    </Compile>\r
+    <Compile Include="DS18B20_DS2438.c">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
 </Project>
\ No newline at end of file
index 043f104..4840d25 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -48,7 +48,7 @@ extern void EXTERN_SLEEP();
 \r
 \r
 uint8_t owid[8]={0x28, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x77, 0x6B};/**/\r
-uint8_t config_info[16]={0x01,0x01, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x08,0x01, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,17,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
        \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index fca0860..b69eb8c 100644 (file)
     <BootSegment>2</BootSegment>\r
     <eraseonlaunchrule>1</eraseonlaunchrule>\r
     <AsfFrameworkConfig>\r
-      <framework-data xmlns="">\r
-        <options />\r
-        <configurations />\r
-        <files />\r
-        <documentation help="" />\r
-        <offline-documentation help="" />\r
-        <dependencies>\r
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.19.0" />\r
-        </dependencies>\r
-      </framework-data>\r
+      <framework-data>\r
+  <options />\r
+  <configurations />\r
+  <files />\r
+  <documentation help="" />\r
+  <offline-documentation help="" />\r
+  <dependencies>\r
+    <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
+  </dependencies>\r
+</framework-data>\r
     </AsfFrameworkConfig>\r
     <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
     <com_atmel_avrdbg_tool_atmelice>\r
diff --git a/DS18B20_VOC_DS2438_SHT direct/DS18B20_DS2438.c b/DS18B20_VOC_DS2438_SHT direct/DS18B20_DS2438.c
new file mode 100644 (file)
index 0000000..d490f73
--- /dev/null
@@ -0,0 +1,448 @@
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
+// All rights reserved.\r
+//\r
+// Redistribution and use in source and binary forms, with or without\r
+// modification, are permitted provided that the following conditions are\r
+// met:\r
+//\r
+//  * Redistributions of source code must retain the above copyright\r
+//    notice, this list of conditions and the following disclaimer.\r
+//  * Redistributions in binary form must reproduce the above copyright\r
+//    notice, this list of conditions and the following disclaimer in the\r
+//    documentation and/or other materials provided with the\r
+//    distribution.\r
+//  * All advertising materials mentioning features or use of this\r
+//    software must display the following acknowledgement: This product\r
+//    includes software developed by tm3d.de and its contributors.\r
+//  * Neither the name of tm3d.de nor the names of its contributors may\r
+//    be used to endorse or promote products derived from this software\r
+//    without specific prior written permission.\r
+//\r
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+//!!!!!Max Program size 7551 Byte\r
+\r
+#define F_CPU 8000000UL\r
+#include <avr/io.h>\r
+#include <avr/interrupt.h>\r
+#include <util/delay.h>  \r
+#include <avr/wdt.h>\r
+#include <avr/sleep.h>\r
+#include <avr/pgmspace.h>\r
+#include "../common/I2C/USI_TWI_Master.h"\r
+#include "../common/I2C/SHT2x.h"\r
+#include "../common/calibr.h"\r
+\r
+extern void OWINIT(void);\r
+extern void EXTERN_SLEEP(void);\r
+\r
+\r
+\r
+volatile uint8_t owid1[8]={0x28, 0xA3, 0xD9, 0x84, 0x00, 0x16, 0x05, 0x18};/**/\r
+volatile uint8_t owid2[8]={0x26, 0xA3, 0xD9, 0x84, 0x00, 0x16, 0x05, 0x67};/**/\r
+volatile uint8_t config_info1[26]={0x08,0x01, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,17,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};      \r
+volatile uint8_t config_info2[26]={0x01,0x06, 0x05,0x08, 0x04,0x07, 11,0x08, 0x02,0x07,0x00,0x07,17,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};        \r
+       \r
+#if (owid>128) \r
+#error "Variable not correct"\r
+#endif\r
+\r
+extern uint8_t mode;\r
+extern uint8_t gcontrol;\r
+extern uint8_t reset_indicator;\r
+extern uint8_t alarmflag;\r
+volatile uint8_t wdcounter=1;\r
+\r
+\r
+#if  defined(__AVR_ATtiny24__)||defined(__AVR_ATtiny44__)  || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny24A__)||defined(__AVR_ATtiny44A__)  || defined(__AVR_ATtiny84A__)\r
+ISR(WATCHDOG_vect) {\r
+#else\r
+ISR(WDT_vect) {\r
+#endif \r
+       wdcounter++;\r
+       if (reset_indicator==1) reset_indicator++;\r
+       else if (reset_indicator==2) mode=0;\r
+\r
+\r
+}\r
+\r
+\r
+typedef union {\r
+       volatile uint8_t bytes[8];\r
+       struct {\r
+               uint16_t temp;  //0\r
+               uint8_t TH;  //2\r
+               uint8_t TL;  //3\r
+               uint8_t config;  //4\r
+               uint8_t rrFF; //5\r
+               uint8_t rr00; //6\r
+               uint8_t rr10; //7\r
+       };\r
+} pack1_t;\r
+volatile pack1_t pack1;\r
+\r
+\r
+\r
+typedef union {\r
+       #if  defined(__AVR_ATtiny25__)\r
+       volatile uint8_t bytes[16];\r
+       #else\r
+       volatile uint8_t bytes[64];\r
+       #endif\r
+       struct {\r
+               uint8_t status;  //1\r
+               int16_t temp;  //2\r
+               uint16_t voltage;  //4\r
+               int16_t current;  //6\r
+               uint8_t threshold; //8\r
+               \r
+               uint8_t page1[8]; //9\r
+               #if  defined(__AVR_ATtiny25__)\r
+               #else\r
+               uint8_t page2[8]; //17\r
+               union{ \r
+                       uint8_t page3[8]; //25\r
+                       struct {\r
+                               uint16_t R0;\r
+                               uint16_t VS;\r
+                               uint8_t cmode;\r
+                               int16_t ip;\r
+                               uint8_t free;\r
+                       };\r
+               };\r
+               union{ \r
+                       uint8_t page4[8];  //33\r
+                       struct {\r
+                               uint16_t tol_s8;\r
+                               uint16_t tol_d;\r
+                               uint16_t r_day_max;\r
+                               uint16_t r_week_max;\r
+                       };\r
+               };\r
+               uint8_t page5[8];  //41\r
+               uint8_t page6[8];  //49\r
+               uint8_t page7[8];  //57\r
+               \r
+               #endif\r
+       };\r
+} pack2_t;\r
+volatile pack2_t pack2;\r
+\r
+\r
+\r
+\r
+volatile int16_t am2302_temp;\r
+volatile uint16_t am2302_hum;\r
+\r
+\r
+uint8_t userRegister[1];\r
+int16_t sRH,sT;\r
+double temperatureC,humidityRH,hhum;\r
+double l;\r
+\r
+\r
+uint16_t weekmaxarr[8];\r
+\r
+//Kompensieren der Abhänigkeit von RS/RO von Temperatur und Luftfeuchte\r
+inline double interp(double t, double h) {\r
+       double h2;\r
+        double t2;\r
+       h2=h*h;\r
+       t2=t*t;\r
+       return 4.76111e-9*h2*t2-3.96956e-7*h2*t+0.0000408889*h2-1.07132e-6*h*t2+0.000115968*h*t-0.0101333*h+0.000163806*t2-0.0241179*t+1.80591;\r
+}\r
+\r
+double R0;\r
+uint16_t mr;\r
+uint8_t startup=10;\r
+double ip;\r
+\r
+\r
+int testSW(void) {\r
+       uint8_t r;\r
+       DDRB&=~(1<<PORTB0);  //Eingang\r
+        __asm__ __volatile__ ("nop"); \r
+        PORTB|=(1<<PORTB0); //Pullup\r
+        __asm__ __volatile__ ("nop"); \r
+        __asm__ __volatile__ ("nop"); \r
+        __asm__ __volatile__ ("nop"); \r
+        __asm__ __volatile__ ("nop"); \r
+        __asm__ __volatile__ ("nop"); \r
+        r=PINB&(1<<PORTB0);\r
+        __asm__ __volatile__ ("nop"); \r
+        PORTB&=~(1<<PORTB0); \r
+        __asm__ __volatile__ ("nop"); \r
+       DDRB|=(1<<PORTB0);  //Eingang\r
+       return (r==0);  //Offen mal HIH4030\r
+        \r
+        \r
+}\r
+\r
+#define EEPROM_R0 0\r
+#define EEPROM_R0d 2\r
+#define EEPROM_R0w 4\r
+#define EEPROM_dol 6\r
+\r
+\r
+uint16_t readEEPROM(uint8_t addr,uint16_t def) {\r
+       uint16_t hr;\r
+       while(EECR & (1<<EEPE));\r
+       EEARL=addr+1;\r
+       EECR |= (1<<EERE);\r
+       hr=EEDR;\r
+       if (hr!=0xFF) {\r
+               hr=hr<<8;\r
+               while(EECR & (1<<EEPE));\r
+               EEARL=addr;\r
+               EECR |= (1<<EERE);\r
+               hr|=EEDR;\r
+               return hr;\r
+       }\r
+       return def;\r
+}\r
+\r
+void writeEEPROM(uint8_t addr,uint16_t val) {\r
+       while(EECR & (1<<EEPE));\r
+       EECR = (0<<EEPM1)|(0<<EEPM0);\r
+       EEARL = addr;\r
+       EEDR = val&0xFF;\r
+       EECR |= (1<<EEMPE);\r
+       EECR |= (1<<EEPE);\r
+       while(EECR & (1<<EEPE));\r
+       EECR = (0<<EEPM1)|(0<<EEPM0);\r
+       EEARL = addr+1;\r
+       EEDR = val>>8;\r
+       EECR |= (1<<EEMPE);\r
+       EECR |= (1<<EEPE);\r
+}\r
+\r
+int main(void){\r
+       PORTA=0xFF;\r
+       PORTB=0xFF-(1<<PORTB0); //Schalter kann gegen Masse sein und zieht dann immer Strom\r
+       DDRB|=(1<<PORTB0); //Als Ausgang und 0\r
+       OWINIT();\r
+       DDRB|=(1<<PINB1);//Ausgang und 1\r
+       DDRA|=(1<<PINA0);\r
+       \r
+       WDTCSR |= ((1<<WDCE) );   // Enable the WD Change Bit//| (1<<WDE)\r
+       WDTCSR |=   (1<<WDIE) |              // Enable WDT Interrupt\r
+       //(1<<WDP0) |(1<<WDP2) | (1<<WDP1);    // Set Timeout to ~2 seconds\r
+       (1<<WDP3) | (1<<WDP0);    // Set Timeout to ~8 seconds\r
+\r
+       MCUSR=0;\r
+\r
+       ADMUX=0b00001110 //ADC1 +   ADC3 -\r
+       ADCSRA = (1<<ADEN)|\r
+\r
+       pack1.temp=0x0550;\r
+       pack1.config=0x7F;\r
+       pack1.TH=75;\r
+       pack1.TL=70;\r
+       pack1.rrFF=0xFF;\r
+       pack1.rr00=0;\r
+       pack1.rr10=0x10;\r
+\r
+       pack2.cmode=0;\r
+       pack2.R0=readEEPROM(EEPROM_R0,1);\r
+       R0=pack2.R0/100.0;\r
+               \r
+       pack2.r_day_max=readEEPROM(EEPROM_R0d,1);\r
+       pack2.r_week_max=readEEPROM(EEPROM_R0w,1);\r
+       pack2.tol_d=readEEPROM(EEPROM_dol,0); \r
+       pack2.tol_s8=0;  //Tag faengt mit Einschalten an\r
+       for(uint8_t i=0;i<7;i++) {\r
+               weekmaxarr[i]=pack2.r_week_max;\r
+       }\r
+\r
+       if (testSW()) {\r
+               config_info2[5]=8;\r
+       }else{\r
+               config_info2[5]=7;\r
+       }\r
+\r
+       USI_TWI_Master_Initialise();\r
+       \r
+       SHT2x_SoftReset();\r
+       SHT2x_ReadUserRegister(userRegister);\r
+       SHT2x_WriteUserRegister(userRegister); //write changed user reg\r
+       gcontrol=1;\r
+       sei();\r
+       //DDRB|=(1<<PINB1);\r
+    while(1)   {\r
+               if (pack1.config==0x1F) {\r
+                       pack1.config=0x7F;\r
+                       R0=1;\r
+                       pack2.R0=0;\r
+                       writeEEPROM(EEPROM_R0,0);\r
+               } \r
+               if (pack1.config==0x05) {\r
+                       pack1.config=0x7F;                              \r
+                       pack2.r_day_max=1;\r
+                       pack2.r_week_max=1;\r
+                       pack2.tol_d=0;\r
+                       pack2.tol_s8=0;  //Tag faengt mit Einschalten an        \r
+                       R0=1;   \r
+                       writeEEPROM(EEPROM_R0,0xFF);\r
+                       writeEEPROM(EEPROM_R0d,0xFF);  //Maximum des Tages\r
+                       writeEEPROM(EEPROM_R0w,0xFF); //Maximum der Letzten 7 Tage\r
+                       writeEEPROM(EEPROM_dol,0xFF); //Anzahl der Betriebstage         \r
+                       for(uint8_t i=0;i<7;i++) {\r
+                               weekmaxarr[i]=1;\r
+                       }                               \r
+               } \r
+               if (wdcounter>0) {\r
+                       pack2.tol_s8++;\r
+                       if (pack2.tol_s8>(10000))  {//10800 ist theortisch der Tag aber meistens zu lang\r
+                               pack2.tol_s8=0;\r
+                               pack2.tol_d++;  //rund 180 Jahre :-)\r
+                               pack2.r_week_max=0;\r
+                               weekmaxarr[7]=pack2.r_day_max;\r
+                               for(uint8_t i=0;i<7;i++) {\r
+                                       weekmaxarr[i]=weekmaxarr[i+1];\r
+                                       //maximum of week\r
+                                       if (weekmaxarr[i]>pack2.r_week_max) pack2.r_week_max=weekmaxarr[i];\r
+                               }\r
+                               if (pack2.tol_d>7) {\r
+                                       pack2.R0=pack2.r_week_max;\r
+                               } else {\r
+                                       pack2.R0=pack2.r_day_max;\r
+                               }\r
+                               //R0=//R0-0.5*(pack2.R0/100-R0);\r
+                               R0=R0-(R0-pack2.R0/100.0)*0.5   ;\r
+                               pack2.R0=R0*100;\r
+                               writeEEPROM(EEPROM_R0,pack2.R0);\r
+                               writeEEPROM(EEPROM_R0d,pack2.r_day_max);  //Maximum des Tages\r
+                               writeEEPROM(EEPROM_R0w,pack2.r_week_max); //Maximum der Letzten 7 Tage\r
+                               writeEEPROM(EEPROM_dol,pack2.tol_d); //Anzahl der Betriebstage\r
+                               pack2.r_day_max=0;\r
+                       }\r
+                       if (startup!=0) startup--;\r
+                       SHT2x_MeasurePoll(HUMIDITY, &sRH);\r
+                       // --- measure temperature with "Polling Mode" (no hold master) ---\r
+                       SHT2x_MeasurePoll(TEMP, &sT);\r
+                       //-- calculate humidity and temperature --\r
+                       temperatureC = SHT2x_CalcTemperatureC(sT);\r
+                       humidityRH = SHT2x_CalcRH(sRH);\r
+                       ip=interp(temperatureC,humidityRH);\r
+                       pack2.ip=ip*1000;\r
+                       humidityRH=calibr_hum(temperatureC,-0.2,humidityRH)*10.0;\r
+                       //humidityRH=humidityRH*10.0;\r
+                       temperatureC =temperatureC *10.0-2;\r
+\r
+\r
+                       if (testSW()) {\r
+                                am2302_hum= humidityRH*10.0;\r
+                                am2302_temp=temperatureC*25.6;\r
+                                //am2302_temp=am2302_temp-45;\r
+                                config_info2[5]=8;     \r
+                       }else{\r
+                               hhum=(1.0546-0.000216*temperatureC)*(humidityRH);\r
+                               //am2302_hum=0.318*hhum +76.0;\r
+                               am2302_hum=0.31*hhum +80;\r
+                               am2302_temp=temperatureC*25.6;\r
+                               config_info2[5]=7;\r
+                       }\r
+                       //PORTB&=~(1<<PINB1);\r
+                       mr=0;\r
+//Kritische Sektion !___Ein Breakpoint in dieser Section kann den TGS8100 zerstoeren!___________________________\r
+                       PORTB&=~(1<<PINB1); //Auf 0 Ziehen\r
+                       _delay_us(150);\r
+                       _delay_us(150);\r
+                       PORTB|=(1<<PINB1);\r
+//ENDE Kritische Sektion !______________________________\r
+                       //l=mr/2.0*2.048/4096; \r
+                       // l maximal 2  mr max 4096  //mr 2V=8000 \r
+                       \r
+                       if (pack2.cmode) { //cmode=0 V 0..2 V cmode=1 V 1.5..3.5V\r
+                               //l+=1.5; //Spannung real\r
+                               mr+=6000;\r
+                       } \r
+                       //if (l>1.8) {\r
+                       if (mr>7200) {                          \r
+                               if (pack2.cmode==0) {\r
+//                                     MAX1164x_config(MAX1164x_S_SEL2|MAX1164x_S_SEL0,CH0_CH1);\r
+                                       pack2.cmode=1;\r
+                               }\r
+                       }\r
+                       //if (l<1.6) {\r
+                       if (mr<6400) {  \r
+                               if (pack2.cmode==1) {\r
+       //                              MAX1164x_config(MAX1164x_S_SEL2|MAX1164x_S_SEL0,CH0_M);\r
+                                       pack2.cmode=0;\r
+                               }\r
+                               \r
+                               \r
+                       }\r
+                       pack2.VS=mr*5/2;\r
+                       l=mr/4000.0;\r
+                       l=( 3/l- 1) *30;\r
+                       pack2.current=l*100;\r
+                       \r
+                       l=l/ip;\r
+                       \r
+                       if (startup==0){\r
+                               if (l>R0) {\r
+                                       R0=l;\r
+                                       pack2.R0=R0*100;\r
+                                       writeEEPROM(EEPROM_R0,pack2.R0);\r
+\r
+                               }\r
+                               if (l*100>pack2.r_day_max) {\r
+                                       pack2.r_day_max=l*100;\r
+                               }\r
+                       } else if (l<R0) l=R0; //negative Werte am Anfang verhintern\r
+                       l=R0/l;\r
+                       l=log(l);\r
+                       l=l*160*4; //fuer DS18B20\r
+                       wdcounter=0;\r
+                       \r
+               }\r
+       \r
+               if (gcontrol==1) {\r
+                       uint16_t w=l;\r
+                       uint8_t t8=w>>4;\r
+                       uint8_t af=0;\r
+                       if (t8>pack1.TH) af=1;\r
+                       if (t8<=pack1.TL) af=1; \r
+                       cli();\r
+                       pack1.temp=w;\r
+                       //pack.temp++;\r
+                       alarmflag=af;\r
+                       sei();                  \r
+                       EXTERN_SLEEP();         \r
+               }\r
+               if ((gcontrol==2)||(gcontrol==3)) {\r
+                       gcontrol=0;\r
+                       \r
+               }\r
+\r
+               \r
+#if  defined(__AVR_ATtiny25__)||defined(__AVR_ATtiny45__)  || defined(__AVR_ATtiny85__)\r
+                       if (((TIMSK & (1<<TOIE0))==0)&& (mode==0))\r
+#endif                 \r
+#if  defined(__AVR_ATtiny24__)||defined(__AVR_ATtiny44__)  || defined(__AVR_ATtiny84__) ||defined(__AVR_ATtiny24A__)||defined(__AVR_ATtiny44A__)  || defined(__AVR_ATtiny84A__)\r
+                       if (((TIMSK0 & (1<<TOIE0))==0)&& (mode==0))\r
+#endif\r
+                         {\r
+\r
+                       MCUCR|=(1<<SE)|(1<<SM1);\r
+                       MCUCR&=~(1<<ISC01);\r
+               } else {\r
+                       MCUCR|=(1<<SE);\r
+                       MCUCR&=~(1<<SM1);\r
+               }\r
+               asm("SLEEP");\r
+   }\r
+\r
+\r
+}\r
index 8e04299..f097198 100644 (file)
@@ -1,5 +1,4 @@
-       \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -52,8 +51,8 @@ extern void EXTERN_SLEEP(void);
 \r
 volatile uint8_t owid1[8]={0x28, 0xA3, 0xD9, 0x84, 0x00, 0x16, 0x05, 0x18};/**/\r
 volatile uint8_t owid2[8]={0x26, 0xA3, 0xD9, 0x84, 0x00, 0x16, 0x05, 0x67};/**/\r
-volatile uint8_t config_info1[16]={0x08,0x01, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};       \r
-volatile uint8_t config_info2[16]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x07,0x08, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};       \r
+volatile uint8_t config_info1[26]={0x08,0x01, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x02,17,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};      \r
+volatile uint8_t config_info2[26]={0x01,0x06, 0x05,0x08, 0x04,0x07, 11,0x08, 0x02,0x07,0x00,0x07,17,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};        \r
        \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index fb51cbe..d81cd7a 100644 (file)
@@ -2,7 +2,7 @@
 <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <SchemaVersion>2.0</SchemaVersion>\r
-    <ProjectVersion>6.2</ProjectVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
     <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>\r
     <ProjectGuid>{26106a5a-6618-4774-943f-65c46ddb610b}</ProjectGuid>\r
     <avrdevice>ATtiny84A</avrdevice>\r
   <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
     <ToolchainSettings>\r
       <AvrGcc>\r
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
-        <avrgcc.compiler.symbols.DefSymbols>\r
-          <ListValues>\r
-            <Value>NDEBUG</Value>\r
-          </ListValues>\r
-        </avrgcc.compiler.symbols.DefSymbols>\r
-        <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>\r
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
-        <avrgcc.linker.libraries.Libraries>\r
-          <ListValues>\r
-            <Value>libm</Value>\r
-          </ListValues>\r
-        </avrgcc.linker.libraries.Libraries>\r
-      </AvrGcc>\r
+  <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+  <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+  <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+  <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+  <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+  <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+  <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+  <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+  <avrgcc.compiler.symbols.DefSymbols>\r
+    <ListValues>\r
+      <Value>NDEBUG</Value>\r
+    </ListValues>\r
+  </avrgcc.compiler.symbols.DefSymbols>\r
+  <avrgcc.compiler.directories.IncludePaths>\r
+    <ListValues>\r
+      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+    </ListValues>\r
+  </avrgcc.compiler.directories.IncludePaths>\r
+  <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>\r
+  <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+  <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+  <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+  <avrgcc.linker.libraries.Libraries>\r
+    <ListValues>\r
+      <Value>libm</Value>\r
+    </ListValues>\r
+  </avrgcc.linker.libraries.Libraries>\r
+  <avrgcc.assembler.general.IncludePaths>\r
+    <ListValues>\r
+      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+    </ListValues>\r
+  </avrgcc.assembler.general.IncludePaths>\r
+</AvrGcc>\r
     </ToolchainSettings>\r
   </PropertyGroup>\r
   <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
     <ToolchainSettings>\r
       <AvrGcc>\r
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
-        <avrgcc.compiler.symbols.DefSymbols>\r
-          <ListValues>\r
-            <Value>DEBUG</Value>\r
-          </ListValues>\r
-        </avrgcc.compiler.symbols.DefSymbols>\r
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
-        <avrgcc.linker.libraries.Libraries>\r
-          <ListValues>\r
-            <Value>libm</Value>\r
-          </ListValues>\r
-        </avrgcc.linker.libraries.Libraries>\r
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
-      </AvrGcc>\r
+  <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+  <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+  <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+  <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+  <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+  <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+  <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+  <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+  <avrgcc.compiler.symbols.DefSymbols>\r
+    <ListValues>\r
+      <Value>DEBUG</Value>\r
+    </ListValues>\r
+  </avrgcc.compiler.symbols.DefSymbols>\r
+  <avrgcc.compiler.directories.IncludePaths>\r
+    <ListValues>\r
+      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+    </ListValues>\r
+  </avrgcc.compiler.directories.IncludePaths>\r
+  <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+  <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+  <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+  <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+  <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+  <avrgcc.linker.libraries.Libraries>\r
+    <ListValues>\r
+      <Value>libm</Value>\r
+    </ListValues>\r
+  </avrgcc.linker.libraries.Libraries>\r
+  <avrgcc.assembler.general.IncludePaths>\r
+    <ListValues>\r
+      <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+    </ListValues>\r
+  </avrgcc.assembler.general.IncludePaths>\r
+  <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+</AvrGcc>\r
     </ToolchainSettings>\r
   </PropertyGroup>\r
   <ItemGroup>\r
diff --git a/DS2423 - Autosave/DS2423.atsln b/DS2423 - Autosave/DS2423.atsln
new file mode 100644 (file)
index 0000000..55ec947
--- /dev/null
@@ -0,0 +1,20 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Atmel Studio Solution File, Format Version 11.00\r
+Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "DS2423", "DS2423.cproj", "{26106A5A-6618-4774-943F-65C46DDB610B}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|AVR = Debug|AVR\r
+               Release|AVR = Release|AVR\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {26106A5A-6618-4774-943F-65C46DDB610B}.Debug|AVR.ActiveCfg = Debug|AVR\r
+               {26106A5A-6618-4774-943F-65C46DDB610B}.Debug|AVR.Build.0 = Debug|AVR\r
+               {26106A5A-6618-4774-943F-65C46DDB610B}.Release|AVR.ActiveCfg = Release|AVR\r
+               {26106A5A-6618-4774-943F-65C46DDB610B}.Release|AVR.Build.0 = Release|AVR\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/DS2423 - Autosave/DS2423.c b/DS2423 - Autosave/DS2423.c
new file mode 100644 (file)
index 0000000..067b602
--- /dev/null
@@ -0,0 +1,250 @@
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
+// All rights reserved.\r
+//\r
+// Redistribution and use in source and binary forms, with or without\r
+// modification, are permitted provided that the following conditions are\r
+// met:\r
+//\r
+//  * Redistributions of source code must retain the above copyright\r
+//    notice, this list of conditions and the following disclaimer.\r
+//  * Redistributions in binary form must reproduce the above copyright\r
+//    notice, this list of conditions and the following disclaimer in the\r
+//    documentation and/or other materials provided with the\r
+//    distribution.\r
+//  * All advertising materials mentioning features or use of this\r
+//    software must display the following acknowledgement: This product\r
+//    includes software developed by tm3d.de and its contributors.\r
+//  * Neither the name of tm3d.de nor the names of its contributors may\r
+//    be used to endorse or promote products derived from this software\r
+//    without specific prior written permission.\r
+//\r
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+#define _CPULLUP_\r
+\r
+#define F_CPU 8000000UL\r
+#include <avr/io.h>\r
+#include <avr/interrupt.h>\r
+#include <util/delay.h>\r
+#include <avr/wdt.h>\r
+#include <avr/sleep.h>\r
+\r
+\r
+\r
+extern void OWINIT();\r
+\r
+uint8_t owid[8]={0x1D, 0xA2, 0xD9, 0x84, 0x00, 0x26, 0x02, 0x5C};/**/\r
+uint8_t config_info[26]={9,13,9,13,9,13,9,13,0x02,19,19,19,19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //+2 for CRC\r
+\r
+       \r
+\r
+extern uint8_t mode;\r
+extern uint8_t gcontrol;\r
+extern uint8_t reset_indicator;\r
+\r
+\r
+\r
+\r
+\r
+\r
+typedef union {\r
+       volatile uint8_t bytes[45];\r
+       struct {\r
+               uint16_t addr;\r
+               uint8_t status;\r
+               uint8_t scratch[32];//3\r
+               uint32_t counter;  //35\r
+               uint32_t zero;   //39\r
+               uint16_t crc;  //43\r
+       };\r
+} counterpack_t;\r
+counterpack_t pack;\r
+\r
+volatile uint8_t lastcps;\r
+typedef union {\r
+       uint32_t c32[4];\r
+       uint8_t c8[16];\r
+} counters_t;\r
+\r
+volatile counters_t counters;\r
+\r
+volatile uint8_t istat;\r
+volatile uint8_t changefromeeprom;\r
+\r
+\r
+\r
+#if  defined(__AVR_ATtiny24__)||defined(__AVR_ATtiny44__)  || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny24A__)||defined(__AVR_ATtiny44A__)  || defined(__AVR_ATtiny84A__)\r
+#define PCINT_VECTOR PCINT0_vect\r
+#define PIN_REG PINA\r
+#define PIN_DDR DDRA\r
+#define PIN_CH2 (1<<PINA4)\r
+#define PIN_CH3 (1<<PINA5)\r
+#define PIN_CH0 (1<<PINA6)\r
+#define PIN_CH1 (1<<PINA7)\r
+#define PORT_EE PINA //WARNING have to be the same PORT like PINREG because of istat\r
+#define PIN_EE (1<<PINA0)\r
+#define TEST_TIMER  ((TIMSK0 & (1<<TOIE0))==0)\r
+\r
+#endif\r
+\r
+\r
+ISR(PCINT0_vect) {\r
+       if (((PIN_REG&PIN_CH2)==0)&&((istat&PIN_CH2)==PIN_CH2)) {       counters.c32[2]++;      }\r
+       if (((PIN_REG&PIN_CH3)==0)&&((istat&PIN_CH3)==PIN_CH3)) {       counters.c32[3]++;      }\r
+       if (((PIN_REG&PIN_CH0)==0)&&((istat&PIN_CH0)==PIN_CH0)) {       counters.c32[0]++;      }\r
+       if (((PIN_REG&PIN_CH1)==0)&&((istat&PIN_CH1)==PIN_CH1)) {       counters.c32[1]++;      }\r
+       istat=PIN_REG;\r
+       changefromeeprom=1;\r
+}\r
+\r
+\r
+ISR(ANA_COMP_vect) {\r
+       if (changefromeeprom==0) return;\r
+       if ((ACSR&(1<<ACO))!=0) {\r
+               _delay_ms(5);\r
+               if ((ACSR&(1<<ACO))!=0) {\r
+                       CLKPR=0x80;//Switch to 4 MHz \r
+                       CLKPR=01;                       \r
+                       \r
+                       PORTB|=(1<<PINB1);\r
+                       EEARH=0;\r
+                       for(uint8_t i=0;i<16;i++) {\r
+                               uint8_t addr=i^0x0C;\r
+                               while(EECR & (1<<EEPE));\r
+                               EECR = (0<<EEPM1)|(0<<EEPM0);\r
+                               EEARL = i;\r
+                               EEDR = counters.c8[addr];\r
+                               EECR |= (1<<EEMPE);\r
+                               EECR |= (1<<EEPE);\r
+                       }\r
+                       changefromeeprom=0;\r
+                       PORTB&=~(1<<PINB1);\r
+                       CLKPR=0x80;\r
+                       CLKPR=0;\r
+                       GIFR|=(1<<INTF0);\r
+               }\r
+       }\r
+       \r
+}\r
+\r
+int testSW(void) {\r
+       uint8_t r;\r
+       DDRB&=~(1<<PORTB0);  //Eingang\r
+       __asm__ __volatile__ ("nop");\r
+       PORTB|=(1<<PORTB0); //Pullup\r
+       __asm__ __volatile__ ("nop");\r
+       __asm__ __volatile__ ("nop");\r
+       __asm__ __volatile__ ("nop");\r
+       __asm__ __volatile__ ("nop");\r
+       __asm__ __volatile__ ("nop");\r
+       r=PINB&(1<<PORTB0);\r
+       __asm__ __volatile__ ("nop");\r
+       PORTB&=~(1<<PORTB0);\r
+       __asm__ __volatile__ ("nop");\r
+       DDRB|=(1<<PORTB0);  //Eingang\r
+       return (r==0);\r
+       \r
+       \r
+}\r
+\r
+\r
+int main(void){\r
+    PRR|=(1<<PRUSI)|(1<<PRADC);  //Switch off usi and adc for save Power\r
+       OWINIT();\r
+       \r
+       pack.zero=0;\r
+       counters.c32[0]=0;\r
+       counters.c32[2]=0;\r
+       counters.c32[1]=0;\r
+       counters.c32[3]=0;\r
+       changefromeeprom=1;\r
+       ACSR|=(1<<ACD);  //Disable Comparator\r
+       ADCSRB|=(1<<ACME); //Disable Analog multiplexer\r
+       MCUCR &=~(1<<PUD); //All Pins Pullup...\r
+       \r
+#if  defined(__AVR_ATtiny24__)||defined(__AVR_ATtiny44__)  || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny24A__)||defined(__AVR_ATtiny44A__)  || defined(__AVR_ATtiny84A__)\r
+\r
+       PORTB|=0xFF-(1<<PINB2); //Make PullUp an all Pins but not OW_PIN\r
+       PORTA|=0xFF;\r
+       PORTA&=~(1<<PINA2); //AIN1 \r
+#ifndef _CPULLUP_\r
+       PORTA&=~((1<<PINA4)|(1<<PINA5));\r
+       PORTA&=~((1<<PINA6)|(1<<PINA7));\r
+ #endif\r
+\r
+       GIMSK|=(1<<PCIE0);\r
+       PCMSK0=(1<<PCINT4)|(1<<PCINT5)\r
+               |(1<<PCINT6)|(1<<PCINT7);\r
+                       \r
+       \r
+       istat=PINB;\r
+#endif\r
+\r
+       EEARH=0;\r
+               \r
+       uint8_t addr;\r
+       \r
+       if (testSW()) {  //Jumper gesetzt ->Ruecksetzen\r
+               for(uint8_t i=0;i<16;i++) {\r
+                       while(EECR & (1<<EEPE));\r
+                       EECR = (0<<EEPM1)|(0<<EEPM0);\r
+                       EEARL = i;\r
+                       EEDR = 0;\r
+                       EECR |= (1<<EEMPE);\r
+                       EECR |= (1<<EEPE);\r
+               }       \r
+       }       \r
+       \r
+       \r
+       for(uint8_t i=0;i<16;i++) {\r
+               addr=i^0x0C;\r
+               while(EECR & (1<<EEPE));   \r
+               EEARL=i;\r
+               EECR |= (1<<EERE);\r
+               counters.c8[addr]=EEDR;\r
+       }\r
+       changefromeeprom=0;  //Daten neu eingelesen\r
+       for (uint8_t i=0;i<4;i++) {\r
+               if (counters.c32[i]==0xFFFFFFFF) {\r
+                       counters.c32[i]=0;\r
+                       changefromeeprom=1;  //Daten geaendert\r
+               }\r
+                       //counters.c32[i]=0;\r
+       }\r
+       \r
+\r
+               /*for(uint8_t i=0;i<16;i++) {\r
+                       while(EECR & (1<<EEPE));\r
+                       EECR = (1<<EEPM0);\r
+                       EEARL = i;\r
+                       EECR |= (1<<EEMPE);\r
+                       EECR |= (1<<EEPE);\r
+               }*/\r
+       \r
+   \r
+\r
+\r
+       DIDR0|=(1<<ADC2D)|(1<<ADC1D); // Disable Digital input on Analog AIN0/AIN1  (PINA1 / PINA2)\r
+       ACSR&=~(1<<ACD);\r
+       ACSR|=(1<<ACIE)|(1<<ACIS1)|(1<<ACIS0)|(1<<ACBG); //Enabble comperator interrupt Rising edge....(1<<ACIS0)\r
+\r
+       sei();\r
+       DDRB|=(1<<PINB1);\r
+       PORTB&=~(1<<PINB1);\r
+    while(1)   {\r
+               \r
+               MCUCR|=(1<<SE);\r
+               MCUCR&=~(1<<SM1); \r
+               asm("SLEEP");\r
+   }\r
+}
\ No newline at end of file
diff --git a/DS2423 - Autosave/DS2423.cproj b/DS2423 - Autosave/DS2423.cproj
new file mode 100644 (file)
index 0000000..be31af6
--- /dev/null
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
+    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>\r
+    <ProjectGuid>{26106a5a-6618-4774-943f-65c46ddb610b}</ProjectGuid>\r
+    <avrdevice>ATtiny84A</avrdevice>\r
+    <avrdeviceseries>none</avrdeviceseries>\r
+    <OutputType>Executable</OutputType>\r
+    <Language>C</Language>\r
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>\r
+    <OutputFileExtension>.elf</OutputFileExtension>\r
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>\r
+    <AssemblyName>DS2423</AssemblyName>\r
+    <Name>DS2423</Name>\r
+    <RootNamespace>DS2423</RootNamespace>\r
+    <ToolchainFlavour>Native</ToolchainFlavour>\r
+    <KeepTimersRunning>true</KeepTimersRunning>\r
+    <OverrideVtor>false</OverrideVtor>\r
+    <CacheFlash>true</CacheFlash>\r
+    <ProgFlashFromRam>true</ProgFlashFromRam>\r
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>\r
+    <UncachedRange />\r
+    <preserveEEPROM>true</preserveEEPROM>\r
+    <OverrideVtorValue>exception_table</OverrideVtorValue>\r
+    <BootSegment>2</BootSegment>\r
+    <eraseonlaunchrule>1</eraseonlaunchrule>\r
+    <AsfFrameworkConfig>\r
+      <framework-data>\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.28.1" />\r
+        </dependencies>\r
+      </framework-data>\r
+    </AsfFrameworkConfig>\r
+    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
+    <com_atmel_avrdbg_tool_atmelice>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+        </InterfaceProperties>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
+      <ToolNumber>J41800000789</ToolNumber>\r
+      <ToolName>Atmel-ICE</ToolName>\r
+    </com_atmel_avrdbg_tool_atmelice>\r
+    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+    <ExternalProgrammingToolCommand />\r
+    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>\r
+    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.general.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.assembler.general.IncludePaths>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.general.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.assembler.general.IncludePaths>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Compile Include="..\common\OWDS2423.S">\r
+      <SubType>compile</SubType>\r
+      <Link>OWDS2423.S</Link>\r
+    </Compile>\r
+    <Compile Include="DS2423.c">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
+</Project>
\ No newline at end of file
index cdca3e4..ccc2d30 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -54,7 +54,7 @@
 extern void OWINIT();\r
 \r
 uint8_t owid[8]={0x1D, 0xA2, 0xD9, 0x84, 0x00, 0x26, 0x02, 0x5C};/**/\r
-uint8_t config_info[18]={9,13,9,13,9,13,9,13,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //+2 for CRC\r
+uint8_t config_info[26]={9,13,9,13,9,13,9,13,0x02,19,19,19,19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}; //+2 for CRC\r
 \r
        \r
 \r
index d3aa7b4..13dccc2 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -50,7 +50,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x1D, 0xA2, 0xD9, 0x84, 0x00, 0x26, 0x02, 0x5C};/**/\r
-uint8_t config_info[18]={0x09,0x0D,0x09,0x0D,0x01,0x08,0x02,0x08,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x00,0x00,0x00,0x00,0x01,0x08,0x02,0x08,0x02,0x00,0x00,14,14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
        \r
 \r
index b1c6332..13b33dc 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2016, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -45,7 +45,7 @@
 extern void OWINIT();\r
 \r
 uint8_t owid[8]={0x1D, 0xA2, 0xD9, 0x84, 0x00, 0x26, 0x02, 0x5C};/**/\r
-uint8_t config_info[18]={0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={9,13,9,13,9,13,9,13,0x02,19,19,19,19,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
        \r
 \r
index 8958294..7adde5a 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectVersion>7.0</ProjectVersion>
-    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
-    <ProjectGuid>{26106a5a-6618-4774-943f-65c46ddb610b}</ProjectGuid>
-    <avrdevice>ATtiny84A</avrdevice>
-    <avrdeviceseries>none</avrdeviceseries>
-    <OutputType>Executable</OutputType>
-    <Language>C</Language>
-    <OutputFileName>$(MSBuildProjectName)</OutputFileName>
-    <OutputFileExtension>.elf</OutputFileExtension>
-    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
-    <AssemblyName>DS2423</AssemblyName>
-    <Name>DS2423</Name>
-    <RootNamespace>DS2423</RootNamespace>
-    <ToolchainFlavour>Native</ToolchainFlavour>
-    <KeepTimersRunning>true</KeepTimersRunning>
-    <OverrideVtor>false</OverrideVtor>
-    <CacheFlash>true</CacheFlash>
-    <ProgFlashFromRam>true</ProgFlashFromRam>
-    <RamSnippetAddress>0x20000000</RamSnippetAddress>
-    <UncachedRange />
-    <preserveEEPROM>true</preserveEEPROM>
-    <OverrideVtorValue>exception_table</OverrideVtorValue>
-    <BootSegment>2</BootSegment>
-    <eraseonlaunchrule>1</eraseonlaunchrule>
-    <AsfFrameworkConfig>
-      <framework-data xmlns="">
-        <options />
-        <configurations />
-        <files />
-        <documentation help="" />
-        <offline-documentation help="" />
-        <dependencies>
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />
-        </dependencies>
-      </framework-data>
-    </AsfFrameworkConfig>
-    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
-    <com_atmel_avrdbg_tool_atmelice>
-      <ToolOptions>
-        <InterfaceProperties>
-          <IspClock>125000</IspClock>
-        </InterfaceProperties>
-        <InterfaceName>debugWIRE</InterfaceName>
-      </ToolOptions>
-      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
-      <ToolNumber>J41800000789</ToolNumber>
-      <ToolName>Atmel-ICE</ToolName>
-    </com_atmel_avrdbg_tool_atmelice>
-    <avrtoolinterface>debugWIRE</avrtoolinterface>
-    <ExternalProgrammingToolCommand />
-    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>
-    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>
-    <avrtoolinterfaceclock>125000</avrtoolinterfaceclock>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>DEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-        <avrgcc.assembler.general.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>
-          </ListValues>
-        </avrgcc.assembler.general.IncludePaths>
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>DEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-        <avrgcc.assembler.general.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>
-          </ListValues>
-        </avrgcc.assembler.general.IncludePaths>
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="..\common\OWDS2423.S">
-      <SubType>compile</SubType>
-      <Link>OWDS2423.S</Link>
-    </Compile>
-    <Compile Include="DS2423.c">
-      <SubType>compile</SubType>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
+    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>\r
+    <ProjectGuid>{26106a5a-6618-4774-943f-65c46ddb610b}</ProjectGuid>\r
+    <avrdevice>ATtiny84A</avrdevice>\r
+    <avrdeviceseries>none</avrdeviceseries>\r
+    <OutputType>Executable</OutputType>\r
+    <Language>C</Language>\r
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>\r
+    <OutputFileExtension>.elf</OutputFileExtension>\r
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>\r
+    <AssemblyName>DS2423</AssemblyName>\r
+    <Name>DS2423</Name>\r
+    <RootNamespace>DS2423</RootNamespace>\r
+    <ToolchainFlavour>Native</ToolchainFlavour>\r
+    <KeepTimersRunning>true</KeepTimersRunning>\r
+    <OverrideVtor>false</OverrideVtor>\r
+    <CacheFlash>true</CacheFlash>\r
+    <ProgFlashFromRam>true</ProgFlashFromRam>\r
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>\r
+    <UncachedRange />\r
+    <preserveEEPROM>true</preserveEEPROM>\r
+    <OverrideVtorValue>exception_table</OverrideVtorValue>\r
+    <BootSegment>2</BootSegment>\r
+    <eraseonlaunchrule>1</eraseonlaunchrule>\r
+    <AsfFrameworkConfig>\r
+      <framework-data xmlns="">\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.22.0" />\r
+        </dependencies>\r
+      </framework-data>\r
+    </AsfFrameworkConfig>\r
+    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
+    <com_atmel_avrdbg_tool_atmelice>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+          <IspClock>125000</IspClock>\r
+        </InterfaceProperties>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
+      <ToolNumber>J41800000789</ToolNumber>\r
+      <ToolName>Atmel-ICE</ToolName>\r
+    </com_atmel_avrdbg_tool_atmelice>\r
+    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+    <ExternalProgrammingToolCommand />\r
+    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>\r
+    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
+    <avrtoolinterfaceclock>125000</avrtoolinterfaceclock>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.general.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.assembler.general.IncludePaths>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.general.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.79\include</Value>\r
+          </ListValues>\r
+        </avrgcc.assembler.general.IncludePaths>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Compile Include="..\common\OWDS2423.S">\r
+      <SubType>compile</SubType>\r
+      <Link>OWDS2423.S</Link>\r
+    </Compile>\r
+    <Compile Include="DS2423.c">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
 </Project>
\ No newline at end of file
index d2fbef2..d928313 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -44,7 +44,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x26, 0xA2, 0xD9, 0x84, 0xDD, 0xDD, 0x05, 0xCE};/**/\r
-uint8_t config_info[16]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x02,0x09,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 \r
 \r
index a41484a..63466f6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -46,8 +46,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x26, 0xA2, 0xD9, 0x84, 0x00, 0x00, 0x05, 0x16};/**/\r
-uint8_t config_info[16]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
-//uint8_t config_info[16]={0x01,0x06, 0x05,0x08, 0x04,0x08, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x02,11,0x00,11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
        \r
 \r
 extern uint8_t mode;\r
@@ -87,7 +86,7 @@ volatile uint16_t am2302_hum;
 \r
 uint8_t userRegister[1];\r
 int16_t sRH,sT;\r
-volatile double temperatureC,humidityRH;\r
+double temperatureC,humidityRH;\r
 volatile double l;\r
 \r
 #if  defined(__AVR_ATtiny24__)||defined(__AVR_ATtiny44__)  || defined(__AVR_ATtiny84__) || defined(__AVR_ATtiny24A__)||defined(__AVR_ATtiny44A__)  || defined(__AVR_ATtiny84A__)\r
index cfd65db..9bf4659 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectVersion>7.0</ProjectVersion>
-    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
-    <ProjectGuid>{91468d4f-8ae2-4c59-8a35-549c49e00934}</ProjectGuid>
-    <avrdevice>ATtiny84A</avrdevice>
-    <avrdeviceseries>none</avrdeviceseries>
-    <OutputType>Executable</OutputType>
-    <Language>C</Language>
-    <OutputFileName>$(MSBuildProjectName)</OutputFileName>
-    <OutputFileExtension>.elf</OutputFileExtension>
-    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
-    <AssemblyName>DS2438_SHT2X</AssemblyName>
-    <Name>DS2438_HDC1080</Name>
-    <RootNamespace>DS2438_SHT2X</RootNamespace>
-    <ToolchainFlavour>Native</ToolchainFlavour>
-    <KeepTimersRunning>true</KeepTimersRunning>
-    <OverrideVtor>false</OverrideVtor>
-    <CacheFlash>true</CacheFlash>
-    <ProgFlashFromRam>true</ProgFlashFromRam>
-    <RamSnippetAddress>0x20000000</RamSnippetAddress>
-    <UncachedRange />
-    <preserveEEPROM>true</preserveEEPROM>
-    <OverrideVtorValue>exception_table</OverrideVtorValue>
-    <BootSegment>2</BootSegment>
-    <eraseonlaunchrule>1</eraseonlaunchrule>
-    <AsfFrameworkConfig>
-      <framework-data xmlns="">
-        <options />
-        <configurations />
-        <files />
-        <documentation help="" />
-        <offline-documentation help="" />
-        <dependencies>
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.26.0" />
-        </dependencies>
-      </framework-data>
-    </AsfFrameworkConfig>
-    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
-    <com_atmel_avrdbg_tool_atmelice>
-      <ToolOptions>
-        <InterfaceProperties>
-        </InterfaceProperties>
-        <InterfaceName>debugWIRE</InterfaceName>
-      </ToolOptions>
-      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
-      <ToolNumber>J41800000789</ToolNumber>
-      <ToolName>Atmel-ICE</ToolName>
-    </com_atmel_avrdbg_tool_atmelice>
-    <avrtoolinterface>debugWIRE</avrtoolinterface>
-    <ExternalProgrammingToolCommand />
-    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>
-    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>DEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>DEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="..\common\calibr.c">
-      <SubType>compile</SubType>
-      <Link>calibr.c</Link>
-    </Compile>
-    <Compile Include="..\common\I2C\HDC1080.c">
-      <SubType>compile</SubType>
-      <Link>HDC1080.c</Link>
-    </Compile>
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">
-      <SubType>compile</SubType>
-      <Link>USI_TWI_Master.c</Link>
-    </Compile>
-    <Compile Include="D:\oc\dev\owSlave2\common\OWDS2438.S">
-      <SubType>compile</SubType>
-      <Link>OWDS2438.S</Link>
-    </Compile>
-    <Compile Include="DS2438_HDC1080.c">
-      <SubType>compile</SubType>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
+    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>\r
+    <ProjectGuid>{91468d4f-8ae2-4c59-8a35-549c49e00934}</ProjectGuid>\r
+    <avrdevice>ATtiny84A</avrdevice>\r
+    <avrdeviceseries>none</avrdeviceseries>\r
+    <OutputType>Executable</OutputType>\r
+    <Language>C</Language>\r
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>\r
+    <OutputFileExtension>.elf</OutputFileExtension>\r
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>\r
+    <AssemblyName>DS2438_SHT2X</AssemblyName>\r
+    <Name>DS2438_HDC1080</Name>\r
+    <RootNamespace>DS2438_SHT2X</RootNamespace>\r
+    <ToolchainFlavour>Native</ToolchainFlavour>\r
+    <KeepTimersRunning>true</KeepTimersRunning>\r
+    <OverrideVtor>false</OverrideVtor>\r
+    <CacheFlash>true</CacheFlash>\r
+    <ProgFlashFromRam>true</ProgFlashFromRam>\r
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>\r
+    <UncachedRange />\r
+    <preserveEEPROM>true</preserveEEPROM>\r
+    <OverrideVtorValue>exception_table</OverrideVtorValue>\r
+    <BootSegment>2</BootSegment>\r
+    <eraseonlaunchrule>1</eraseonlaunchrule>\r
+    <AsfFrameworkConfig>\r
+      <framework-data xmlns="">\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.26.0" />\r
+        </dependencies>\r
+      </framework-data>\r
+    </AsfFrameworkConfig>\r
+    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
+    <com_atmel_avrdbg_tool_atmelice>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+        </InterfaceProperties>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
+      <ToolNumber>J41800000789</ToolNumber>\r
+      <ToolName>Atmel-ICE</ToolName>\r
+    </com_atmel_avrdbg_tool_atmelice>\r
+    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+    <ExternalProgrammingToolCommand />\r
+    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>\r
+    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Compile Include="..\common\calibr.c">\r
+      <SubType>compile</SubType>\r
+      <Link>calibr.c</Link>\r
+    </Compile>\r
+    <Compile Include="..\common\I2C\HDC1080.c">\r
+      <SubType>compile</SubType>\r
+      <Link>HDC1080.c</Link>\r
+    </Compile>\r
+    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">\r
+      <SubType>compile</SubType>\r
+      <Link>USI_TWI_Master.c</Link>\r
+    </Compile>\r
+    <Compile Include="D:\oc\dev\owSlave2\common\OWDS2438.S">\r
+      <SubType>compile</SubType>\r
+      <Link>OWDS2438.S</Link>\r
+    </Compile>\r
+    <Compile Include="DS2438_HDC1080.c">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
 </Project>
\ No newline at end of file
index 6c59d8c..3887e4c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -46,8 +46,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x26, 0xA2, 0xD9, 0x84, 0x00, 0x00, 0x05, 0x16};/**/\r
-uint8_t config_info[16]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
-//uint8_t config_info[16]={0x01,0x06, 0x05,0x08, 0x04,0x08, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x02,0x10,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
        \r
 \r
 extern uint8_t mode;\r
index eef88e3..eb182ef 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -47,8 +47,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x26, 0xA2, 0xD9, 0x84, 0x00, 0x00, 0x05, 0x16};/**/\r
-uint8_t config_info[16]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
-//uint8_t config_info[16]={0x01,0x06, 0x05,0x08, 0x04,0x08, 0x00,0x00, 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x01,0x06, 0x05,0x08, 0x04,0x07, 0x00,0x00, 0x02,0x07,0x00,0x07,0x00,0x00,0x00,0x00, 0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
        \r
 \r
 extern uint8_t mode;\r
index 6a89067..945ebeb 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -43,7 +43,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[18]={0x06,0x09,0x06,0x09,0x06,0x09,0x06,0x09,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x06,0x09,0x06,0x09,0x06,0x09,0x06,0x09,0x02,20,20,20,20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index 8b3678b..78ab3b0 100644 (file)
@@ -1,5 +1,4 @@
-\r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -45,8 +44,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[18]={0x01,14,0x04,0x08,  0x06,0x09, 0x02,16,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
-\r
+uint8_t config_info[26]={0x01,14,0x04,0x08, 0,0, 0x02,16,0x02,0x07,0x07,0x00,14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 #if (owid>128) \r
 #error "Variable not correct"\r
 #endif\r
index 101ac51..54ca3e6 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
-  <PropertyGroup>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectVersion>7.0</ProjectVersion>
-    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
-    <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>
-    <avrdevice>ATtiny84A</avrdevice>
-    <avrdeviceseries>none</avrdeviceseries>
-    <OutputType>Executable</OutputType>
-    <Language>C</Language>
-    <OutputFileName>$(MSBuildProjectName)</OutputFileName>
-    <OutputFileExtension>.elf</OutputFileExtension>
-    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
-    <AssemblyName>DS2450</AssemblyName>
-    <Name>DS2450_SHT2X_BMP280</Name>
-    <RootNamespace>DS2450</RootNamespace>
-    <ToolchainFlavour>Native</ToolchainFlavour>
-    <KeepTimersRunning>true</KeepTimersRunning>
-    <OverrideVtor>false</OverrideVtor>
-    <CacheFlash>true</CacheFlash>
-    <ProgFlashFromRam>true</ProgFlashFromRam>
-    <RamSnippetAddress>0x20000000</RamSnippetAddress>
-    <UncachedRange />
-    <preserveEEPROM>true</preserveEEPROM>
-    <OverrideVtorValue>exception_table</OverrideVtorValue>
-    <BootSegment>2</BootSegment>
-    <eraseonlaunchrule>1</eraseonlaunchrule>
-    <ExternalProgrammingToolCommand />
-    <AsfFrameworkConfig>
-      <framework-data xmlns="">
-        <options />
-        <configurations />
-        <files />
-        <documentation help="" />
-        <offline-documentation help="" />
-        <dependencies>
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />
-        </dependencies>
-      </framework-data>
-    </AsfFrameworkConfig>
-    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
-    <avrtoolserialnumber>J41800000779</avrtoolserialnumber>
-    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>
-    <com_atmel_avrdbg_tool_atmelice>
-      <ToolOptions>
-        <InterfaceProperties>
-        </InterfaceProperties>
-        <InterfaceName>debugWIRE</InterfaceName>
-      </ToolOptions>
-      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
-      <ToolNumber>J41800000779</ToolNumber>
-      <ToolName>Atmel-ICE</ToolName>
-    </com_atmel_avrdbg_tool_atmelice>
-    <avrtoolinterface>debugWIRE</avrtoolinterface>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>NDEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>DEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\BMP280.c">
-      <SubType>compile</SubType>
-      <Link>BMP280.c</Link>
-    </Compile>
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\SHT2x.c">
-      <SubType>compile</SubType>
-      <Link>SHT2x.c</Link>
-    </Compile>
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">
-      <SubType>compile</SubType>
-      <Link>USI_TWI_Master.c</Link>
-    </Compile>
-    <Compile Include="DS2450_SHT2X_BMP280.c">
-      <SubType>compile</SubType>
-    </Compile>
-    <Compile Include="OWDS2450.S">
-      <SubType>compile</SubType>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">\r
+  <PropertyGroup>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
+    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>\r
+    <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>\r
+    <avrdevice>ATtiny84A</avrdevice>\r
+    <avrdeviceseries>none</avrdeviceseries>\r
+    <OutputType>Executable</OutputType>\r
+    <Language>C</Language>\r
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>\r
+    <OutputFileExtension>.elf</OutputFileExtension>\r
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>\r
+    <AssemblyName>DS2450</AssemblyName>\r
+    <Name>DS2450_SHT2X_BMP280</Name>\r
+    <RootNamespace>DS2450</RootNamespace>\r
+    <ToolchainFlavour>Native</ToolchainFlavour>\r
+    <KeepTimersRunning>true</KeepTimersRunning>\r
+    <OverrideVtor>false</OverrideVtor>\r
+    <CacheFlash>true</CacheFlash>\r
+    <ProgFlashFromRam>true</ProgFlashFromRam>\r
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>\r
+    <UncachedRange />\r
+    <preserveEEPROM>true</preserveEEPROM>\r
+    <OverrideVtorValue>exception_table</OverrideVtorValue>\r
+    <BootSegment>2</BootSegment>\r
+    <eraseonlaunchrule>1</eraseonlaunchrule>\r
+    <ExternalProgrammingToolCommand />\r
+    <AsfFrameworkConfig>\r
+      <framework-data xmlns="">\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />\r
+        </dependencies>\r
+      </framework-data>\r
+    </AsfFrameworkConfig>\r
+    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
+    <avrtoolserialnumber>J41800000779</avrtoolserialnumber>\r
+    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
+    <com_atmel_avrdbg_tool_atmelice>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+        </InterfaceProperties>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
+      <ToolNumber>J41800000779</ToolNumber>\r
+      <ToolName>Atmel-ICE</ToolName>\r
+    </com_atmel_avrdbg_tool_atmelice>\r
+    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>NDEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Compile Include="..\common\I2C\BMP280.c">\r
+      <SubType>compile</SubType>\r
+      <Link>BMP280.c</Link>\r
+    </Compile>\r
+    <Compile Include="..\common\I2C\SHT2x.c">\r
+      <SubType>compile</SubType>\r
+      <Link>SHT2x.c</Link>\r
+    </Compile>\r
+    <Compile Include="..\common\I2C\USI_TWI_Master.c">\r
+      <SubType>compile</SubType>\r
+      <Link>USI_TWI_Master.c</Link>\r
+    </Compile>\r
+    <Compile Include="DS2450_SHT2X_BMP280.c">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+    <Compile Include="OWDS2450.S">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
 </Project>
\ No newline at end of file
index 842c9ea..683b765 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -46,7 +46,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[18]={0x01,14,0x04,0x08, 0x03,15, 0x02,16,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x01,14,0x04,0x08, 0x03,15, 0x02,16,0x02,7,7,15,14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index e6f570a..8f5d4f9 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -45,7 +45,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[18]={0x01,14,0x04,0x08, 0x03,15, 0x06,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x01,14,0x04,0x08, 0x03,15,0,0,2,7,7,15,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 #if (owid>128) \r
 #error "Variable not correct"\r
index 7924bc2..59f8dce 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
-  <PropertyGroup>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectVersion>7.0</ProjectVersion>
-    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
-    <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>
-    <avrdevice>ATtiny84A</avrdevice>
-    <avrdeviceseries>none</avrdeviceseries>
-    <OutputType>Executable</OutputType>
-    <Language>C</Language>
-    <OutputFileName>$(MSBuildProjectName)</OutputFileName>
-    <OutputFileExtension>.elf</OutputFileExtension>
-    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
-    <AssemblyName>DS2450</AssemblyName>
-    <Name>DS2450_SHT2X_MAX44009</Name>
-    <RootNamespace>DS2450</RootNamespace>
-    <ToolchainFlavour>Native</ToolchainFlavour>
-    <KeepTimersRunning>true</KeepTimersRunning>
-    <OverrideVtor>false</OverrideVtor>
-    <CacheFlash>true</CacheFlash>
-    <ProgFlashFromRam>true</ProgFlashFromRam>
-    <RamSnippetAddress>0x20000000</RamSnippetAddress>
-    <UncachedRange />
-    <preserveEEPROM>true</preserveEEPROM>
-    <OverrideVtorValue>exception_table</OverrideVtorValue>
-    <BootSegment>2</BootSegment>
-    <eraseonlaunchrule>1</eraseonlaunchrule>
-    <ExternalProgrammingToolCommand />
-    <AsfFrameworkConfig>
-      <framework-data xmlns="">
-        <options />
-        <configurations />
-        <files />
-        <documentation help="" />
-        <offline-documentation help="" />
-        <dependencies>
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />
-        </dependencies>
-      </framework-data>
-    </AsfFrameworkConfig>
-    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
-    <avrtoolserialnumber>J41800000779</avrtoolserialnumber>
-    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>
-    <com_atmel_avrdbg_tool_atmelice>
-      <ToolOptions>
-        <InterfaceProperties>
-        </InterfaceProperties>
-        <InterfaceName>debugWIRE</InterfaceName>
-      </ToolOptions>
-      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
-      <ToolNumber>J41800000779</ToolNumber>
-      <ToolName>Atmel-ICE</ToolName>
-    </com_atmel_avrdbg_tool_atmelice>
-    <avrtoolinterface>debugWIRE</avrtoolinterface>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>NDEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>DEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\MAX44009.c">
-      <SubType>compile</SubType>
-      <Link>MAX44009.c</Link>
-    </Compile>
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\SHT2x.c">
-      <SubType>compile</SubType>
-      <Link>SHT2x.c</Link>
-    </Compile>
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\TSL256x.c">
-      <SubType>compile</SubType>
-      <Link>TSL256x.c</Link>
-    </Compile>
-    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">
-      <SubType>compile</SubType>
-      <Link>USI_TWI_Master.c</Link>
-    </Compile>
-    <Compile Include="DS2450_SHT2X_MAX44009.c">
-      <SubType>compile</SubType>
-    </Compile>
-    <Compile Include="OWDS2450.S">
-      <SubType>compile</SubType>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">\r
+  <PropertyGroup>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
+    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>\r
+    <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>\r
+    <avrdevice>ATtiny84A</avrdevice>\r
+    <avrdeviceseries>none</avrdeviceseries>\r
+    <OutputType>Executable</OutputType>\r
+    <Language>C</Language>\r
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>\r
+    <OutputFileExtension>.elf</OutputFileExtension>\r
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>\r
+    <AssemblyName>DS2450</AssemblyName>\r
+    <Name>DS2450_SHT2X_MAX44009</Name>\r
+    <RootNamespace>DS2450</RootNamespace>\r
+    <ToolchainFlavour>Native</ToolchainFlavour>\r
+    <KeepTimersRunning>true</KeepTimersRunning>\r
+    <OverrideVtor>false</OverrideVtor>\r
+    <CacheFlash>true</CacheFlash>\r
+    <ProgFlashFromRam>true</ProgFlashFromRam>\r
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>\r
+    <UncachedRange />\r
+    <preserveEEPROM>true</preserveEEPROM>\r
+    <OverrideVtorValue>exception_table</OverrideVtorValue>\r
+    <BootSegment>2</BootSegment>\r
+    <eraseonlaunchrule>1</eraseonlaunchrule>\r
+    <ExternalProgrammingToolCommand />\r
+    <AsfFrameworkConfig>\r
+      <framework-data xmlns="">\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />\r
+        </dependencies>\r
+      </framework-data>\r
+    </AsfFrameworkConfig>\r
+    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
+    <avrtoolserialnumber>J41800000779</avrtoolserialnumber>\r
+    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
+    <com_atmel_avrdbg_tool_atmelice>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+        </InterfaceProperties>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
+      <ToolNumber>J41800000779</ToolNumber>\r
+      <ToolName>Atmel-ICE</ToolName>\r
+    </com_atmel_avrdbg_tool_atmelice>\r
+    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>NDEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Compile Include="D:\oc\dev\owSlave2\common\I2C\MAX44009.c">\r
+      <SubType>compile</SubType>\r
+      <Link>MAX44009.c</Link>\r
+    </Compile>\r
+    <Compile Include="D:\oc\dev\owSlave2\common\I2C\SHT2x.c">\r
+      <SubType>compile</SubType>\r
+      <Link>SHT2x.c</Link>\r
+    </Compile>\r
+    <Compile Include="D:\oc\dev\owSlave2\common\I2C\TSL256x.c">\r
+      <SubType>compile</SubType>\r
+      <Link>TSL256x.c</Link>\r
+    </Compile>\r
+    <Compile Include="D:\oc\dev\owSlave2\common\I2C\USI_TWI_Master.c">\r
+      <SubType>compile</SubType>\r
+      <Link>USI_TWI_Master.c</Link>\r
+    </Compile>\r
+    <Compile Include="DS2450_SHT2X_MAX44009.c">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+    <Compile Include="OWDS2450.S">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
 </Project>
\ No newline at end of file
index 491b6b0..a57e18a 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
-  <PropertyGroup>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectVersion>7.0</ProjectVersion>
-    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>
-    <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>
-    <avrdevice>ATtiny84A</avrdevice>
-    <avrdeviceseries>none</avrdeviceseries>
-    <OutputType>Executable</OutputType>
-    <Language>C</Language>
-    <OutputFileName>$(MSBuildProjectName)</OutputFileName>
-    <OutputFileExtension>.elf</OutputFileExtension>
-    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
-    <AssemblyName>DS2450</AssemblyName>
-    <Name>DS2450</Name>
-    <RootNamespace>DS2450</RootNamespace>
-    <ToolchainFlavour>Native</ToolchainFlavour>
-    <KeepTimersRunning>true</KeepTimersRunning>
-    <OverrideVtor>false</OverrideVtor>
-    <CacheFlash>true</CacheFlash>
-    <ProgFlashFromRam>true</ProgFlashFromRam>
-    <RamSnippetAddress>0x20000000</RamSnippetAddress>
-    <UncachedRange />
-    <preserveEEPROM>true</preserveEEPROM>
-    <OverrideVtorValue>exception_table</OverrideVtorValue>
-    <BootSegment>2</BootSegment>
-    <eraseonlaunchrule>1</eraseonlaunchrule>
-    <ExternalProgrammingToolCommand />
-    <AsfFrameworkConfig>
-      <framework-data xmlns="">
-        <options />
-        <configurations />
-        <files />
-        <documentation help="" />
-        <offline-documentation help="" />
-        <dependencies>
-          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />
-        </dependencies>
-      </framework-data>
-    </AsfFrameworkConfig>
-    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>
-    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>
-    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>
-    <com_atmel_avrdbg_tool_atmelice>
-      <ToolOptions>
-        <InterfaceProperties>
-          <IspClock>125000</IspClock>
-        </InterfaceProperties>
-        <InterfaceName>debugWIRE</InterfaceName>
-      </ToolOptions>
-      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>
-      <ToolNumber>J41800000789</ToolNumber>
-      <ToolName>Atmel-ICE</ToolName>
-    </com_atmel_avrdbg_tool_atmelice>
-    <avrtoolinterface>debugWIRE</avrtoolinterface>
-    <avrtoolinterfaceclock>125000</avrtoolinterfaceclock>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>NDEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
-    <ToolchainSettings>
-      <AvrGcc>
-        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>
-        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>
-        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>
-        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>
-        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>
-        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>
-        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>
-        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>
-        <avrgcc.compiler.symbols.DefSymbols>
-          <ListValues>
-            <Value>DEBUG</Value>
-          </ListValues>
-        </avrgcc.compiler.symbols.DefSymbols>
-        <avrgcc.compiler.directories.IncludePaths>
-          <ListValues>
-            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>
-          </ListValues>
-        </avrgcc.compiler.directories.IncludePaths>
-        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>
-        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>
-        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>
-        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>
-        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>
-        <avrgcc.linker.libraries.Libraries>
-          <ListValues>
-            <Value>libm</Value>
-          </ListValues>
-        </avrgcc.linker.libraries.Libraries>
-        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>
-      </AvrGcc>
-    </ToolchainSettings>
-  </PropertyGroup>
-  <ItemGroup>
-    <Compile Include="..\common\I2C\BMP280.c">
-      <SubType>compile</SubType>
-      <Link>BMP280.c</Link>
-    </Compile>
-    <Compile Include="..\common\I2C\MAX1164x.c">
-      <SubType>compile</SubType>
-      <Link>MAX1164x.c</Link>
-    </Compile>
-    <Compile Include="..\common\I2C\SHT2x.c">
-      <SubType>compile</SubType>
-      <Link>SHT2x.c</Link>
-    </Compile>
-    <Compile Include="..\common\I2C\USI_TWI_Master.c">
-      <SubType>compile</SubType>
-      <Link>USI_TWI_Master.c</Link>
-    </Compile>
-    <Compile Include="..\common\OWDS2450.S">
-      <SubType>compile</SubType>
-      <Link>OWDS2450.S</Link>
-    </Compile>
-    <Compile Include="DS2450_VOC_SHT_BMP.c">
-      <SubType>compile</SubType>
-    </Compile>
-  </ItemGroup>
-  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">\r
+  <PropertyGroup>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectVersion>7.0</ProjectVersion>\r
+    <ToolchainName>com.Atmel.AVRGCC8.C</ToolchainName>\r
+    <ProjectGuid>dce6c7e3-ee26-4d79-826b-08594b9ad897</ProjectGuid>\r
+    <avrdevice>ATtiny84A</avrdevice>\r
+    <avrdeviceseries>none</avrdeviceseries>\r
+    <OutputType>Executable</OutputType>\r
+    <Language>C</Language>\r
+    <OutputFileName>$(MSBuildProjectName)</OutputFileName>\r
+    <OutputFileExtension>.elf</OutputFileExtension>\r
+    <OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>\r
+    <AssemblyName>DS2450</AssemblyName>\r
+    <Name>DS2450</Name>\r
+    <RootNamespace>DS2450</RootNamespace>\r
+    <ToolchainFlavour>Native</ToolchainFlavour>\r
+    <KeepTimersRunning>true</KeepTimersRunning>\r
+    <OverrideVtor>false</OverrideVtor>\r
+    <CacheFlash>true</CacheFlash>\r
+    <ProgFlashFromRam>true</ProgFlashFromRam>\r
+    <RamSnippetAddress>0x20000000</RamSnippetAddress>\r
+    <UncachedRange />\r
+    <preserveEEPROM>true</preserveEEPROM>\r
+    <OverrideVtorValue>exception_table</OverrideVtorValue>\r
+    <BootSegment>2</BootSegment>\r
+    <eraseonlaunchrule>1</eraseonlaunchrule>\r
+    <ExternalProgrammingToolCommand />\r
+    <AsfFrameworkConfig>\r
+      <framework-data xmlns="">\r
+        <options />\r
+        <configurations />\r
+        <files />\r
+        <documentation help="" />\r
+        <offline-documentation help="" />\r
+        <dependencies>\r
+          <content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.27.3" />\r
+        </dependencies>\r
+      </framework-data>\r
+    </AsfFrameworkConfig>\r
+    <avrtool>com.atmel.avrdbg.tool.atmelice</avrtool>\r
+    <avrtoolserialnumber>J41800000789</avrtoolserialnumber>\r
+    <avrdeviceexpectedsignature>0x1E930C</avrdeviceexpectedsignature>\r
+    <com_atmel_avrdbg_tool_atmelice>\r
+      <ToolOptions>\r
+        <InterfaceProperties>\r
+          <IspClock>125000</IspClock>\r
+        </InterfaceProperties>\r
+        <InterfaceName>debugWIRE</InterfaceName>\r
+      </ToolOptions>\r
+      <ToolType>com.atmel.avrdbg.tool.atmelice</ToolType>\r
+      <ToolNumber>J41800000789</ToolNumber>\r
+      <ToolName>Atmel-ICE</ToolName>\r
+    </com_atmel_avrdbg_tool_atmelice>\r
+    <avrtoolinterface>debugWIRE</avrtoolinterface>\r
+    <avrtoolinterfaceclock>125000</avrtoolinterfaceclock>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>NDEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize for size (-Os)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">\r
+    <ToolchainSettings>\r
+      <AvrGcc>\r
+        <avrgcc.common.Device>-mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a"</avrgcc.common.Device>\r
+        <avrgcc.common.outputfiles.hex>True</avrgcc.common.outputfiles.hex>\r
+        <avrgcc.common.outputfiles.lss>True</avrgcc.common.outputfiles.lss>\r
+        <avrgcc.common.outputfiles.eep>True</avrgcc.common.outputfiles.eep>\r
+        <avrgcc.common.outputfiles.srec>True</avrgcc.common.outputfiles.srec>\r
+        <avrgcc.common.outputfiles.usersignatures>False</avrgcc.common.outputfiles.usersignatures>\r
+        <avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>True</avrgcc.compiler.general.ChangeDefaultCharTypeUnsigned>\r
+        <avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>True</avrgcc.compiler.general.ChangeDefaultBitFieldUnsigned>\r
+        <avrgcc.compiler.symbols.DefSymbols>\r
+          <ListValues>\r
+            <Value>DEBUG</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.symbols.DefSymbols>\r
+        <avrgcc.compiler.directories.IncludePaths>\r
+          <ListValues>\r
+            <Value>%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include</Value>\r
+          </ListValues>\r
+        </avrgcc.compiler.directories.IncludePaths>\r
+        <avrgcc.compiler.optimization.level>Optimize (-O1)</avrgcc.compiler.optimization.level>\r
+        <avrgcc.compiler.optimization.PackStructureMembers>True</avrgcc.compiler.optimization.PackStructureMembers>\r
+        <avrgcc.compiler.optimization.AllocateBytesNeededForEnum>True</avrgcc.compiler.optimization.AllocateBytesNeededForEnum>\r
+        <avrgcc.compiler.optimization.DebugLevel>Default (-g2)</avrgcc.compiler.optimization.DebugLevel>\r
+        <avrgcc.compiler.warnings.AllWarnings>True</avrgcc.compiler.warnings.AllWarnings>\r
+        <avrgcc.linker.libraries.Libraries>\r
+          <ListValues>\r
+            <Value>libm</Value>\r
+          </ListValues>\r
+        </avrgcc.linker.libraries.Libraries>\r
+        <avrgcc.assembler.debugging.DebugLevel>Default (-Wa,-g)</avrgcc.assembler.debugging.DebugLevel>\r
+      </AvrGcc>\r
+    </ToolchainSettings>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <Compile Include="..\common\I2C\BMP280.c">\r
+      <SubType>compile</SubType>\r
+      <Link>BMP280.c</Link>\r
+    </Compile>\r
+    <Compile Include="..\common\I2C\MAX1164x.c">\r
+      <SubType>compile</SubType>\r
+      <Link>MAX1164x.c</Link>\r
+    </Compile>\r
+    <Compile Include="..\common\I2C\SHT2x.c">\r
+      <SubType>compile</SubType>\r
+      <Link>SHT2x.c</Link>\r
+    </Compile>\r
+    <Compile Include="..\common\I2C\USI_TWI_Master.c">\r
+      <SubType>compile</SubType>\r
+      <Link>USI_TWI_Master.c</Link>\r
+    </Compile>\r
+    <Compile Include="..\common\OWDS2450.S">\r
+      <SubType>compile</SubType>\r
+      <Link>OWDS2450.S</Link>\r
+    </Compile>\r
+    <Compile Include="DS2450_VOC_SHT_BMP.c">\r
+      <SubType>compile</SubType>\r
+    </Compile>\r
+  </ItemGroup>\r
+  <Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />\r
 </Project>
\ No newline at end of file
index 660dd28..ef34dfb 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved.\r
 //\r
 // Redistribution and use in source and binary forms, with or without\r
@@ -49,7 +49,7 @@ extern void OWINIT();
 extern void EXTERN_SLEEP();\r
 \r
 uint8_t owid[8]={0x20, 0xA2, 0xD9, 0x84, 0x00, 0x16, 0x02, 0x5D};/**/\r
-uint8_t config_info[18]={0x01,14, 0x04,0x08, 0x08,1, 0x02,16,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
+uint8_t config_info[26]={0x01,14, 0x04,0x08, 0x08,1, 0x02,16,0x02,7,7,17,14,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};\r
 \r
 #if (owid>128) \r
 #error "Variable not correct"\r
diff --git a/common/I2C/CDM7160.c b/common/I2C/CDM7160.c
new file mode 100644 (file)
index 0000000..65fc393
--- /dev/null
@@ -0,0 +1,137 @@
+// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// All rights reserved.\r
+//\r
+// Redistribution and use in source and binary forms, with or without\r
+// modification, are permitted provided that the following conditions are\r
+// met:\r
+//\r
+//  * Redistributions of source code must retain the above copyright\r
+//    notice, this list of conditions and the following disclaimer.\r
+//  * Redistributions in binary form must reproduce the above copyright\r
+//    notice, this list of conditions and the following disclaimer in the\r
+//    documentation and/or other materials provided with the\r
+//    distribution.\r
+//  * All advertising materials mentioning features or use of this\r
+//    software must display the following acknowledgement: This product\r
+//    includes software developed by tm3d.de and its contributors.\r
+//  * Neither the name of tm3d.de nor the names of its contributors may\r
+//    be used to endorse or promote products derived from this software\r
+//    without specific prior written permission.\r
+//\r
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+#define F_CPU 8000000UL\r
+#include <avr/io.h>\r
+\r
+#include <util/delay.h>\r
+\r
+\r
+#include "USI_TWI_Master.h"\r
+#include "CDM7160.h"\r
+\r
+\r
+\r
+\r
+uint16_t CDM7160getCO2_() {\r
+       volatile uint8_t b1,b2;\r
+       while((PINA&(1<<PINA0))!=0);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte(0b11010010);\r
+       I2c_WriteByte(0x03);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte (0b11010011);\r
+       b1 =I2c_ReadByte(ACK);\r
+       b2 =I2c_ReadByte(NO_ACK);\r
+       I2c_StopCondition();\r
+       \r
+       return b1|(b2<<8);\r
+       \r
+       \r
+\r
+}\r
+uint16_t CDM7160getCO2() {\r
+       volatile uint8_t b[16],i;\r
+       while((PINA&(1<<PINA0))!=0);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte(0b11010010);\r
+       I2c_WriteByte(0x00);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte (0b11010011);\r
+       for(i=0;i<15;i++) {\r
+               b[i] =I2c_ReadByte(ACK);\r
+       }\r
+       b[15] =I2c_ReadByte(NO_ACK);\r
+       I2c_StopCondition();\r
+       \r
+       return b[3]|(b[4]<<8);\r
+       \r
+       \r
+\r
+}\r
+\r
+void CDM7160setMode(uint8_t mode) {\r
+       while((PINA&(1<<PINA0))!=0);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte(0b11010010);\r
+       I2c_WriteByte(0x01);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte (0b11010011);\r
+       uint8_t b =I2c_ReadByte(NO_ACK);\r
+       I2c_StopCondition();\r
+       _delay_ms(2);\r
+       b&=0xFC;\r
+       b|=(mode<<1)&0x3;\r
+       I2c_StartCondition();\r
+       I2c_WriteByte(0b11010010);\r
+       I2c_WriteByte(0x01);\r
+       I2c_WriteByte(b);\r
+       I2c_StopCondition();\r
+}\r
+\r
+void CDM7160softReset() {\r
+       while((PINA&(1<<PINA0))!=0);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte(0b11010010);\r
+       I2c_WriteByte(0x00);\r
+       I2c_WriteByte(0x01);\r
+       I2c_StopCondition();\r
+}\r
+\r
+\r
+void CDM7160setFMode(uint8_t fmode) //Set Filtermode 0 average, 1 IIR\r
+{\r
+       while((PINA&(1<<PINA0))!=0);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte(0b11010010);\r
+       I2c_WriteByte(0x01);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte (0b11010011);\r
+       volatile uint8_t b =I2c_ReadByte(NO_ACK);\r
+       I2c_StopCondition();\r
+       _delay_ms(2);\r
+       b&=0xFB;\r
+       b|=((fmode&1)<<2);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte(0b11010010);\r
+       I2c_WriteByte(0x01);\r
+       I2c_WriteByte(b);\r
+       I2c_StopCondition();\r
+}\r
+void CDM7160setAvCount(uint8_t count) {//Set the Averaging count\r
+       while((PINA&(   1<<PINA0))!=0);\r
+       I2c_StartCondition();\r
+       I2c_WriteByte(0b11010010);\r
+       I2c_WriteByte(0x07);\r
+       I2c_WriteByte(count&0x3F);\r
+       I2c_StopCondition();\r
+\r
+}; \r
diff --git a/common/I2C/CDM7160.h b/common/I2C/CDM7160.h
new file mode 100644 (file)
index 0000000..a3bf902
--- /dev/null
@@ -0,0 +1,42 @@
+#ifndef MAX44009_H\r
+#define MAX44009_H\r
+// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// All rights reserved.\r
+//\r
+// Redistribution and use in source and binary forms, with or without\r
+// modification, are permitted provided that the following conditions are\r
+// met:\r
+//\r
+//  * Redistributions of source code must retain the above copyright\r
+//    notice, this list of conditions and the following disclaimer.\r
+//  * Redistributions in binary form must reproduce the above copyright\r
+//    notice, this list of conditions and the following disclaimer in the\r
+//    documentation and/or other materials provided with the\r
+//    distribution.\r
+//  * All advertising materials mentioning features or use of this\r
+//    software must display the following acknowledgement: This product\r
+//    includes software developed by tm3d.de and its contributors.\r
+//  * Neither the name of tm3d.de nor the names of its contributors may\r
+//    be used to endorse or promote products derived from this software\r
+//    without specific prior written permission.\r
+//\r
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+uint16_t CDM7160getCO2();\r
+void CDM7160setMode(uint8_t mode); //0 Power Down 1 Continuous\r
+void CDM7160softReset();\r
+void CDM7160setFMode(uint8_t fmode); //Set Filtermode 0 average, 1 IIR\r
+void CDM7160setAvCount(uint8_t count); //Set the Averaging count\r
+\r
+\r
+#endif
\ No newline at end of file
index c3cff91..16da4f4 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved. \r
 // \r
 // Redistribution and use in source and binary forms, with or without \r
index c41ce6c..9fd65c7 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved. \r
 // \r
 // Redistribution and use in source and binary forms, with or without \r
index 3694b11..109891d 100644 (file)
@@ -1,5 +1,5 @@
 \r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved. \r
 // \r
 // Redistribution and use in source and binary forms, with or without \r
index 0fb23d8..1abee6a 100644 (file)
@@ -1,5 +1,4 @@
-\r
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved. \r
 // \r
 // Redistribution and use in source and binary forms, with or without \r
index 30731e7..fb1d85b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved. \r
 // \r
 // Redistribution and use in source and binary forms, with or without \r
@@ -314,16 +314,16 @@ h_readrom_all:
 ;---------------------------------------------------\r
 \r
 h_fwconfiginfo:\r
-       cpi  r_bytep,16\r
+       cpi  r_bytep,24\r
        breq h_fwconfiginfo_crc\r
 #ifdef _CRC8_\r
-       cpi  r_bytep,17\r
+       cpi  r_bytep,25\r
        breq h_fwconfiginfo_all\r
 #elif defined _CRC16_\r
-       cpi  r_bytep,18\r
+       cpi  r_bytep,26\r
        breq h_fwconfiginfo_all\r
 #else\r
-       cpi  r_bytep,16\r
+       cpi  r_bytep,25\r
        breq h_fwconfiginfo_all\r
 #warning No CRC known code implemented\r
 #endif\r
@@ -338,10 +338,10 @@ h_fwconfiginfo_crc:
 #elif defined _CRC16_\r
        lds r_temp,crc\r
        com r_temp\r
-       sts config_info+16,r_temp\r
+       sts config_info+24,r_temp\r
        lds r_temp,crc+1\r
        com r_temp\r
-       sts config_info+17,r_temp\r
+       sts config_info+25,r_temp\r
        rjmp h_fwconfiginfo_end\r
 #endif\r
 h_fwconfiginfo_all:\r
index cb4ac7f..3c2d152 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved. \r
 // \r
 // Redistribution and use in source and binary forms, with or without \r
@@ -401,29 +401,36 @@ h_fwconfiginfo2:
        configZ config_info2,r_bytep\r
 \r
 h_fwconfiginfo_go:\r
-       cpi  r_bytep,16\r
+       cpi  r_bytep,24\r
        breq h_fwconfiginfo_crc\r
 #ifdef _CRC8_\r
-       cpi  r_bytep,17\r
+       cpi  r_bytep,25\r
        breq h_fwconfiginfo_all\r
 #elif defined _CRC16_\r
-       cpi  r_bytep,17\r
-       breq h_fwconfiginfo_crc2\r
-       cpi  r_bytep,18\r
+       cpi  r_bytep,26\r
        breq h_fwconfiginfo_all\r
 #else\r
-       cpi  r_bytep,16\r
+       cpi  r_bytep,25\r
        breq h_fwconfiginfo_all\r
 #warning No CRC known code implemented\r
 #endif\r
+h_fwconfiginfo_end:\r
+       //configZ config_info1,r_bytep  //crc16 wird in config_info1 gespeichert, auch bei config_info2 \r
        ld   r_rwbyte,Z\r
        rjmp handle_end_inc\r
 h_fwconfiginfo_crc:\r
+#ifdef _CRC8_ \r
        lds r_rwbyte,crc\r
        rjmp handle_end_inc\r
-h_fwconfiginfo_crc2:\r
-       lds r_rwbyte,crc+1\r
-       rjmp handle_end_inc\r
+#elif defined _CRC16_\r
+       lds r_temp,crc\r
+       com r_temp\r
+       sts config_info1+24,r_temp\r
+       lds r_temp,crc+1\r
+       com r_temp\r
+       sts config_info1+25,r_temp\r
+       rjmp h_fwconfiginfo_end\r
+#endif\r
 h_fwconfiginfo_all:\r
        rjmp handle_end_sleep\r
 \r
@@ -630,8 +637,8 @@ owinit_odgen2:
        ;copy ids in config bytes\r
        ldi  xl,lo8(owid1)\r
        ldi  xh,hi8(owid1)\r
-       ldi      yl,lo8(config_info2+9)\r
-       ldi  yh,hi8(config_info2+9)\r
+       ldi      yl,lo8(config_info2+17)\r
+       ldi  yh,hi8(config_info2+17)\r
        ldi r_temp,7\r
 owinit_cpconfig1:\r
        ld r_rwbyte,X+\r
@@ -640,8 +647,8 @@ owinit_cpconfig1:
        brne owinit_cpconfig1\r
        ldi  xl,lo8(owid2)\r
        ldi  xh,hi8(owid2)\r
-       ldi      yl,lo8(config_info1+9)\r
-       ldi  yh,hi8(config_info1+9)\r
+       ldi      yl,lo8(config_info1+17)\r
+       ldi  yh,hi8(config_info1+17)\r
        ldi r_temp,7\r
 owinit_cpconfig2:\r
        ld r_rwbyte,X+\r
index 4ddead1..6440eae 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved. \r
 // \r
 // Redistribution and use in source and binary forms, with or without \r
index 1ad0afc..349be8a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de\r
+// Copyright (c) 2017, Tobias Mueller tm(at)tm3d.de\r
 // All rights reserved. \r
 // \r
 // Redistribution and use in source and binary forms, with or without \r
@@ -37,17 +37,23 @@ TIMER_INTERRUPT:
        push r_temp\r
        in r_temp,_SFR_IO_ADDR(SREG)  \r
        push r_temp\r
+       push r_temp2\r
        cdb\r
        sbic OW_PIN,OW_PINN  ; abkuerzung wenn Leitung schon h\r
        rjmp tint_end ; Leitung 1 kein Reset\r
        ldi r_temp,0  \r
        out TCNT_REG,r_temp\r
        CLEAR_TOV_FLAG\r
+       ldi r_temp2,3 ;3x overrun for timeout\r
 tint_loop_rend:\r
+       JMP_NO_TOV ;ueberspringe wenn kein ueberlauf\r
+       rjmp tint_handle_timeout\r
        sbis OW_PIN,OW_PINN ;warten bis leitung wieder h \r
        rjmp tint_loop_rend\r
-       JMP_NO_TOV ;ueberspringe wenn kein ueberlauf\r
-       rjmp tint_overrun\r
+       ;JMP_NO_TOV ;ueberspringe wenn kein ueberlauf\r
+       cpi r_temp2,3\r
+       ;rjmp tint_overrun\r
+       brne tint_overrun\r
        in r_temp,TCNT_REG ;schauen ob es lange genug gedauert hat fuer reset\r
        cpi r_temp,OWT_RESET2 \r
        brlo tint_end\r
@@ -79,8 +85,15 @@ tint_loop_pres:
 tint_end:\r
        ;CLEAR_INTERRUPT_FLAG\r
        DIS_TIM_INT\r
+       pop r_temp2\r
        pop r_temp\r
        out _SFR_IO_ADDR(SREG),r_temp\r
        pop r_temp\r
        reti\r
 ;;;\r
+\r
+tint_handle_timeout:\r
+       dec r_temp2\r
+       breq tint_end\r
+       CLEAR_TOV_FLAG\r
+       rjmp tint_loop_rend
\ No newline at end of file
index cccdd18..5a51e4e 100644 (file)
@@ -83,7 +83,7 @@ jreset:
 \r
 \r
 .ORG 0x0EC0\r
-\r
+//7552 Byte \r
 start: \r
                cli\r
                ldi temp,0\r