// --- measure temperature with "Polling Mode" (no hold master) ---\r
SHT2x_MeasurePoll(TEMP, &sT);\r
//-- calculate humidity and temperature --\r
- temperatureC = SHT2x_CalcTemperatureC(sT)*10.0-4;\r
+ temperatureC = SHT2x_CalcTemperatureC(sT)*10.0-2;\r
humidityRH = SHT2x_CalcRH(sRH)*10.0+5;\r
if (humidityRH>1000) humidityRH=1000;\r
if (testSW()) {\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.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
// (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
uint8_t page5[8]; //41\r
uint8_t page6[8]; //49\r
uint8_t page7[8]; //57\r
- //uint8_t crc; //65\r
+ \r
#endif\r
};\r
} pack2_t;\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
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
}\r
\r
int main(void){\r
- //volatile double test=calibr_hum(20,1,20);\r
PRR|=(1<<PRADC); // adc for save Power\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
pack1.temp=0x0550;\r
pack1.config=0x7F;\r
pack1.TH=75;\r
pack1.rrFF=0xFF;\r
pack1.rr00=0;\r
pack1.rr10=0x10;\r
- PORTA=0xFF;\r
- PORTB=0xFF;\r
- OWINIT();\r
- PORTB|=(1<<PINB1);\r
- DDRB|=(1<<PINB1);\r
- PORTA|=(1<<PINA0);\r
- DDRA|=(1<<PINA0);\r
- \r
- MCUCR &=~(1<<PUD); //All Pins Pullup...\r
- MCUCR |=(1<<BODS);\r
- \r
+\r
pack2.cmode=0;\r
pack2.R0=readEEPROM(EEPROM_R0,1);\r
R0=pack2.R0/100.0;\r
weekmaxarr[i]=pack2.r_week_max;\r
}\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
+ if (testSW()) {\r
+ config_info2[5]=8;\r
+ }else{\r
+ config_info2[5]=7;\r
+ }\r
\r
- MCUSR=0;\r
USI_TWI_Master_Initialise();\r
\r
SHT2x_SoftReset();\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
} else {\r
pack2.R0=pack2.r_day_max;\r
}\r
- R0=pack2.R0/100.0-0.5*(pack2.R0/100-R0);\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
humidityRH = SHT2x_CalcRH(sRH);\r
ip=interp(temperatureC,humidityRH);\r
pack2.ip=ip*1000;\r
- humidityRH=calibr_hum(temperatureC,-0.45,humidityRH)*10.0;\r
+ humidityRH=calibr_hum(temperatureC,-0.2,humidityRH)*10.0;\r
//humidityRH=humidityRH*10.0;\r
- temperatureC =temperatureC *10.0-4.5;\r
- hhum=(1.0546-0.000216*temperatureC)*(humidityRH);\r
- am2302_hum=0.318*hhum +76.0;\r
- am2302_temp=temperatureC*25.6;\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);\r
+ PORTB&=~(1<<PINB1); //Auf 0 Ziehen\r
_delay_us(150);\r
mr+=MAX1164x_read();\r
_delay_us(150);\r
mr+=MAX1164x_read();\r
- \r
PORTB|=(1<<PINB1);\r
//ENDE Kritische Sektion !______________________________\r
//l=mr/2.0*2.048/4096; \r
\r
\r
}\r
- //hr=l*10000.0;\r
pack2.VS=mr*5/2;\r
l=mr/4000.0;\r
l=( 3/l- 1) *30;\r
if (l*100>pack2.r_day_max) {\r
pack2.r_day_max=l*100;\r
}\r
- }\r
- l=l/R0;\r
- l=log(1/l);\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
- // if (l>500) {\r
- // l=100;\r
- // }\r
wdcounter=0;\r
\r
}\r
+++ /dev/null
-:100000003DC05AC356C055C079C453C052C051C038\r
-:1000100050C04FC04EC032C24CC04BC04AC049C095\r
-:1000200048C008000000BE922449123EABAAAA2A8A\r
-:10003000BECDCCCC4C3E00000080BEABAAAAAA3EEE\r
-:1000400000000000BF000000803F0000000000082A\r
-:100050004178D3BB4387D1133D190E3CC3BD4282C7\r
-:10006000AD2B3E68EC8276BED98FE1A93E4C80EF85\r
-:10007000FFBE01C4FF7F3F000000000011241FBE2F\r
-:10008000CFE5D2E0DEBFCDBF10E0A0E6B0E0E4ED0A\r
-:10009000FAE102C005900D92A239B107D9F721E02B\r
-:1000A000A2E9B0E001C01D92A736B207E1F76CD417\r
-:1000B0000FCDA6CF2FEFF1E02750FFBB60E0EAE8BD\r
-:1000C000F0E007C02FEFF1E02F50FFBB60E0E2E867\r
-:1000D000F0E0E199FECF2EBBE09A1DB31F3F29F05F\r
-:1000E0001193639523956830A1F708956AC311C0F1\r
-:1000F0004FC07FC0BCC0F2C16AC2BDC0C2C0D3C0C5\r
-:10010000DEC0EAC047C257C219C2A5C2AEC2BFC252\r
-:10011000C6C26627153591F0103FA9F01C3E39F193\r
-:100120004AC300911301023029F400EC0F930EE052\r
-:100130000F9308950395009313013DC303E00093CB\r
-:10014000110142E03DC303E000931101E0E2F1E060\r
-:10015000E60F0027F01F3CC000911101013019F09B\r
-:10016000023019F028C345E02BC346E029C30091B3\r
-:100170006601002341F71FC347E051E000E0009310\r
-:10018000600179C048E051E000E00093600179C06F\r
-:100190003091110130FF0AC0EAE8F0E0E60F0027D5\r
-:1001A000F01F2081211711F03E7F79F0E2E8F0E0A6\r
-:1001B000E60F0027F01F2081211711F03D7F29F065\r
-:1001C00030931101673041F2FAC230931101F3C24A\r
-:1001D000208100911101033021F026952695039589\r
-:1001E000FACF2695111F2695111F51E030E444E007\r
-:1001F000E8C2E0E2F1E0E60F0027F01F2191009154\r
-:100200001101033029F00130B9F00230E9F0D3C216\r
-:10021000107849F020FDCFC224FD0E7F22FD0D7F16\r
-:100220000093110119C021FDC6C224FF0E7F22FFD9\r
-:100230000D7F0093110110C0107819F025FFBBC28B\r
-:100240000BC024FFB8C208C0107819F023FFB3C256\r
-:1002500003C022FFB0C200C000911101002309F4C5\r
-:10026000AAC26395603409F0B3CF552775CF5527DF\r
-:1002700043E030E0A6C2E2E7F0E0E60F0027F01F1F\r
-:1002800005C0E2E6F0E0E60F0027F01F603121F044\r
-:10029000613141F0108193C21091600190C21091C0\r
-:1002A00061018DC288C2E8E1F1E0E60F0027F01F8E\r
-:1002B0001083673009F083C27EC24AE051E06830A3\r
-:1002C00039F0E8E1F1E0E60F0027F01F108177C276\r
-:1002D000552771C24BE073C230911101323031F0B9\r
-:1002E000EAE8F0E0E60F0027F01F05C0E2E8F0E0E2\r
-:1002F000E60F0027F01F0081101759F5613029F033\r
-:10030000653029F0663029F024C003E0600F639562\r
-:1003100057C22FEFF1E007E031FD0FE0201BFFBBDC\r
-:10032000E8E1F1E060E0E199FECF00E00CBB2EBB1C\r
-:1003300011911DBBE29AE19A63952395683099F774\r
-:100340009F938F93AF93BF933CD0BF91AF918F9109\r
-:100350009F9131C2000000000000000008950F933B\r
-:1003600000E405BFDD9ADC9AF5DFCD9B0DC0CC9B88\r
-:100370000BC0DC98D49AEEDFCD9906C0D49800EC7F\r
-:100380000F930EE00F93089500E806BD00E006BD50\r
-:1003900000E009BF00E40BBF02E003BFBA98C298B7\r
-:1003A00002E005BF6F931F93E199FCCF00E00FBB04\r
-:1003B00002E00EBBE09A0DB307FFD9D01F916F91F9\r
-:1003C0000F91CF93DF930F931F93FF92EF9272DE03\r
-:1003D00079DE68E000E0E0E2F1E0AAE8B0E0C2E83F\r
-:1003E000D0E09D918991F92EF094E82EE09438E0C8\r
-:1003F000092F08232F2D2E2140E09695441FF694B7\r
-:10040000441F8695441FE694441F0695441F269575\r
-:10041000441F41933A9581F76A9519F7AAE8B0E02D\r
-:10042000CBE6D0E007E01D9119930A95E1F7A2E829\r
-:10043000B0E0CBE7D0E007E01D9119930A95E1F712\r
-:1004400000E0009363010093620100936601BB9892\r
-:10045000EF90FF901F910F91DF91CF910895F89445\r
-:100460000F9300E000936301009365010093140172\r
-:1004700000936201BB980F91789408950F930FB782\r
-:100480000F93B29924C000E002BF01E008BFB29B05\r
-:10049000FECF08B700FD03C002B70035C0F000E092\r
-:1004A00002BF02B70E31E8F3BA9A02B70238E8F396\r
-:1004B000BA9801E00093630101E0009361010093A9\r
-:1004C0006201002700931401BB9800E40ABF09B73A\r
-:1004D0000E7F09BF0F910FBF0F911895662718382F\r
-:1004E00009F41FCE00E0009313011E3BB9F01E3447\r
-:1004F000D9F01434F1F0183421F1183BC1F015385B\r
-:1005000009F43ACE153711F449E05AC1173A09F403\r
-:10051000D4CE193709F4DECE40E052C14CE051E0B0\r
-:1005200000E00093600136C04DE062E049C11FD099\r
-:1005300047C101E0009365014EE053E030E010E078\r
-:1005400040C162E0E4ECF0E0E60F0027F01F662710\r
-:10055000E199FECF00E00CBB00E00FBB6EBB119138\r
-:100560001DBBE29AE19A6395633091F729C162E07D\r
-:10057000E4ECF0E0E60F0027F01F66270027E19982\r
-:10058000FECF0FBB6EBBE09A1DB311936395633032\r
-:10059000B1F70895683049F0693061F0E4ECF0E0BB\r
-:1005A000E60F0027F01F108102C0109160016395D3\r
-:1005B00031E006C100C1E4ECF0E0E60F0027F01FD7\r
-:1005C0006395653011F01083FBC01083F4C066277B\r
-:1005D000183809F4A6CD00E0009313011E3B11F476\r
-:1005E0004FE0EEC01E3411F441E1EAC0143481F052\r
-:1005F000143BD1F0153809F4C5CD153711F449E095\r
-:10060000DFC0173A09F459CE193709F463CED3C0C5\r
-:1006100002E000936501009196000093CE000091E6\r
-:1006200097000093CF00C7C00091CD0003FF07C023\r
-:1006300004EF0093D00001E00093D1000BC003E071\r
-:10064000009365010091C2000093D0000091C300A7\r
-:100650000093D100B0C0110F110F110F10931201B0\r
-:1006600051E040E100E000936001683061F06930E2\r
-:1006700069F000911201060FEDECF0E0E00F0027A9\r
-:10068000F01F10819CC01091600199C094C0110F9F\r
-:10069000110F110F1093120142E131E091C0683047\r
-:1006A00051F000911201060FEDECF0E0E00F002791\r
-:1006B000F01F108384C07FC0BB99BA9A2F932FB7C5\r
-:1006C000BB982F930F9305B702600F7E05BF3F9332\r
-:1006D0001F935F93309162011091100150911401AA\r
-:1006E0000BE402BF09B7016009BF01E008BF552351\r
-:1006F00009F1332319F453D05523B9F020E01795AD\r
-:1007000010F0BB9A21E07F9370916001072F017078\r
-:10071000201721F476950CE8702701C07695709328\r
-:1007200060017F91330FBA9B13C002B70E36E8F316\r
-:10073000BA980EC002B70735E8F3169521E0B29BD0\r
-:1007400002C0106820E0330F19F429D0552389F630\r
-:10075000BB9901C013C051FD11C0B29904C002B7CA\r
-:10076000073860F4FACFB29B06C002B7053AB29BD5\r
-:1007700002C0C8F303C0BA9ABB98B2CF00E40ABF64\r
-:100780005093140130936201109310015F911F91F7\r
-:100790003F910F91BA982F912FBF2F911895EF93FA\r
-:1007A000FF934F936F934091630160916401E6E77B\r
-:1007B000F0E0E40F0994332740E0552702C0639529\r
-:1007C00031E040936301609364016F914F91FF9119\r
-:1007D000EF9108954F925F926F927F928F929F92C6\r
-:1007E000AF92BF92CF92DF92EF92FF920F931F933F\r
-:1007F000CF93DF93CDB7DEB728970FB6F894DEBF5F\r
-:100800000FBECDBF2B013C0149015A01E982FA829A\r
-:100810000B831C832DEC3CE44DE653E4AFD66B0117\r
-:100820007C0123E333E948E853E4C301B201A6D6CF\r
-:100830009B01AC01C501B40105D720E030E040E8E0\r
-:100840005FE39CD66D837E838F83988724EF35EC9E\r
-:1008500041E855E4C501B40165D82B013C01A7016D\r
-:100860009601C501B4018AD69B01AC01C701B6014E\r
-:1008700059D89B01AC01C301B201E4D69B01AC0184\r
-:1008800060E070E080E89FE378D69B01AC016D8169\r
-:100890007E818F81988546D829813A814B815C8100\r
-:1008A00041D8C62ED72EE82EF92E20E030E048ECB5\r
-:1008B00052E4EFD718161CF03E2D2F2D04C0C12C8A\r
-:1008C000D12C38EC22E46C2D7D2D832F922F28968D\r
-:1008D0000FB6F894DEBF0FBECDBFDF91CF911F9151\r
-:1008E0000F91FF90EF90DF90CF90BF90AF909F90CF\r
-:1008F0008F907F906F905F904F9008951F920F920E\r
-:100900000FB60F9211248F93809161008F5F8093B7\r
-:10091000610080916101813021F482E08093610166\r
-:1009200004C0823011F4109263018F910F900FBEBA\r
-:100930000F901F901895E199FECF91E0980F9EBB04\r
-:10094000E09A2DB330E02F3F310559F0322F2227A6\r
-:10095000E199FECF8EBBE09A8DB3A901482BCA0165\r
-:100960000895862F972F0895E199FECF1CBA8EBB6C\r
-:100970006DBBE29AE19AE199FECF1CBA8F5F8EBB04\r
-:100980007DBBE29AE19A0895CF93DF93CDB7DEB7AE\r
-:100990002E970FB6F894DEBF0FBECDBF009AE4ECE1\r
-:1009A000F0E080E595E0918380838FE784838BE49A\r
-:1009B000828386E483838FEF8583168290E1978319\r
-:1009C0008BBB88BBCCDCC19AB99AD89AD09A85B730\r
-:1009D0008F7B85BF85B7806885BF0F2EFDECEF2E1E\r
-:1009E000F0E0FF2EF02DD7015C961C9261E070E0E4\r
-:1009F00080E0A1DFF701918F808F608D718D80E0A5\r
-:100A000090E0B9D620E030E048EC52E41BD6609389\r
-:100A100098007093990080939A0090939B0061E0F6\r
-:100A200070E082E088DFD70195969C938E9394972F\r
-:100A300061E070E084E07FDFF70197A386A360E0C8\r
-:100A400070E086E078DFD70193969C938E9392971F\r
-:100A500091961C921E9290970EEA10E00F2EFCEBDE\r
-:100A60002F2EF0E03F2EF02DF80196968D919C915F\r
-:100A7000979781939193E215F305B9F781B580615A\r
-:100A800081BD81B5816681BD14BE0DD5B2D48CEC1B\r
-:100A900090E017D48CEC90E034D461E280E5DBD4B4\r
-:100AA000EFE5FAEE3197F1F700C0000081E08093A6\r
-:100AB000650178940F2EF4EC4F2EF0E05F2EF02DB0\r
-:100AC00066246394712C0D871E87D20114968C9135\r
-:100AD00014978F31B9F4EFE71496EC9380E090E02F\r
-:100AE000A0E8BFE38093980090939900A0939A00A8\r
-:100AF000B0939B001092E6001092E50060E070E079\r
-:100B000080E032DFD20114968C9114978530B1F5D4\r
-:100B1000EFE71496EC937092F2006092F1007092FD\r
-:100B2000F4006092F3001092F0001092EF00109227\r
-:100B3000EE001092ED0080E090E0A0E8BFE380932B\r
-:100B4000980090939900A0939A00B0939B006FEF48\r
-:100B500070E080E009DF6FEF70E082E005DF6FEFAB\r
-:100B600070E084E001DF6FEF70E086E0FDDEED8590\r
-:100B7000FE8561927192E215F305D9F780916100CB\r
-:100B8000882309F435C38091ED009091EE00019621\r
-:100B90009093EE008093ED008091ED009091EE0037\r
-:100BA0008131974208F49EC01092EE001092ED0041\r
-:100BB0008091EF009091F00001969093F000809367\r
-:100BC000EF001092F4001092F3008091F1009091E8\r
-:100BD000F2009093BD008093BC00ED85FE8582817C\r
-:100BE0009381819391932091F3003091F400281721\r
-:100BF000390720F49093F4008093F3002E163F06FB\r
-:100C000071F78091EF009091F000089748F0809183\r
-:100C1000F3009091F4009093E6008093E50008C003\r
-:100C20008091F1009091F2009093E6008093E500AE\r
-:100C30006091E5007091E600E090E500F090E6003C\r
-:100C400080E090E098D520E030E048EC52E4FAD41F\r
-:100C50004B015C01C70164E670E026D780E090E0BC\r
-:100C60008AD5209198003091990040919A00509136\r
-:100C70009B0083D420E030E040E05FE353D69B014B\r
-:100C8000AC01C501B40179D46093980070939900C8\r
-:100C900080939A0090939B0020E030E048EC52E46F\r
-:100CA00041D63DD57093E6006093E5006091E50084\r
-:100CB0007091E60080E058DE6091F1007091F200E2\r
-:100CC00082E052DE6091F3007091F40084E04CDE2B\r
-:100CD0006091EF007091F00086E046DE1092F20025\r
-:100CE0001092F10080916000882319F08150809368\r
-:100CF000600068EA70E080E019D360EC70E081E0A9\r
-:100D000015D38091C0009091C10095D36093A0004D\r
-:100D10007093A1008093A2009093A3008091A800FB\r
-:100D20009091A90078D36B017C0160939C00709333\r
-:100D30009D0080939E0090939F008090A0009090D3\r
-:100D4000A100A090A200B090A3009B01AC01EAD545\r
-:100D500069837A838B839C83A5019401C501B401C7\r
-:100D6000E1D56D837E838F8398872BE237E943EA51\r
-:100D700051E369817A818B819C81D4D59B01AC013F\r
-:100D80006D817E818F819885CDD569877A878B87A4\r
-:100D90009C8728E33DE145ED54E369817A818B81AD\r
-:100DA0009C81C0D59B01AC01C501B401BBD59B01A1\r
-:100DB000AC0169857A858B859C85DFD369877A87C5\r
-:100DC0008B879C872FE130E84BE258E369817A8179\r
-:100DD0008B819C81A7D59B01AC0169857A858B8528\r
-:100DE0009C85CCD369837A838B839C8326E43AECFD\r
-:100DF0004FE855E3C701B60195D59B01AC016D8164\r
-:100E00007E818F8198858ED59B01AC0169817A8125\r
-:100E10008B819C81B2D369837A838B839C8329EDF8\r
-:100E200033E343EF58E3C701B6017CD59B01AC0126\r
-:100E3000C501B40177D59B01AC0169817A818B81B1\r
-:100E40009C819CD369837A838B839C8324E236E0E4\r
-:100E500046E25CE3C701B60165D59B01AC0169813F\r
-:100E60007A818B819C8189D369837A838B839C83EC\r
-:100E700027E533EC4BE259E36D817E818F819885C4\r
-:100E800051D59B01AC0169817A818B819C8176D39C\r
-:100E900069837A838B839C8327EE32E945EC5CE39C\r
-:100EA000C501B4013FD59B01AC0169817A818B8179\r
-:100EB0009C8163D32FE038E247EE5FE35FD360931A\r
-:100EC000920070939300809394009093950020E09B\r
-:100ED00030E04AE754E426D51DD47093EB006093CC\r
-:100EE000EA008701760126E636E646EE5EEBC501AE\r
-:100EF000B40170DC20E030E040E251E413D54B0156\r
-:100F00005C0160939C0070939D0080939E00909381\r
-:100F10009F0020E030E040E251E46091A000709139\r
-:100F2000A1008091A2009091A300FCD420E030E0C9\r
-:100F300040E950E422D36B017C016093A0007093E0\r
-:100F4000A1008093A2009093A3002FE03EE742E629\r
-:100F500059E3E8D49B01AC0162E27DEF86E89FE3B0\r
-:100F60000CD39B01AC01C501B401DCD46093AA0091\r
-:100F70007093AB008093AC009093AD0025EE30ED04\r
-:100F800042EA5EE3CFD420E030E048E952E4F6D212\r
-:100F9000C6D37093C3006093C2002DEC3CEC4CECC4\r
-:100FA00051E4C701B601BED4B5D3709397006093E6\r
-:100FB00096001092BF001092BE00C198EBE2F1E0E3\r
-:100FC0003197F1F700C0000056D22091BE00309159\r
-:100FD000BF00820F931F9093BF008093BE008BE2EF\r
-:100FE00091E00197F1F700C0000045D22091BE00CA\r
-:100FF0003091BF00820F931F9093BF008093BE007B\r
-:10100000C19A8091E900882351F08091BE009091AF\r
-:10101000BF008059984E9093BF008093BE0080918E\r
-:10102000BE009091BF0081329C4150F08091E90058\r
-:10103000811106C060E280E50ED281E08093E90074\r
-:101040008091BE009091BF008115994148F4809134\r
-:10105000E900813029F461E280E5FDD11092E900D8\r
-:101060006091BE007091BF00CB01880F991F880F5F\r
-:10107000991F860F971F969587959093E800809308\r
-:10108000E70080E090E077D320E030E04AE755E4E5\r
-:10109000D9D29B01AC0160E070E080E490E4D2D250\r
-:1010A00020E030E040E85FE368D220E030E040EF4D\r
-:1010B00051E438D46B017C0120E030E048EC52E48C\r
-:1010C00031D428D37093D3006093D2002091920042\r
-:1010D000309193004091940050919500C701B60162\r
-:1010E000B1D26B017C016093A4007093A500809342\r
-:1010F000A6009093A7008091600081114CC02091C0\r
-:1011000098003091990040919A0050919B00C7013E\r
-:10111000B601BFD31816D4F4C0929800D0929900AB\r
-:10112000E0929A00F0929B0020E030E048EC52E41C\r
-:10113000C701B601F7D3F3D27093E6006093E500E0\r
-:101140006091E5007091E60080E00EDC20E030E088\r
-:1011500048EC52E46091A4007091A5008091A60033\r
-:101160009091A700DFD36B017C018091F1009091F9\r
-:10117000F200BC0180E090E0FED29B01AC01C7010F\r
-:10118000B60187D318163CF4C701B601C8D27093D4\r
-:10119000F2006093F1002091980030919900409105\r
-:1011A0009A0050919B006091A4007091A5008091DD\r
-:1011B000A6009091A70046D29B01AC0160E070E0D0\r
-:1011C00080E89FE33FD26ED320E030E040E253E47A\r
-:1011D000A9D320E030E040E850E4A4D36093A40019\r
-:1011E0007093A5008093A6009093A70010926100D1\r
-:1011F00080916501813029F56091A4007091A5006E\r
-:101200008091A6009091A7008AD29B0132952295E9\r
-:101210002F7023273F702327322FF2012281438131\r
-:10122000431728F441E0231718F040E001C041E0E3\r
-:10123000F894D20111967C936E9340936601789452\r
-:101240000ED9809165018250823010F410926501B0\r
-:1012500009B600FC0BC080916301811107C085B7FE\r
-:10126000806385BF85B78D7F85BF06C085B78062E7\r
-:1012700085BF85B78F7E85BF889527CC6623D9F03B\r
-:10128000FC012FEF260F30E02F5F3F4FBC01620FB4\r
-:10129000731F90E088E031E321919227282F992352\r
-:1012A0001CF4990F932701C0990F2150C1F7E6173D\r
-:1012B000F70791F701C090E081E0941301C080E04E\r
-:1012C00008950F931F93CF938C0148D180E819D1D3\r
-:1012D000C82F87EE16D1C82B41D181E812D1C82B77\r
-:1012E00081E029D1F801808380E025D1482F61E099\r
-:1012F000C801C4DFC82B3FD18C2FCF911F910F9114\r
-:1013000008950F931F93CF938C0128D180E8F9D0D3\r
-:10131000C82F86EEF6D0C82BF8018081F2D0C82BFA\r
-:101320002AD18C2FCF911F910F910895CF92DF92E8\r
-:10133000FF920F931F93CF93DF9300D0CDB7DEB70B\r
-:10134000182F6B010BD180E8DCD0F82E112319F097\r
-:10135000113029F007C085EFD4D0F82A03C083EFFD\r
-:10136000D0D0F82AFBD02FEF81EE94E021508040BE\r
-:101370009040E1F700C0000001E010E00FC0EED0A7\r
-:10138000EFEFF1EE24E0E150F0402040E1F700C043\r
-:1013900000000F5F1F4F0531110539F081E8B1D012\r
-:1013A000843069F30431110518F08F2D8260F82E16\r
-:1013B00081E0C1D0898381E0BED0282F8A838981D2\r
-:1013C00030E0382BF6013183208380E0B4D0482F01\r
-:1013D00062E0CE01019652DFF82ACDD08F2D0F901A\r
-:1013E0000F90DF91CF911F910F91FF90DF90CF90E1\r
-:1013F0000895CF93B3D080E884D0C82F8EEF81D0EA\r
-:10140000C82BB9D08FE295E70197F1F700C0000033\r
-:101410008C2FCF9108958C7FBC0180E090E0ABD100\r
-:1014200020E030E04AEF5AE37DD220E030E040ECAB\r
-:1014300050E4A3D008958C7FBC0180E090E09BD164\r
-:1014400022E538EB4FE25BE36DD226E636E64BE36E\r
-:1014500052E493D00895CF93DF93D82FC62F7ED038\r
-:101460008CE64FD08D2F80684CD08C2F4AD083D003\r
-:10147000DF91CF910895CF93DF9370D08DE641D067\r
-:1014800085ED8A95F1F7000081E055D08F70C82F67\r
-:10149000D0E0DC2FCC2780E04ED0C82B6CD0CE0122\r
-:1014A000DF91CF910895DE9ADC9AD49AD69A8FEF85\r
-:1014B0008FB98AE28DB980EF8EB908958EB98BE22B\r
-:1014C0009CE19A95F1F78DB9CC9BFECF9DE09A9562\r
-:1014D000F1F78DB9769BF4CF8CE18A95F1F78FB156\r
-:1014E0009FEF9FB9D69A0895DE98DC9ACC9BFECFE9\r
-:1014F0008DE08A95F1F7DE9A8CE18A95F1F781E02B\r
-:101500000895DC988FB980EFD9DFD6988EEFD6DFBB\r
-:10151000982F917080FF0DC080910D0180FF05C054\r
-:1015200086E080930D0192E004C085E080930D0178\r
-:1015300092E0892F0895CF93DF93D82FD69880EF2C\r
-:10154000BDDFC82FD11103C08FEF8FB901C01FB805\r
-:101550008EEFB4DF8C2FDF91CF910895DC9ACC9B76\r
-:10156000FECF8DE08A95F1F7DE988DE08A95F1F750\r
-:10157000DC98DE9A0895B8DF08955058BB27AA2753\r
-:101580000ED04DC13ED130F043D120F031F49F3F19\r
-:1015900011F41EF433C10EF4E095E7FB29C1E92FE5\r
-:1015A0004FD180F3BA17620773078407950718F0C5\r
-:1015B00071F49EF567C10EF4E0950B2EBA2FA02DA5\r
-:1015C0000B01B90190010C01CA01A0011124FF27F0\r
-:1015D000591B99F0593F50F4503E68F11A16F040EB\r
-:1015E000A22F232F342F4427585FF3CF46953795EA\r
-:1015F0002795A795F0405395C9F77EF41F16BA0BAF\r
-:10160000620B730B840BBAF09150A1F0FF0FBB1F5C\r
-:10161000661F771F881FC2F70EC0BA0F621F731FA5\r
-:10162000841F48F4879577956795B795F7959E3F02\r
-:1016300008F0B3CF9395880F08F09927EE0F979590\r
-:10164000879508950CD0EBC0E3D040F0DAD030F0AD\r
-:1016500021F45F3F19F0CCC0511115C1CFC0F0D0BB\r
-:1016600098F39923C9F35523B1F3951B550BBB2769\r
-:10167000AA2762177307840738F09F5F5F4F220F16\r
-:10168000331F441FAA1FA9F333D00E2E3AF0E0E80F\r
-:1016900030D091505040E695001CCAF729D0FE2F5B\r
-:1016A00027D0660F771F881FBB1F261737074807ED\r
-:1016B000AB07B0E809F0BB0B802DBF01FF279358A3\r
-:1016C0005F4F2AF09E3F510568F092C0DCC05F3F3B\r
-:1016D000ECF3983EDCF3869577956795B795F7958B\r
-:1016E0009F5FC9F7880F911D9695879597F9089583\r
-:1016F000E1E0660F771F881FBB1F6217730784071F\r
-:10170000BA0720F0621B730B840BBA0BEE1F88F72D\r
-:10171000E095089504D06894B111B5C0089598D0AB\r
-:1017200088F09F5790F0B92F9927B751A0F0D1F0CA\r
-:10173000660F771F881F991F1AF0BA95C9F712C054\r
-:10174000B13081F09FD0B1E008959CC0672F782F11\r
-:101750008827B85F39F0B93FCCF3869577956795C0\r
-:10176000B395D9F73EF490958095709561957F4F2C\r
-:101770008F4F9F4F0895E89409C097FB3EF49095D2\r
-:101780008095709561957F4F8F4F9F4F9923A9F05A\r
-:10179000F92F96E9BB279395F695879577956795E9\r
-:1017A000B795F111F8CFFAF4BB0F11F460FF1BC02D\r
-:1017B0006F5F7F4F8F4F9F4F16C0882311F096E9C0\r
-:1017C00011C0772321F09EE8872F762F05C066236E\r
-:1017D00071F096E8862F70E060E02AF09A95660F27\r
-:1017E000771F881FDAF7880F9695879597F90895E0\r
-:1017F00097F99F6780E870E060E008959FEF80ECC4\r
-:10180000089500240A941616170618060906089566\r
-:1018100000240A9412161306140605060895092ECC\r
-:101820000394000C11F4882352F0BB0F40F4BF2B3B\r
-:1018300011F460FF04C06F5F7F4F8F4F9F4F08957B\r
-:1018400057FD9058440F551F59F05F3F71F0479571\r
-:10185000880F97FB991F61F09F3F79F08795089556\r
-:10186000121613061406551FF2CF4695F1DF08C075\r
-:10187000161617061806991FF1CF86957105610592\r
-:1018800008940895E894BB2766277727CB0197F93A\r
-:101890000895B3D008F48FEF08950EF0D2C0AECF04\r
-:1018A0006894A6CFD5DFC8F39923D1F3C6F3DF93AD\r
-:1018B000CF931F930F93FF92C92FDD2788232AF020\r
-:1018C0002197660F771F881FDAF720E030E040E8A5\r
-:1018D0005FEB9FE3883920F0803E30F021968F77D0\r
-:1018E0004DDEE2E2F0E003C049DEEFE4F0E0B7D025\r
-:1018F0008B01BE01EC01FB2E6F5771097595771FA7\r
-:10190000880B990B3ADF28E132E741E35FE315D01A\r
-:10191000AF2D9801AE01FF900F911F91CF91DF91F4\r
-:101920003EDE7DCF0AD07BCF6CDF28F071DF18F070\r
-:10193000952309F05DCF62CFA6CF82DFA8F399236C\r
-:10194000D9F35523C9F3950F50E0551FAA27EE2769\r
-:10195000FF27BB2700240894679520F4E20FF31FAC\r
-:10196000B41F0A1E220F331F441FAA1F6695A9F732\r
-:10197000779530F4F30FB41F0A1E121E08F4639516\r
-:10198000330F441FAA1F221F769599F7879520F4DD\r
-:10199000B40F0A1E121E631F440FAA1F221F331FFB\r
-:1019A0008695A9F7862F712D602D11249F575040E1\r
-:1019B0008AF0E1F088234AF0EE0FFF1FBB1F661F7D\r
-:1019C000771F881F91505040A9F79E3F510570F036\r
-:1019D0000FCF59CF5F3FECF3983EDCF386957795B8\r
-:1019E0006795B795F795E7959F5FC1F7FE2B880F31\r
-:1019F000911D9695879597F90895990F0008550FB1\r
-:101A0000AA0BE0E8FEEF16161706E807F907C0F084\r
-:101A100012161306E407F50798F0621B730B840B8C\r
-:101A2000950B39F40A2661F0232B242B252B21F466\r
-:101A300008950A2609F4A140A6958FEF811D811D06\r
-:101A400008959F3F31F0915020F4879577956795E1\r
-:101A5000B795880F911D9695879597F90895DF930F\r
-:101A6000CF931F930F93FF92EF92DF927B018C0134\r
-:101A7000689405C0DA2EEF0160DFFE01E894A591BD\r
-:101A80002591359145915591AEF3EF0188DDFE0129\r
-:101A90009701A801DA9479F7DF90EF90FF900F910A\r
-:101AA0001F91CF91DF910895AA1BBB1B51E107C085\r
-:101AB000AA1FBB1FA617B70710F0A61BB70B881FDE\r
-:101AC000991F5A95A9F780959095BC01CD0108956D\r
-:041AD000F894FFCFB8\r
-:101AD4000A010106050804070708010000000000C8\r
-:101AE40000000801000000000000010000000000E8\r
-:101AF400000026A3D9840016056728A3D9840016FC\r
-:021B04000518C2\r
-:00000001FF\r
--- /dev/null
+# Hey Emacs, this is a -*- makefile -*-
+
+# AVR-GCC Makefile template, derived from the WinAVR template (which
+# is public domain), believed to be neutral to any flavor of "make"
+# (GNU make, BSD make, SysV make)
+
+
+MCU = attiny84
+FORMAT = ihex
+TARGET = DS18B20_VOC_DS2438_SHT
+SRC = ../common/calibr.c DS18B20_DS2438.c ../common/I2C/SHT2x.c ../common/I2C/MAX1164x.c ../common/I2C/USI_TWI_Master.c
+ASRC = ../common/OWDS18B20_DS2438.S
+
+# Name of this Makefile (used for "make depend").
+MAKEFILE = Makefile
+
+
+CFLAGS = -x c -funsigned-char -funsigned-bitfields -I. -O1 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -Wall -std=gnu99 -MD -MP
+
+#ASFLAGS = -Wa,-adhlns=$(<:.S=.lst),-gstabs
+
+
+#Additional libraries.
+
+# Minimalistic printf version
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
+
+# Floating point printf version (requires MATH_LIB = -lm below)
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
+
+PRINTF_LIB =
+
+# Minimalistic scanf version
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
+
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
+
+SCANF_LIB =
+
+MATH_LIB = -lm
+
+# External memory options
+
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),
+# used for variables (.data/.bss) and heap (malloc()).
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff
+
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),
+# only used for heap (malloc()).
+#EXTMEMOPTS = -Wl,--defsym=__heap_start=0x801100,--defsym=__heap_end=0x80ffff
+
+EXTMEMOPTS =
+
+#LDMAP = $(LDFLAGS) -Wl,-Map=$(TARGET).map,--cref
+#LDFLAGS = $(EXTMEMOPTS) $(LDMAP) $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
+LDFLAGS = -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=$(MCU)
+
+# Programming support using avrdude. Settings and variables.
+
+AVRDUDE_PROGRAMMER = stk500
+AVRDUDE_PORT = /dev/term/a
+
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
+
+
+# Uncomment the following if you want avrdude's erase cycle counter.
+# Note that this counter needs to be initialized first using -Yn,
+# see avrdude manual.
+#AVRDUDE_ERASE_COUNTER = -y
+
+# Uncomment the following if you do /not/ wish a verification to be
+# performed after programming the device.
+#AVRDUDE_NO_VERIFY = -V
+
+# Increase verbosity level. Please use this when submitting bug
+# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
+# to submit bug reports.
+#AVRDUDE_VERBOSE = -v -v
+
+AVRDUDE_BASIC = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
+AVRDUDE_FLAGS = $(AVRDUDE_BASIC) $(AVRDUDE_NO_VERIFY) $(AVRDUDE_VERBOSE) $(AVRDUDE_ERASE_COUNTER)
+
+
+CC = avr-gcc
+OBJCOPY = avr-objcopy
+OBJDUMP = avr-objdump
+SIZE = avr-size
+NM = avr-nm
+AVRDUDE = avrdude
+REMOVE = rm -f
+MV = mv -f
+
+# Define all object files.
+OBJ = $(SRC:.c=.o) $(ASRC:.S=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(SRC:.c=.lst)
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS)
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: build
+
+build: elf hex eep
+
+elf: $(TARGET).elf
+hex: $(TARGET).hex
+eep: $(TARGET).eep
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+
+# Program the device.
+program: $(TARGET).hex $(TARGET).eep
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
+
+
+
+
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
+COFFCONVERT=$(OBJCOPY) --debugging \
+--change-section-address .data-0x800000 \
+--change-section-address .bss-0x800000 \
+--change-section-address .noinit-0x800000 \
+--change-section-address .eeprom-0x810000
+
+
+coff: $(TARGET).elf
+ $(COFFCONVERT) -O coff-avr $(TARGET).elf $(TARGET).cof
+
+
+extcoff: $(TARGET).elf
+ $(COFFCONVERT) -O coff-ext-avr $(TARGET).elf $(TARGET).cof
+
+
+.SUFFIXES: .elf .hex .eep .lss .sym
+
+.elf.hex:
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
+
+.elf.eep:
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
+ --change-section-lma .eeprom=0 -O $(FORMAT) $< $@
+
+# Create extended listing file from ELF output file.
+.elf.lss:
+ $(OBJDUMP) -h -S $< > $@
+
+# Create a symbol table from ELF output file.
+.elf.sym:
+ $(NM) -n $< > $@
+
+
+
+# Link: create ELF output file from object files.
+$(TARGET).elf: $(OBJ)
+ $(CC) $(OBJ) --output $@ $(LDFLAGS)
+
+
+# Compile: create object files from C source files.
+.c.o:
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files.
+.c.s:
+ $(CC) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files.
+.S.o:
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+
+# Target: clean project.
+clean:
+ $(REMOVE) $(TARGET).hex $(TARGET).eep $(TARGET).cof $(TARGET).elf \
+ $(TARGET).map $(TARGET).sym $(TARGET).lss \
+ $(OBJ) $(LST) $(SRC:.c=.s) $(SRC:.c=.d)
+
+depend:
+ if grep '^# DO NOT DELETE' $(MAKEFILE) >/dev/null; \
+ then \
+ sed -e '/^# DO NOT DELETE/,$$d' $(MAKEFILE) > \
+ $(MAKEFILE).$$$$ && \
+ $(MV) $(MAKEFILE).$$$$ $(MAKEFILE); \
+ fi
+ echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' \
+ >> $(MAKEFILE); \
+ $(CC) -M -mmcu=$(MCU) $(CDEFS) $(CINCS) $(SRC) $(ASRC) >> $(MAKEFILE)
+
+.PHONY: all build elf hex eep lss sym program coff extcoff clean depend
+
+
--- /dev/null
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Atmel Studio Solution File, Format Version 11.00
+VisualStudioVersion = 14.0.23107.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "DS2450", "DS2450.cproj", "{DCE6C7E3-EE26-4D79-826B-08594B9AD897}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|AVR = Debug|AVR
+ Release|AVR = Release|AVR
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.ActiveCfg = Debug|AVR
+ {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Debug|AVR.Build.0 = Debug|AVR
+ {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.ActiveCfg = Release|AVR
+ {DCE6C7E3-EE26-4D79-826B-08594B9AD897}.Release|AVR.Build.0 = Release|AVR
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
--- /dev/null
+<?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" />
+</Project>
\ No newline at end of file
\r
\r
}\r
+\r
+int32_t bmp280ReadPressure_simple() {\r
+ uint8_t msb, lsb,xlsb;\r
+ volatile int32_t data;\r
+ I2c_StartCondition();\r
+ I2c_WriteByte(0xEC);\r
+ I2c_WriteByte(0xF7);\r
+ I2c_StopCondition();\r
+ I2c_StartCondition();\r
+ I2c_WriteByte(0xED);\r
+ msb=I2c_ReadByte(ACK);\r
+ lsb=I2c_ReadByte(ACK);\r
+ xlsb=I2c_ReadByte(NO_ACK);\r
+ I2c_StopCondition();\r
+ \r
+ data = (int32_t)msb << 12;\r
+ data |= (int16_t)lsb<<4;\r
+ data|=xlsb>>4;\r
+ \r
+ return data;\r
+\r
+\r
+}\r
+\r
void bmp280ConvertInt(int32_t * temperature,uint32_t *pressure,uint8_t oss) {\r
int32_t var1,var2,T,t_fine;\r
\r
*pressure=p;\r
\r
}\r
+\r
void bmp280Convert(double * temperature, double * pressure,uint8_t oss) {\r
\r
uint32_t p;\r
*pressure=p/100.0;\r
}\r
\r
- \r
- \r
+void bmp280ConvertIntP(int32_t temp256,uint32_t *pressure) {\r
+ int32_t var1,var2,t_fine;\r
+ //T = (t_fine * 5 + 128) >> 8;\r
+ t_fine=((temp256)-128)/5;\r
+ int32_t adc_P= bmp280ReadPressure_simple();\r
+ uint32_t p;\r
+ var1 = (((int32_t)t_fine)>>1) - (int32_t)64000;\r
+ var2 = (((var1>>2) * (var1>>2)) >> 11 ) * ((int32_t)dig_P6);\r
+ var2 = var2 + ((var1*((int32_t)dig_P5))<<1);\r
+ var2 = (var2>>2)+(((int32_t)dig_P4)<<16);\r
+ var1 = (((dig_P3 * (((var1>>2) * (var1>>2)) >> 13 )) >> 3) + ((((int32_t)dig_P2) * var1)>>1))>>18;\r
+ var1 =((((32768+var1))*((int32_t)dig_P1))>>15);\r
+ if (var1 == 0) {\r
+ return ; // avoid exception caused by division by zero\r
+ }\r
+ p = (((uint32_t)(((int32_t)1048576)-adc_P)-(var2>>12)))*3125;\r
+ if (p < 0x80000000){\r
+ p = (p << 1) / ((uint32_t)var1);\r
+ }else{\r
+ p = (p / (uint32_t)var1) * 2;\r
+ }\r
+ var1 = (((int32_t)dig_P9) * ((int32_t)(((p>>3) * (p>>3))>>13)))>>12;\r
+ var2 = (((int32_t)(p>>2)) * ((int32_t)dig_P8))>>13;\r
+ p = (uint32_t)((int32_t)p + ((var1 + var2 + dig_P7) >> 4));\r
+ *pressure=p;\r
\r
+} \r
+ \r
+void bmp280ConvertIntP1(uint32_t *pressure) {\r
+ int32_t var1,var2,T,t_fine;\r
\r
+ \r
+ int32_t adc_T=bmp280ReadTemp();\r
+ var1 = ((((adc_T>>3) - ((int32_t)dig_T1<<1))) * ((int32_t)dig_T2)) >> 11;\r
+ var2 = ((((((adc_T>>4) - ((int32_t)dig_T1)) * ((adc_T>>4) - (int32_t)dig_T1))) >> 12) *((int32_t)dig_T3)) >> 14;\r
+ t_fine = var1 + var2;\r
+ T = (t_fine * 5 + 128) >> 8;\r
+ int32_t adc_P= bmp280ReadPressure_simple();\r
+ uint32_t p;\r
+ var1 = (((int32_t)t_fine)>>1) - (int32_t)64000;\r
+ var2 = (((var1>>2) * (var1>>2)) >> 11 ) * ((int32_t)dig_P6);\r
+ var2 = var2 + ((var1*((int32_t)dig_P5))<<1);\r
+ var2 = (var2>>2)+(((int32_t)dig_P4)<<16);\r
+ var1 = (((dig_P3 * (((var1>>2) * (var1>>2)) >> 13 )) >> 3) + ((((int32_t)dig_P2) * var1)>>1))>>18;\r
+ var1 =((((32768+var1))*((int32_t)dig_P1))>>15);\r
+ if (var1 == 0) {\r
+ return ; // avoid exception caused by division by zero\r
+ }\r
+ p = (((uint32_t)(((int32_t)1048576)-adc_P)-(var2>>12)))*3125;\r
+ if (p < 0x80000000){\r
+ p = (p << 1) / ((uint32_t)var1);\r
+ }else{\r
+ p = (p / (uint32_t)var1) * 2;\r
+ }\r
+ var1 = (((int32_t)dig_P9) * ((int32_t)(((p>>3) * (p>>3))>>13)))>>12;\r
+ var2 = (((int32_t)(p>>2)) * ((int32_t)dig_P8))>>13;\r
+ p = (uint32_t)((int32_t)p + ((var1 + var2 + dig_P7) >> 4));\r
+ *pressure=p;\r
+\r
+}\r
void bmp280Init(void);\r
int32_t bmp280ReadTemp(void);\r
int32_t bmp280ReadPressure(uint8_t oss);\r
+int32_t bmp280ReadPressure_simple();\r
void bmp280Convert(double * temperature, double * pressure,uint8_t oss);\r
void bmp280ConvertInt(int32_t * temperature,uint32_t *pressure,uint8_t oss);\r
+void bmp280ConvertIntP(int32_t temp256,uint32_t *pressure) ;\r
+void bmp280ConvertIntP1(uint32_t *pressure) ;\r
\r
-\r
-#endif
\ No newline at end of file
+#endif\r
--- /dev/null
+
+// Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the
+// distribution.
+// * All advertising materials mentioning features or use of this
+// software must display the following acknowledgement: This product
+// includes software developed by tm3d.de and its contributors.
+// * Neither the name of tm3d.de nor the names of its contributors may
+// be used to endorse or promote products derived from this software
+// without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+//#define _CHANGEABLE_ID_
+#define _ZERO_POLLING_
+
+#include "../common/OWConfig.s"
+#include "../common/OWCRC16.s"
+
+.extern pack,8
+.comm addr,1 ;zweites Adressbyte ist unnoetig (Warum auch immer fuer 32 Byte 16 Bit Adressen verwendet werden....)
+.comm crcsave,1 ; zwischenspeicherspeicher fuer crc nur zweites byte....
+//.extern am2302_temp,2
+
+
+
+.macro CHIP_INIT
+.endm
+
+.macro COMMAND_TABLE
+ rjmp h_readmemoryaddr
+ rjmp h_readmemory
+ rjmp h_readmemorycrc1
+ rjmp h_readmemorycrc2
+ rjmp h_writememoryaddr
+ rjmp h_writememory
+ rjmp h_writememorycrc1
+ rjmp h_writememorycrc2
+ rjmp h_writememoryreadback
+ rjmp h_convert
+ rjmp h_convertcrc1
+ rjmp h_convertcrc2
+ rjmp h_convert_conv
+.endm
+
+#include "../common/OWRomFunctions.s"
+#include "../common/OWTimerInterrupt.s"
+
+
+
+; Ab hier Geraeteabhaenging
+#define OW_READ_MEMORY_ADDR OW_FIRST_COMMAND+0
+#define OW_READ_MEMORY OW_FIRST_COMMAND+1
+#define OW_READ_MEMORY_CRC1 OW_FIRST_COMMAND+2
+#define OW_READ_MEMORY_CRC2 OW_FIRST_COMMAND+3
+#define OW_WRITE_MEMORY_ADDR OW_FIRST_COMMAND+4
+#define OW_WRITE_MEMORY OW_FIRST_COMMAND+5
+#define OW_WRITE_MEMORY_CRC1 OW_FIRST_COMMAND+6
+#define OW_WRITE_MEMORY_CRC2 OW_FIRST_COMMAND+7
+#define OW_WRITE_MEMORY_READBACK OW_FIRST_COMMAND+8
+#define OW_CONVERT OW_FIRST_COMMAND+9
+#define OW_CONVERT_CRC1 OW_FIRST_COMMAND+10
+#define OW_CONVERT_CRC2 OW_FIRST_COMMAND+11
+#define OW_CONVERT_CONV OW_FIRST_COMMAND+12
+
+;---------------------------------------------------
+; READ COMMAND and start operation
+;---------------------------------------------------
+
+
+h_readcommand:
+ clr r_bytep
+#ifndef _DIS_FLASH_
+ FLASH_COMMANDS ; muss zu erst sein....
+#endif
+ cset 0xAA,OW_READ_MEMORY_ADDR
+ cset 0x55,OW_WRITE_MEMORY_ADDR
+ cset 0x3C,OW_CONVERT
+ FW_CONFIG_INFO
+#ifdef _CHANGEABLE_ID_
+ CHANGE_ID_COMMANDS
+#endif
+ ldi r_mode,OW_SLEEP
+ rjmp handle_end
+
+
+h_readmemoryaddr:
+ cpi r_bytep,0 ;erstes Adressbyte ?
+ brne h_readmemory_addr_byte1 ;nein dann weiter
+ andi r_rwbyte,0x1F ; nur Adressen zwischen 0 und 0x1F zulassen
+ sts addr,r_rwbyte ;speichern des ersten bytes
+ rjmp handle_end_inc
+h_readmemory_addr_byte1: ;zweiters Addressbyte wird nicht gespeichert!
+ ldi r_mode,OW_READ_MEMORY ;weiter zu read Memory
+ ;;ldi r_bcount,1 ;ist unten
+ ldi r_sendflag,1 ;jetzt sendet der Slave zum Master
+ clr r_bytep
+ rjmp h_readmemory2
+h_readmemory:
+ lds r_bytep,addr
+ inc r_bytep
+ sts addr,r_bytep
+ andi r_bytep,0x07
+ breq h_readmemory_init_crc
+h_readmemory2:
+ lds r_bytep,addr
+ ;andi r_bytep,0x1F ist oben
+ configZ pack,r_bytep
+ ld r_rwbyte,Z
+ ;ldi r_bcount,1
+ rjmp handle_end ;sendet das Byte und geht zu h_readmemory
+h_readmemory_init_crc:; init erstes CRC byte
+ lds r_rwbyte,crc
+ com r_rwbyte
+ lds r_temp,crc+1
+ com r_temp
+ sts crcsave,r_temp
+ ldi r_mode,OW_READ_MEMORY_CRC1
+ ;ldi r_bcount,1
+ rjmp handle_end
+h_readmemory_end:
+ ldi r_mode,OW_SLEEP
+ clr r_sendflag
+ rjmp handle_end
+h_readmemorycrc1:;init zweites CRC Byte
+ lds r_rwbyte,crcsave
+ ;ldi r_bcount,1
+ ldi r_mode,OW_READ_MEMORY_CRC2
+ rjmp handle_end
+h_readmemorycrc2:;weiteres senden..... nach zweitem Byte
+ lds r_temp,addr
+ andi r_temp,0xE0
+ brne h_readmemory_end; ende des speichers
+ ldi r_mode,OW_READ_MEMORY
+ CRCInit1 ;Start with new CRC
+ rjmp h_readmemory2
+
+h_writememoryaddr:
+ cpi r_bytep,0 ;erstes Adressbyte ?
+ brne h_writememory_addr_byte1 ;nein dann weiter
+ andi r_rwbyte,0x1F ; nur Adressen zwischen 0 und 0x1F zulassen
+ sts addr,r_rwbyte ;speichern des ersten bytes
+ inc r_bytep
+ ;ldi r_bcount,1
+ rjmp handle_end
+h_writememory_addr_byte1: ;zweiters Addressbyte wird nicht gespeichert!
+ ldi r_mode,OW_WRITE_MEMORY ;weiter zu read Memory
+ ;ldi r_bcount,1 ;; _________________________________________________in handle_end integrieren.....
+ lds r_bytep,addr
+ rjmp handle_end ;read Memory Byte
+h_writememory:
+ lds r_bytep,addr
+ configZ pack,r_bytep
+ st Z,r_rwbyte
+ ;ldi r_bcount,1
+ ldi r_mode,OW_WRITE_MEMORY_CRC1
+ ldi r_sendflag,1 ;jetzt sendet der Slave zum Master
+ lds r_rwbyte,crc
+ com r_rwbyte
+ lds r_temp,crc+1
+ com r_temp
+ sts crcsave,r_temp
+ rjmp handle_end
+h_writememorycrc1:
+ lds r_rwbyte,crcsave
+ ;ldi r_bcount,1
+ ldi r_mode,OW_WRITE_MEMORY_CRC2
+ rjmp handle_end
+h_writememorycrc2:
+ lds r_temp,addr
+ configZ pack,r_temp
+ ld r_rwbyte,Z
+ ;ldi r_bcount,1
+ ldi r_mode,OW_WRITE_MEMORY_READBACK
+ rjmp handle_end
+h_writememoryreadback:
+ ldi r_temp,0x00
+ sts crc+1,r_temp
+ lds r_temp,addr
+ inc r_temp
+ sts addr,r_temp
+ sts crc,r_temp
+ ldi r_sendflag,0
+ ;ldi r_bcount,1
+ ldi r_mode,OW_WRITE_MEMORY
+ rjmp handle_end
+
+h_convert:
+ cpi r_bytep,0 ;erstes Adressbyte ?
+ brne h_convert_byte1 ;nein dann weiter
+ inc r_bytep
+ sts pack+0x20,r_rwbyte
+ ;ldi r_bcount,1
+ rjmp handle_end
+h_convert_byte1: ;zweies byte glesen go crc#
+ sts pack+0x21,r_rwbyte
+ lds r_rwbyte,crc
+ com r_rwbyte
+ lds r_temp,crc+1
+ com r_temp
+ sts crcsave,r_temp
+ ldi r_mode,OW_CONVERT_CRC1
+ ;ldi r_bcount,1
+ ldi r_sendflag,1
+ rjmp handle_end
+h_convertcrc1:
+ lds r_rwbyte,crcsave
+ ;ldi r_bcount,1
+ ldi r_mode,OW_CONVERT_CRC2
+ rjmp handle_end
+h_convertcrc2:
+ ldi r_temp,1
+ sts gcontrol,r_temp
+ ;ldi r_bcount,1
+ ldi r_mode,OW_CONVERT_CONV
+ ;clr r_sendflag
+ ldi r_sendflag,3 ;set bit 0 and 1 for no zero polling
+h_convert_conv:
+ ldi r_bcount,0
+ ldi r_rwbyte,0
+ rjmp handle_end_no_bcount
+
+
+
+
+#include "../common/OWPinInterrupt.s"
+.end
\ No newline at end of file
--- /dev/null
+avrdude -c atmelice_isp -p t84 -U lfuse:w:0xE2:m -U hfuse:w:0xDE:m -U efuse:w:0xFE:m
+avrdude -c atmelice_isp -p t84 -e -U flash:w:"../programmer/Release/programmer.hex"
--- /dev/null
+avrdude -c usbasp -p t84 -U lfuse:w:0xE2:m -U hfuse:w:0xDE:m -U efuse:w:0xFE:m
+avrdude -c usbasp -p t84 -e -U flash:w:"/media/muto/Daten/oc/dev/owSlave2/programmer/flash/programmer.hex"