From: Tobias Date: Thu, 15 Oct 2015 13:31:17 +0000 (+0200) Subject: same .S files for same device in common folder X-Git-Url: https://git.smho.de/?a=commitdiff_plain;h=cd30cdb18cadc2525618a111ca657d2ed18bc3f3;p=owSlave2.git same .S files for same device in common folder --- diff --git a/DS18B20_BMP280/DS18B20_BMP280.cproj b/DS18B20_BMP280/DS18B20_BMP280.cproj index a6eb656..972c6c0 100644 --- a/DS18B20_BMP280/DS18B20_BMP280.cproj +++ b/DS18B20_BMP280/DS18B20_BMP280.cproj @@ -67,71 +67,71 @@ - -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) - + -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) + - -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) - + -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) + @@ -139,6 +139,10 @@ compile BMP280.c + + compile + OWDS18B20.S + compile USI_TWI_Master.c @@ -146,9 +150,6 @@ compile - - compile - \ No newline at end of file diff --git a/DS18B20_BMP280/OWDS18B20.S b/DS18B20_BMP280/OWDS18B20.S deleted file mode 100644 index f0331cf..0000000 --- a/DS18B20_BMP280/OWDS18B20.S +++ /dev/null @@ -1,241 +0,0 @@ - -// 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/OWCRC8.s" - -.extern pack,8 - -//.extern am2302_temp,2 - - - -.macro CHIP_INIT -Init_EEPROM_read: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp Init_EEPROM_read - ldi r_temp,0 - out _SFR_IO_ADDR(EEARH), r_temp - ldi r_temp,2 - out _SFR_IO_ADDR(EEARL), r_temp - sbi _SFR_IO_ADDR(EECR), EERE - in r_temp,_SFR_IO_ADDR(EEDR) - sbrs r_temp,7 - rcall hrc_recall_eeprom_func -.endm - -.macro COMMAND_TABLE - rjmp h_readscratchpad - rjmp h_writescratchpad - rjmp h_convert_run -.endm - -#include "../common/OWRomFunctions.s" -#include "../common/OWTimerInterrupt.s" - - - -; Ab hier Geraeteabhaenging -#define OW_READ_SCRATCHPAD OW_FIRST_COMMAND+0 -#define OW_WRITE_SCRATCHPAD OW_FIRST_COMMAND+1 -#define OW_CONVERT_RUN OW_FIRST_COMMAND+2 - - -;--------------------------------------------------- -; READ COMMAND and start operation -;--------------------------------------------------- - - -h_readcommand: - clr r_bytep -#ifndef _DIS_FLASH_ - FLASH_COMMANDS ; muss zu erst sein.... -#endif - cjmp 0xBE,hrc_set_readscratchpad - cjmp 0x4E,hrc_set_writescratchpad - cjmp 0x44,hrc_set_convertT - cjmp 0x48,hrc_copy_scratchpad - cjmp 0xB8,hrc_recall_eeprom - FW_CONFIG_INFO -#ifdef _CHANGEABLE_ID_ - CHANGE_ID_COMMANDS -#endif - //ldi r_mode,OW_SLEEP - rjmp handle_end_sleep - -hrc_set_readscratchpad: - ldi r_mode,OW_READ_SCRATCHPAD - ldi r_sendflag,1 - CRCInit2 - rjmp h_readscratchpad - -hrc_set_writescratchpad: - ldi r_mode,OW_WRITE_SCRATCHPAD - ldi r_bytep,2 ;start to write in 2 - rjmp handle_end - -hrc_recall_eeprom: - rcall hrc_recall_eeprom_func - rjmp handle_end - - - -hrc_set_convertT: - ldi r_temp,1 - sts gcontrol,r_temp - ;lds temp,am2302_temp - //sts pack+1,temp - ;lds temp,am2302_temp+1 - //sts pack+2,temp -; ldi r_rwbyte,0 -; lds r_temp,pack -; swap r_temp -; andi r_temp,0x0F -; lds r_temp2,pack+1 -; swap r_temp2 -; andi r_temp2,0xF0 -; or r_temp,r_temp2 -; lds r_temp2,pack+2 -; cp r_temp,r_temp2 ;higher than or equal to TH -; brge hrc_set_convertT_set_arlarm -; lds r_temp2,pack+3 -; cp r_temp,r_temp2 ;lower than or equal to TL -; brlt hrc_set_convertT_set_arlarm -; breq hrc_set_convertT_set_arlarm -; rjmp hrc_set_convertT_end -;hrc_set_convertT_set_arlarm: -; ldi r_rwbyte,1 -;hrc_set_convertT_end: -; sts alarmflag,r_rwbyte - ldi r_mode,OW_CONVERT_RUN - ldi r_sendflag,3 ;set bit 0 and 1 for no zero polling -h_convert_run: - ldi r_bcount,0 - ldi r_rwbyte,0 - rjmp handle_end_no_bcount - -hrc_copy_scratchpad: - ldi r_bytep,2 - configZ pack,r_bytep - clr r_bytep -hrc_copy_scratchpad_EEPROM_write: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp hrc_copy_scratchpad_EEPROM_write - ldi r_temp, (0<compile USI_TWI_Master.c - + compile + OWDS18B20_DS2438.S - + compile diff --git a/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438.c b/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438.c index 8d995eb..5b98b1c 100644 --- a/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438.c +++ b/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438.c @@ -1,4 +1,3 @@ - // Copyright (c) 2015, Tobias Mueller tm(at)tm3d.de // All rights reserved. // diff --git a/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438_6_2.atsln b/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438_6_2.atsln deleted file mode 100644 index adaf496..0000000 --- a/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438_6_2.atsln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Atmel Studio Solution File, Format Version 11.00 -Project("{54F91283-7BC4-4236-8FF9-10F437C3AD48}") = "DS18B20_DS2438", "DS18B20_DS2438_6_2.cproj", "{7A5672FE-8226-4158-B931-E1F36B9A8858}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|AVR = Debug|AVR - Release|AVR = Release|AVR - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7A5672FE-8226-4158-B931-E1F36B9A8858}.Debug|AVR.ActiveCfg = Debug|AVR - {7A5672FE-8226-4158-B931-E1F36B9A8858}.Debug|AVR.Build.0 = Debug|AVR - {7A5672FE-8226-4158-B931-E1F36B9A8858}.Release|AVR.ActiveCfg = Release|AVR - {7A5672FE-8226-4158-B931-E1F36B9A8858}.Release|AVR.Build.0 = Release|AVR - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438_6_2.cproj b/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438_6_2.cproj deleted file mode 100644 index dec1c59..0000000 --- a/DS18B20_BMP280_DS2438_SHT/DS18B20_DS2438_6_2.cproj +++ /dev/null @@ -1,143 +0,0 @@ - - - - 2.0 - 6.2 - com.Atmel.AVRGCC8.C - {7a5672fe-8226-4158-b931-e1f36b9a8858} - ATtiny84A - none - Executable - C - $(MSBuildProjectName) - .elf - $(MSBuildProjectDirectory)\$(Configuration) - DS18B20_DS2438 - DS18B20_DS2438 - DS18B20_DS2438 - Native - true - false - true - true - 0x20000000 - - true - exception_table - 2 - 1 - - - - - - - - - - - - - com.atmel.avrdbg.tool.atmelice - - - - - debugWIRE - - com.atmel.avrdbg.tool.atmelice - J41800000779 - Atmel-ICE - - debugWIRE - - - - - - - - com.atmel.avrdbg.tool.simulator - - - Simulator - - - - - - True - True - True - True - False - True - True - - - NDEBUG - - - Optimize for size (-Os) - True - True - True - - - libm - - - - - - - - - True - True - True - True - False - True - True - - - DEBUG - - - Optimize (-O1) - True - True - Default (-g2) - True - - - libm - - - Default (-Wa,-g) - - - - - - compile - SHT2x.c - - - compile - MAX44009.c - - - compile - USI_TWI_Master.c - - - compile - - - compile - - - - \ No newline at end of file diff --git a/DS18B20_BMP280_DS2438_SHT/OWDS18B20_DS2438.S b/DS18B20_BMP280_DS2438_SHT/OWDS18B20_DS2438.S deleted file mode 100644 index e67690a..0000000 --- a/DS18B20_BMP280_DS2438_SHT/OWDS18B20_DS2438.S +++ /dev/null @@ -1,355 +0,0 @@ - -// 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_ -#define _DB_ - -#include "../common/OWConfig.s" -#include "../common/OWCRC8.s" - -.extern pack1,8 - -//.extern am2302_temp,2 - -#if defined(__AVR_ATtiny25__) -.extern pack2,16 -#else -.extern pack2,64 -#endif -.extern am2302_temp,2 -.extern am2302_hum,2 -.comm block,1 ; Block der augegeben, geschrieben wird (Parameter von READ/WRITE Scratchpad) - - -.macro CHIP_INIT -Init_EEPROM_read: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp Init_EEPROM_read - ldi r_temp,0 - out _SFR_IO_ADDR(EEARH), r_temp - ldi r_temp,2 - out _SFR_IO_ADDR(EEARL), r_temp - sbi _SFR_IO_ADDR(EECR), EERE - in r_temp,_SFR_IO_ADDR(EEDR) - sbrs r_temp,7 - rcall hrc_recall_eeprom_func1 -.endm - -.macro COMMAND_TABLE - rjmp h_readscratchpad1 - rjmp h_writescratchpad1 - rjmp h_convert_run1 - rjmp h_readscratchpad_adr2 - rjmp h_readscratchpad2 - rjmp h_writescratchpad_adr2 - rjmp h_writescratchpad2 -.endm - -#include "../common/OWRomFunctionsDual.s" -#include "../common/OWTimerInterrupt.s" - - - -; Ab hier Geraeteabhaenging -#define OW_READ_SCRATCHPAD1 OW_FIRST_COMMAND+0 -#define OW_WRITE_SCRATCHPAD1 OW_FIRST_COMMAND+1 -#define OW_CONVERT_RUN1 OW_FIRST_COMMAND+2 -#define OW_READ_SCRATCHPAD_ADR2 OW_FIRST_COMMAND+3 -#define OW_READ_SCRATCHPAD2 OW_FIRST_COMMAND+4 -#define OW_WRITE_SCRATCHPAD_ADR2 OW_FIRST_COMMAND+5 -#define OW_WRITE_SCRATCHPAD2 OW_FIRST_COMMAND+6 - - - -;--------------------------------------------------- -; READ COMMAND and start operation -;--------------------------------------------------- - - -h_readcommand1: - clr r_bytep -#ifndef _DIS_FLASH_ - FLASH_COMMANDS ; muss zu erst sein.... -#endif - cjmp 0xBE,hrc_set_readscratchpad1 - cjmp 0x4E,hrc_set_writescratchpad1 - cjmp 0x44,hrc_set_convertT1 - cjmp 0x48,hrc_copy_scratchpad1 - cjmp 0xB8,hrc_recall_eeprom1 - FW_CONFIG_INFO1 -#ifdef _CHANGEABLE_ID_ - CHANGE_ID_COMMANDS -#endif - ldi r_mode,OW_SLEEP - rjmp handle_end - -hrc_set_readscratchpad1: - ldi r_mode,OW_READ_SCRATCHPAD1 - ldi r_sendflag,1 - CRCInit2 - rjmp h_readscratchpad1 - -hrc_set_writescratchpad1: - ldi r_mode,OW_WRITE_SCRATCHPAD1 - ldi r_bytep,2 ;start to write in 2 - rjmp handle_end - -hrc_recall_eeprom1: - rcall hrc_recall_eeprom_func1 - rjmp handle_end - - - -hrc_set_convertT1: - ldi r_temp,1 - sts gcontrol,r_temp - - ldi r_mode,OW_CONVERT_RUN1 - ldi r_sendflag,3 ;set bit 0 and 1 for no zero polling -h_convert_run1: - ldi r_bcount,0 - ldi r_rwbyte,0 - rjmp handle_end_no_bcount - - -hrc_copy_scratchpad1: - ldi r_bytep,2 - configZ pack1,r_bytep - clr r_bytep -hrc_copy_scratchpad_EEPROM_write1: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp hrc_copy_scratchpad_EEPROM_write1 - ldi r_temp, (0< - -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) - + -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) + - -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) - + -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) + + + compile + OWDS18B20.S + compile MAX44009.c @@ -146,9 +150,6 @@ compile - - compile - \ No newline at end of file diff --git a/DS18B20_MAX44009/OWDS18B20.S b/DS18B20_MAX44009/OWDS18B20.S deleted file mode 100644 index f0331cf..0000000 --- a/DS18B20_MAX44009/OWDS18B20.S +++ /dev/null @@ -1,241 +0,0 @@ - -// 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/OWCRC8.s" - -.extern pack,8 - -//.extern am2302_temp,2 - - - -.macro CHIP_INIT -Init_EEPROM_read: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp Init_EEPROM_read - ldi r_temp,0 - out _SFR_IO_ADDR(EEARH), r_temp - ldi r_temp,2 - out _SFR_IO_ADDR(EEARL), r_temp - sbi _SFR_IO_ADDR(EECR), EERE - in r_temp,_SFR_IO_ADDR(EEDR) - sbrs r_temp,7 - rcall hrc_recall_eeprom_func -.endm - -.macro COMMAND_TABLE - rjmp h_readscratchpad - rjmp h_writescratchpad - rjmp h_convert_run -.endm - -#include "../common/OWRomFunctions.s" -#include "../common/OWTimerInterrupt.s" - - - -; Ab hier Geraeteabhaenging -#define OW_READ_SCRATCHPAD OW_FIRST_COMMAND+0 -#define OW_WRITE_SCRATCHPAD OW_FIRST_COMMAND+1 -#define OW_CONVERT_RUN OW_FIRST_COMMAND+2 - - -;--------------------------------------------------- -; READ COMMAND and start operation -;--------------------------------------------------- - - -h_readcommand: - clr r_bytep -#ifndef _DIS_FLASH_ - FLASH_COMMANDS ; muss zu erst sein.... -#endif - cjmp 0xBE,hrc_set_readscratchpad - cjmp 0x4E,hrc_set_writescratchpad - cjmp 0x44,hrc_set_convertT - cjmp 0x48,hrc_copy_scratchpad - cjmp 0xB8,hrc_recall_eeprom - FW_CONFIG_INFO -#ifdef _CHANGEABLE_ID_ - CHANGE_ID_COMMANDS -#endif - //ldi r_mode,OW_SLEEP - rjmp handle_end_sleep - -hrc_set_readscratchpad: - ldi r_mode,OW_READ_SCRATCHPAD - ldi r_sendflag,1 - CRCInit2 - rjmp h_readscratchpad - -hrc_set_writescratchpad: - ldi r_mode,OW_WRITE_SCRATCHPAD - ldi r_bytep,2 ;start to write in 2 - rjmp handle_end - -hrc_recall_eeprom: - rcall hrc_recall_eeprom_func - rjmp handle_end - - - -hrc_set_convertT: - ldi r_temp,1 - sts gcontrol,r_temp - ;lds temp,am2302_temp - //sts pack+1,temp - ;lds temp,am2302_temp+1 - //sts pack+2,temp -; ldi r_rwbyte,0 -; lds r_temp,pack -; swap r_temp -; andi r_temp,0x0F -; lds r_temp2,pack+1 -; swap r_temp2 -; andi r_temp2,0xF0 -; or r_temp,r_temp2 -; lds r_temp2,pack+2 -; cp r_temp,r_temp2 ;higher than or equal to TH -; brge hrc_set_convertT_set_arlarm -; lds r_temp2,pack+3 -; cp r_temp,r_temp2 ;lower than or equal to TL -; brlt hrc_set_convertT_set_arlarm -; breq hrc_set_convertT_set_arlarm -; rjmp hrc_set_convertT_end -;hrc_set_convertT_set_arlarm: -; ldi r_rwbyte,1 -;hrc_set_convertT_end: -; sts alarmflag,r_rwbyte - ldi r_mode,OW_CONVERT_RUN - ldi r_sendflag,3 ;set bit 0 and 1 for no zero polling -h_convert_run: - ldi r_bcount,0 - ldi r_rwbyte,0 - rjmp handle_end_no_bcount - -hrc_copy_scratchpad: - ldi r_bytep,2 - configZ pack,r_bytep - clr r_bytep -hrc_copy_scratchpad_EEPROM_write: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp hrc_copy_scratchpad_EEPROM_write - ldi r_temp, (0< - - - 2.0 - 6.2 - com.Atmel.AVRGCC8.C - {7a5672fe-8226-4158-b931-e1f36b9a8858} - ATtiny84A - none - Executable - C - $(MSBuildProjectName) - .elf - $(MSBuildProjectDirectory)\$(Configuration) - DS18B20_DS2438 - DS18B20_DS2438 - DS18B20_DS2438 - Native - true - false - true - true - 0x20000000 - - true - exception_table - 2 - 1 - - - - - - - - - - - - - com.atmel.avrdbg.tool.atmelice - - - - - debugWIRE - - com.atmel.avrdbg.tool.atmelice - J41800000779 - Atmel-ICE - - debugWIRE - - - - - - - - com.atmel.avrdbg.tool.simulator - - - Simulator - - - - - - True - True - True - True - False - True - True - - - NDEBUG - - - Optimize for size (-Os) - True - True - True - - - libm - - - - - - - - - True - True - True - True - False - True - True - - - DEBUG - - - Optimize (-O1) - True - True - Default (-g2) - True - - - libm - - - Default (-Wa,-g) - - - - - - compile - SHT2x.c - - - compile - MAX44009.c - - - compile - USI_TWI_Master.c - - - compile - - - compile - - - - \ No newline at end of file diff --git a/DS18B20_MAX44009_DS2438_SHT/DS18B20_MAX44009_DS2438_SHT.cproj b/DS18B20_MAX44009_DS2438_SHT/DS18B20_MAX44009_DS2438_SHT.cproj index 1f7848f..913fe40 100644 --- a/DS18B20_MAX44009_DS2438_SHT/DS18B20_MAX44009_DS2438_SHT.cproj +++ b/DS18B20_MAX44009_DS2438_SHT/DS18B20_MAX44009_DS2438_SHT.cproj @@ -147,10 +147,11 @@ compile USI_TWI_Master.c - + compile + OWDS18B20_DS2438.S - + compile diff --git a/DS18B20_MAX44009_DS2438_SHT/OWDS18B20_DS2438.S b/DS18B20_MAX44009_DS2438_SHT/OWDS18B20_DS2438.S deleted file mode 100644 index a653b5c..0000000 --- a/DS18B20_MAX44009_DS2438_SHT/OWDS18B20_DS2438.S +++ /dev/null @@ -1,354 +0,0 @@ - -// 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_ -//#define _DB_ - -#include "../common/OWConfig.s" -#include "../common/OWCRC8.s" - -.extern pack1,8 - -//.extern am2302_temp,2 - -#if defined(__AVR_ATtiny25__) -.extern pack2,16 -#else -.extern pack2,64 -#endif -.extern am2302_temp,2 -.extern am2302_hum,2 -.comm block,1 ; Block der augegeben, geschrieben wird (Parameter von READ/WRITE Scratchpad) - - -.macro CHIP_INIT -Init_EEPROM_read: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp Init_EEPROM_read - ldi r_temp,0 - out _SFR_IO_ADDR(EEARH), r_temp - ldi r_temp,2 - out _SFR_IO_ADDR(EEARL), r_temp - sbi _SFR_IO_ADDR(EECR), EERE - in r_temp,_SFR_IO_ADDR(EEDR) - sbrs r_temp,7 - rcall hrc_recall_eeprom_func1 -.endm - -.macro COMMAND_TABLE - rjmp h_readscratchpad1 - rjmp h_writescratchpad1 - rjmp h_convert_run1 - rjmp h_readscratchpad_adr2 - rjmp h_readscratchpad2 - rjmp h_writescratchpad_adr2 - rjmp h_writescratchpad2 -.endm - -#include "../common/OWRomFunctionsDual.s" -#include "../common/OWTimerInterrupt.s" - - - -; Ab hier Geraeteabhaenging -#define OW_READ_SCRATCHPAD1 OW_FIRST_COMMAND+0 -#define OW_WRITE_SCRATCHPAD1 OW_FIRST_COMMAND+1 -#define OW_CONVERT_RUN1 OW_FIRST_COMMAND+2 -#define OW_READ_SCRATCHPAD_ADR2 OW_FIRST_COMMAND+3 -#define OW_READ_SCRATCHPAD2 OW_FIRST_COMMAND+4 -#define OW_WRITE_SCRATCHPAD_ADR2 OW_FIRST_COMMAND+5 -#define OW_WRITE_SCRATCHPAD2 OW_FIRST_COMMAND+6 - - -;--------------------------------------------------- -; READ COMMAND and start operation -;--------------------------------------------------- - - -h_readcommand1: - clr r_bytep -#ifndef _DIS_FLASH_ - FLASH_COMMANDS ; muss zu erst sein.... -#endif - cjmp 0xBE,hrc_set_readscratchpad1 - cjmp 0x4E,hrc_set_writescratchpad1 - cjmp 0x44,hrc_set_convertT1 - cjmp 0x48,hrc_copy_scratchpad1 - cjmp 0xB8,hrc_recall_eeprom1 - FW_CONFIG_INFO1 -#ifdef _CHANGEABLE_ID_ - CHANGE_ID_COMMANDS -#endif - ldi r_mode,OW_SLEEP - rjmp handle_end - -hrc_set_readscratchpad1: - ldi r_mode,OW_READ_SCRATCHPAD1 - ldi r_sendflag,1 - CRCInit2 - rjmp h_readscratchpad1 - -hrc_set_writescratchpad1: - ldi r_mode,OW_WRITE_SCRATCHPAD1 - ldi r_bytep,2 ;start to write in 2 - rjmp handle_end - -hrc_recall_eeprom1: - rcall hrc_recall_eeprom_func1 - rjmp handle_end - - - -hrc_set_convertT1: - ldi r_temp,1 - sts gcontrol,r_temp - - ldi r_mode,OW_CONVERT_RUN1 - ldi r_sendflag,3 ;set bit 0 and 1 for no zero polling -h_convert_run1: - ldi r_bcount,0 - ldi r_rwbyte,0 - rjmp handle_end_no_bcount - - -hrc_copy_scratchpad1: - ldi r_bytep,2 - configZ pack1,r_bytep - clr r_bytep -hrc_copy_scratchpad_EEPROM_write1: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp hrc_copy_scratchpad_EEPROM_write1 - ldi r_temp, (0< - -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) - + -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) + - -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) - + -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) + - + compile + OWDS18B20.S - + compile diff --git a/DS18B20_Thermocouble/OWDS18B20.S b/DS18B20_Thermocouble/OWDS18B20.S deleted file mode 100644 index f9f2dc0..0000000 --- a/DS18B20_Thermocouble/OWDS18B20.S +++ /dev/null @@ -1,243 +0,0 @@ - -// 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/OWCRC8.s" - -.extern pack,8 - -//.extern am2302_temp,2 - - - -.macro CHIP_INIT -Init_EEPROM_read: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp Init_EEPROM_read - ldi r_temp,0 - out _SFR_IO_ADDR(EEARH), r_temp - ldi r_temp,2 - out _SFR_IO_ADDR(EEARL), r_temp - sbi _SFR_IO_ADDR(EECR), EERE - in r_temp,_SFR_IO_ADDR(EEDR) - sbrs r_temp,7 - rcall hrc_recall_eeprom_func -.endm - -.macro COMMAND_TABLE - rjmp h_readscratchpad - rjmp h_writescratchpad - rjmp h_convert_run -.endm - -#include "../common/OWRomFunctions.s" -#include "../common/OWTimerInterrupt.s" - - - -; Ab hier Geraeteabhaenging -#define OW_READ_SCRATCHPAD OW_FIRST_COMMAND+0 -#define OW_WRITE_SCRATCHPAD OW_FIRST_COMMAND+1 -#define OW_CONVERT_RUN OW_FIRST_COMMAND+2 - - -;--------------------------------------------------- -; READ COMMAND and start operation -;--------------------------------------------------- - - -h_readcommand: - clr r_bytep -#ifndef _DIS_FLASH_ - FLASH_COMMANDS ; muss zu erst sein.... -#endif - cjmp 0xBE,hrc_set_readscratchpad - cjmp 0x4E,hrc_set_writescratchpad - cjmp 0x44,hrc_set_convertT - cjmp 0x48,hrc_copy_scratchpad - cjmp 0xB8,hrc_recall_eeprom - FW_CONFIG_INFO -#ifdef _CHANGEABLE_ID_ - CHANGE_ID_COMMANDS -#endif - ldi r_mode,OW_SLEEP - rjmp handle_end - -hrc_set_readscratchpad: - ldi r_mode,OW_READ_SCRATCHPAD - ldi r_sendflag,1 - CRCInit2 - rjmp h_readscratchpad - -hrc_set_writescratchpad: - ldi r_mode,OW_WRITE_SCRATCHPAD - ldi r_bytep,2 ;start to write in 2 - rjmp handle_end - -hrc_recall_eeprom: - rcall hrc_recall_eeprom_func - rjmp handle_end - - - -hrc_set_convertT: - ldi r_temp,1 - sts gcontrol,r_temp - ;lds temp,am2302_temp - //sts pack+1,temp - ;lds temp,am2302_temp+1 - //sts pack+2,temp -; ldi r_rwbyte,0 -; lds r_temp,pack -; swap r_temp -; andi r_temp,0x0F -; lds r_temp2,pack+1 -; swap r_temp2 -; andi r_temp2,0xF0 -; or r_temp,r_temp2 -; lds r_temp2,pack+2 -; cp r_temp,r_temp2 ;higher than or equal to TH -; brge hrc_set_convertT_set_arlarm -; lds r_temp2,pack+3 -; cp r_temp,r_temp2 ;lower than or equal to TL -; brlt hrc_set_convertT_set_arlarm -; breq hrc_set_convertT_set_arlarm -; rjmp hrc_set_convertT_end -;hrc_set_convertT_set_arlarm: -; ldi r_rwbyte,1 -;hrc_set_convertT_end: -; sts alarmflag,r_rwbyte - ldi r_mode,OW_CONVERT_RUN - ldi r_sendflag,3 ;set bit 0 and 1 for no zero polling -h_convert_run: - ldi r_bcount,0 - ldi r_rwbyte,0 - rjmp handle_end_no_bcount - - -hrc_copy_scratchpad: - ldi r_bytep,2 - configZ pack,r_bytep - clr r_bytep -hrc_copy_scratchpad_EEPROM_write: - sbic _SFR_IO_ADDR(EECR), EEPE - rjmp hrc_copy_scratchpad_EEPROM_write - ldi r_temp, (0<