New I2C devices
[owSlave2.git] / DS2450 / DS2450.c
index cf4e588..e2fb6c3 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[16]={0x06,0x09,0x06,0x09,0x06,0x09,0x06,0x09,0x02,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
@@ -125,11 +125,16 @@ int main(void){
        pack.HD=0xFF;\r
        pack.LD=0x00;\r
        pack.VCCP=0;\r
+\r
+       PORTA=0xFF;\r
+       PORTB=0xFF;\r
+\r
        OWINIT();\r
 \r
        MCUCR &=~(1<<PUD); //All Pins Pullup...\r
        MCUCR |=(1<<BODS);\r
-       PORTA&=~((1<<PINA0)|(1<<PINA1)|(1<<PINA2)|(1<<PINA3));\r
+       //PORTA&=~((1<<PINA0)|(1<<PINA1)|(1<<PINA2)|(1<<PINA3));\r
+\r
        ADCSRA=(1<<ADEN)|(1<ADPS0)|(1<<ADPS2);\r
 \r
        \r