From: Tobias Date: Thu, 1 Oct 2015 13:47:47 +0000 (+0200) Subject: *** SET 1-Wire Flasher Address from 0x0EE0 to 0x0EC0 **** for more freedom to impleme... X-Git-Url: https://git.smho.de/?a=commitdiff_plain;h=6aa7a2df05f4f65bf6c7260487a470798a5ed1b1;p=owSlave2.git *** SET 1-Wire Flasher Address from 0x0EE0 to 0x0EC0 **** for more freedom to implement new featuers in the Flasher MAX44009 with two Adresses for front an back Atmel Studio 7.0 --- diff --git a/DS18B20_BMP280/DS18B20_BMP280.cproj b/DS18B20_BMP280/DS18B20_BMP280.cproj index d5732dc..a6eb656 100644 --- a/DS18B20_BMP280/DS18B20_BMP280.cproj +++ b/DS18B20_BMP280/DS18B20_BMP280.cproj @@ -2,7 +2,7 @@ 2.0 - 6.2 + 7.0 com.Atmel.AVRGCC8.C {7a5672fe-8226-4158-b931-e1f36b9a8858} ATtiny84A @@ -62,61 +62,76 @@ Simulator + - True - True - True - True - False - True - True - - - NDEBUG - - - Optimize for size (-Os) - True - True - True - - - libm - - - + -mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a" + True + True + True + True + False + True + True + + + DEBUG + + + + + %24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include + + + Optimize (-O1) + True + True + Default (-g2) + True + + + libm + + + Default (-Wa,-g) + - True - True - True - True - False - True - True - - - DEBUG - - - Optimize (-O1) - True - True - Default (-g2) - True - - - libm - - - Default (-Wa,-g) - + -mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a" + True + True + True + True + False + True + True + + + DEBUG + + + + + %24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include + + + Optimize (-O1) + True + True + Default (-g2) + True + + + libm + + + Default (-Wa,-g) + diff --git a/DS18B20_BMP280/OWDS18B20.S b/DS18B20_BMP280/OWDS18B20.S index 0ad51b6..27aa8d2 100644 --- a/DS18B20_BMP280/OWDS18B20.S +++ b/DS18B20_BMP280/OWDS18B20.S @@ -33,6 +33,7 @@ #define _CHANGEABLE_ID_ #define _ZERO_POLLING_ +//#define _DB_ #include "../common/OWConfig.s" #include "../common/OWCRC8.s" diff --git a/DS18B20_MAX44009/DS18B20_MAX44009.c b/DS18B20_MAX44009/DS18B20_MAX44009.c index 3bd4e66..f4bd316 100644 --- a/DS18B20_MAX44009/DS18B20_MAX44009.c +++ b/DS18B20_MAX44009/DS18B20_MAX44009.c @@ -108,7 +108,7 @@ int main(void){ while(1) { if (gcontrol) { - volatile double l=MAX44009getlux(); + volatile double l=MAX44009getlux(1); if (l<0.030) l=0.030; //Darf nicht 0 sein. minimum -35°C Sensor minimum 0.045 //double l=1000; l=log(l)*10*16; diff --git a/DS18B20_MAX44009/DS18B20_MAX44009.cproj b/DS18B20_MAX44009/DS18B20_MAX44009.cproj index a5cba43..7d4b820 100644 --- a/DS18B20_MAX44009/DS18B20_MAX44009.cproj +++ b/DS18B20_MAX44009/DS18B20_MAX44009.cproj @@ -2,7 +2,7 @@ 2.0 - 6.2 + 7.0 com.Atmel.AVRGCC8.C {7a5672fe-8226-4158-b931-e1f36b9a8858} ATtiny84A @@ -62,61 +62,76 @@ Simulator + - True - True - True - True - False - True - True - - - NDEBUG - - - Optimize for size (-Os) - True - True - True - - - libm - - - + -mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a" + True + True + True + True + False + True + True + + + DEBUG + + + + + %24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include + + + Optimize (-O1) + True + True + Default (-g2) + True + + + libm + + + Default (-Wa,-g) + - True - True - True - True - False - True - True - - - DEBUG - - - Optimize (-O1) - True - True - Default (-g2) - True - - - libm - - - Default (-Wa,-g) - + -mmcu=attiny84a -B "%24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\gcc\dev\attiny84a" + True + True + True + True + False + True + True + + + DEBUG + + + + + %24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\include + + + Optimize (-O1) + True + True + Default (-g2) + True + + + libm + + + Default (-Wa,-g) + diff --git a/common/I2C/MAX44009.c b/common/I2C/MAX44009.c index eabcda6..8ec682d 100644 --- a/common/I2C/MAX44009.c +++ b/common/I2C/MAX44009.c @@ -38,22 +38,22 @@ #include "USI_TWI_Master.h" #include "MAX44009.h" -double MAX44009getlux() { +double MAX44009getlux(uint8_t nr) { volatile uint8_t b1,b2; - + nr=(nr<<1)&0x02f; I2c_StartCondition(); - I2c_WriteByte(0b10010100); + I2c_WriteByte(0b10010100|nr); I2c_WriteByte(0x03); I2c_StartCondition(); - I2c_WriteByte (0b10010101); + I2c_WriteByte (0b10010101|nr); b1 =I2c_ReadByte(NO_ACK); I2c_StopCondition(); I2c_StartCondition(); - I2c_WriteByte(0b10010100); + I2c_WriteByte(0b10010100|nr); I2c_WriteByte(0x04); I2c_StartCondition(); - I2c_WriteByte (0b10010101); + I2c_WriteByte (0b10010101|nr); b2 =I2c_ReadByte(NO_ACK); I2c_StopCondition(); uint8_t exponent = (b1 & 0xF0) >> 4;// upper four bits of high byte register diff --git a/common/I2C/MAX44009.h b/common/I2C/MAX44009.h index 370637f..53e234c 100644 --- a/common/I2C/MAX44009.h +++ b/common/I2C/MAX44009.h @@ -32,7 +32,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -double MAX44009getlux(); +double MAX44009getlux(uint8_t nr); #endif \ No newline at end of file diff --git a/common/OWRomFunctions.s b/common/OWRomFunctions.s index aa7891d..0b1488d 100644 --- a/common/OWRomFunctions.s +++ b/common/OWRomFunctions.s @@ -165,7 +165,7 @@ hrc_jmp_flasher: lds r_temp,flashmarker cpi r_temp,2 brne hrc_jmp_flasher_inc - ldi r_temp,0xE0 + ldi r_temp,0xC0 push r_temp ldi r_temp,0x0E push r_temp @@ -453,7 +453,7 @@ OWINIT: sbic _SFR_IO_ADDR(PINA),PINA5 rjmp owinit_botest_end ;PINA5 nicht 0.... nicht verbunden cbi _SFR_IO_ADDR(DDRA),PINA4 - ldi r_temp,0xE0 + ldi r_temp,0xC0 push r_temp ldi r_temp,0x0E push r_temp diff --git a/programmer/programmer/programmer.asm b/programmer/programmer/programmer.asm index 4bd530a..3bf5f2d 100644 --- a/programmer/programmer/programmer.asm +++ b/programmer/programmer/programmer.asm @@ -82,8 +82,7 @@ jreset: reti ; -.ORG 0x0EE0 - +.ORG 0x0EC0 start: cli @@ -219,10 +218,10 @@ pro_stable: pro_read_rom_command: ldi mode,OWM_SLEEP - //cpi rwbyte,0xCC - //brne pro_rcc_1 - //ldi mode,OWM_READ_COMMAND - //rjmp pro_out_bitp1 + cpi rwbyte,0xCC + brne pro_rcc_1 + ldi mode,OWM_READ_COMMAND + rjmp pro_out_bitp1 pro_rcc_1: cpi rwbyte,0xF0 ;Searchrom brne pro_rcc_2 diff --git a/programmer/programmer/programmer.asmproj b/programmer/programmer/programmer.asmproj index 592cc91..509f82c 100644 --- a/programmer/programmer/programmer.asmproj +++ b/programmer/programmer/programmer.asmproj @@ -2,7 +2,7 @@ 2.0 - 6.2 + 7.0 com.Atmel.AVRAssembler {73dcf55e-6410-4dea-8872-ee17f76dd05a} none @@ -43,29 +43,43 @@ 100000 - 8000 + 0 debugWIRE com.atmel.avrdbg.tool.atmelice - J41800000779 + J41800000789 Atmel-ICE debugWIRE + - (%24IncludeFile) - + + + %24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc + %24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc + + + tn84adef.inc + Executable - (%24IncludeFile) - + + + %24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc + %24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc + %24(PackRepoDir)\atmel\ATtiny_DFP\1.0.68\avrasm\inc + + + tn84adef.inc +