Commit f97803df authored by Daniel Kampert's avatar Daniel Kampert 👷

Add ATtiny0 USART 1-Wire example to DS18B20 example project

parent 612e09a1
......@@ -31,6 +31,8 @@
#ifndef CONFIG_1WIRE_H_
#define CONFIG_1WIRE_H_
#define F_CPU 16000000UL /**< Oscillator frequency. */
/*
Console service configuration
*/
......@@ -39,14 +41,16 @@
/*
1-Wire configuration
*/
#define ONEWIRE_INTERFACE INTERFACE_GPIO /**< Use GPIO as 1-Wire interface. */
#define ONEWIRE_INTERFACE INTERFACE_USART /**< Use USART as 1-Wire interface. */
#undef ONEWIRE_USE_EXT_PULL /**< Use the DS18B20 in parasite mode. */
#undef ONEWIRE_EXT_PULL /**< Port where switchable external pull-up resistor is connected to. \n
NOTE: You only need this when you define the symbol #ONEWIRE_USE_EXT_PULL. */
#undef ONEWIRE_EXT_PULL_ACTIVE_LOW /**< Define this when the external pull-up is active low. \n
NOTE: You only need this when you define the symbol #ONEWIRE_USE_EXT_PULL. */
#undef ONEWIRE_USE_OVERDRIVE /**< Use the overdrive mode. */
#define ONEWIRE_DQ PORTE, 0 /**< DQ pin for the 1-Wire driver. */
#define F_CPU 2000000UL /**< CPU frequency. */
#if(ONEWIRE_INTERFACE == INTERFACE_GPIO)
#define ONEWIRE_DQ PORTB, 2 /**< DQ pin for the 1-Wire driver. Only needed when you set #INTERFACE_GPIO for the GPIO as 1-Wire interface. */
#endif
#endif /* CONFIG_1WIRE_H_ */
\ No newline at end of file
......@@ -20,63 +20,79 @@
<OverrideVtor>false</OverrideVtor>
<CacheFlash>true</CacheFlash>
<ProgFlashFromRam>true</ProgFlashFromRam>
<RamSnippetAddress />
<RamSnippetAddress>0x20000000</RamSnippetAddress>
<UncachedRange />
<preserveEEPROM>true</preserveEEPROM>
<OverrideVtorValue />
<OverrideVtorValue>exception_table</OverrideVtorValue>
<BootSegment>2</BootSegment>
<ResetRule>0</ResetRule>
<eraseonlaunchrule>0</eraseonlaunchrule>
<EraseKey />
<AsfFrameworkConfig>
<framework-data xmlns="">
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.45.0" />
</dependencies>
</framework-data>
<options />
<configurations />
<files />
<documentation help="" />
<offline-documentation help="" />
<dependencies>
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.45.0" />
</dependencies>
</framework-data>
</AsfFrameworkConfig>
<avrtool>com.atmel.avrdbg.tool.jtagice3plus</avrtool>
<avrtoolserialnumber>J30200034105</avrtoolserialnumber>
<avrdeviceexpectedsignature>0x1E9225</avrdeviceexpectedsignature>
<avrtoolinterface>UPDI</avrtoolinterface>
<com_atmel_avrdbg_tool_jtagice3plus>
<ToolOptions>
<InterfaceProperties>
<UpdiClock>678466</UpdiClock>
</InterfaceProperties>
<InterfaceName>UPDI</InterfaceName>
</ToolOptions>
<ToolType>com.atmel.avrdbg.tool.jtagice3plus</ToolType>
<ToolNumber>J30200034105</ToolNumber>
<ToolName>JTAGICE3</ToolName>
</com_atmel_avrdbg_tool_jtagice3plus>
<avrtoolinterfaceclock>678466</avrtoolinterfaceclock>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<ToolchainSettings>
<AvrGcc>
<avrgcc.common.Device>-mmcu=attiny406 -B "%24(PackRepoDir)\Atmel\ATtiny_DFP\1.3.229\gcc\dev\attiny406"</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.3.229\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.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\Atmel\ATtiny_DFP\1.3.229\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
<avrgcc.common.Device>-mmcu=attiny406 -B "%24(PackRepoDir)\Atmel\ATtiny_DFP\1.3.229\gcc\dev\attiny406"</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.3.229\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.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\Atmel\ATtiny_DFP\1.3.229\include</Value>
</ListValues>
</avrgcc.assembler.general.IncludePaths>
</AvrGcc>
</ToolchainSettings>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
......@@ -114,8 +130,14 @@
<avrgcc.linker.libraries.Libraries>
<ListValues>
<Value>libm</Value>
<Value>libOneWire</Value>
</ListValues>
</avrgcc.linker.libraries.Libraries>
<avrgcc.linker.libraries.LibrarySearchPaths>
<ListValues>
<Value>../../OneWire/Debug</Value>
</ListValues>
</avrgcc.linker.libraries.LibrarySearchPaths>
<avrgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\Atmel\ATtiny_DFP\1.3.229\include</Value>
......@@ -129,9 +151,15 @@
<Compile Include="main.c">
<SubType>compile</SubType>
</Compile>
<Compile Include="source\Arch\AVR8\tinyAVR\tiny0\ClockManagement\SysClock.c">
<SubType>compile</SubType>
</Compile>
<Compile Include="source\Arch\AVR8\tinyAVR\tiny0\USART\USART_OneWire.c">
<SubType>compile</SubType>
</Compile>
<Compile Include="source\Peripheral\DS18B20\DS18B20.c">
<SubType>compile</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="source" />
......@@ -139,7 +167,10 @@
<Folder Include="source\Arch\AVR8" />
<Folder Include="source\Arch\AVR8\tinyAVR" />
<Folder Include="source\Arch\AVR8\tinyAVR\tiny0" />
<Folder Include="source\Arch\AVR8\tinyAVR\tiny0\ClockManagement" />
<Folder Include="source\Arch\AVR8\tinyAVR\tiny0\USART" />
<Folder Include="source\Peripheral\" />
<Folder Include="source\Peripheral\DS18B20\" />
</ItemGroup>
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
</Project>
\ No newline at end of file
:1000000019C020C01FC01EC01DC01CC01BC01AC00C
:1000100019C018C017C016C015C014C013C012C034
:1000200011C010C00FC00EC00DC00CC00BC00AC064
:1000300009C008C011241FBECFEFCDBFDFE3DEBF74
:1000400002D006C0DDCFCF93DF93CDB7DEB7FFCFB1
:04005000F894FFCF52
:1000000019C033C032C031C030C02FC02EC02DC087
:100010002CC02BC02AC029C028C027C026C025C09C
:1000200024C023C022C021C020C01FC01EC01DC0CC
:100030001CC01BC011241FBECFEFCDBFDFE3DEBF4E
:100040001FE3A0E0BFE3E0EEF8E002C005900D92F0
:10005000A630B107D9F72FE3A6E0BFE301C01D9298
:10006000AC34B207E1F702D0B9C3CACFCF93DF9364
:10007000CDB7DEB740D2882371F44FE05FE363E091
:1000800088E29FE340D2882359F080910E3F8F5F32
:1000900080930E3F05C080910E3F8F5F80930E3F8F
:1000A00080910E3F8F5F80930E3FFACFAF92BF9249
:1000B000CF92DF92EF92FF920F931F93CF93DF9334
:1000C000CDB7DEB72597CDBFDEBF80E690E0FC015F
:1000D0008081882F90E081709927892B29F080E01A
:1000E0009DE7A0E0B0E013C080E690E0FC018081D5
:1000F000882F90E083709927892B29F080E094E283
:10010000A4EFB0E004C080E094E2A4EFB0E0898303
:100110009A83AB83BC8380E690E0FC018181882FC9
:1001200090E081709927892B09F49BC080E690E0CC
:10013000FC01818186958F708F5F8D838D818730E3
:1001400008F480C08D81882F90E08431910509F4F6
:100150004FC08531910534F48031910559F04297B3
:10016000C9F17FC08631910509F450C0489709F460
:100170005BC077C089819A81AB81BC81BC01CD0114
:100180002BEA3AEA4AEA5AEAD0D2A22EB32EC42E79
:10019000D52EE62EF72E082F192F2A2D3B2D4C2D6C
:1001A0005D2D6E2D7F2D802F912F00E2E7D2A22EA4
:1001B000B32EC42ED52EE62EF72E082F192FD601DA
:1001C000C501B695A79597958795B695A7959795E7
:1001D00087954BC089819A81AB81BC812AE030E050
:1001E00040E050E0BC01CD017ED2DA01C9013DC042
:1001F00089819A81AB81BC812CE030E040E050E005
:10020000BC01CD0170D2DA01C9012FC089819A8168
:10021000AB81BC8128E130E040E050E0BC01CD0181
:1002200062D2DA01C90121C089819A81AB81BC8186
:1002300020E330E040E050E0BC01CD0154D2DA01CF
:10024000C90113C08D81282F30E089819A81AB814B
:10025000BC8104C0B695A795979587952A95D2F746
:1002600004C089819A81AB81BC81BC01CD012596F6
:10027000CDBFDEBFDF91CF911F910F91FF90EF9027
:10028000DF90CF90BF90AF900895CF93DF931F92F0
:10029000CDB7DEB7898380E098E02981FC01228315
:1002A000000080E098E0FC0184818823D4F780E09E
:1002B00098E0FC0180810F90DF91CF910895CF935A
:1002C000DF9300D000D0CDB7DEB780E294E024E029
:1002D000FC01218380E294E028E0FC01228B80E095
:1002E00098E028E0FC01258380E098E028ECFC0100
:1002F000268380E098E023E0FC012783D7DEDC0141
:10030000CB0189839A83AB83BC8389819A81AB813A
:10031000BC81880F991FAA1FBB1F880F991FAA1F96
:10032000BB1F20E032EC41E050E0BC01CD01DBD14D
:10033000DA01C9018093003F9093013FA093023FEF
:10034000B093033F89819A81AB81BC81880F991F4B
:10035000AA1FBB1F880F991FAA1FBB1F20E835E2E9
:1003600040E050E0BC01CD01BED1DA01C90180936B
:10037000043F9093053F20E038E08091003F90914A
:10038000013FA091023FB091033FF901808791871F
:1003900000002496CDBFDEBFDF91CF910895CF93AB
:1003A000DF931F92CDB7DEB789838981882319F047
:1003B0008FEF6BDF02C080E068DF00000F90DF91FD
:1003C000CF910895CF93DF93CDB7DEB78FEF5DDF89
:1003D000982F81E09F3F09F080E0DF91CF91089551
:1003E000CF93DF931F92CDB7DEB7198280E098E0FC
:1003F00020E038E0F90126812F77FC01268380E098
:1004000098E020E038E0F90126812068FC0126838D
:1004100080E098E02091043F3091053FFC01208767
:10042000318780EF32DF898320E038E08091003F20
:100430009091013FA091023FB091033FF901808765
:10044000918789810F90DF91CF910895CF93DF93AA
:10045000CDB7DEB72897CDBFDEBF8B839C836D837E
:100460004E835F83288719828B819C81892B11F4AD
:1004700084E03BC08E819F8168851AD18A838A81FE
:10048000882369F58E819F81FC018081883201F586
:1004900089818F5F89838E819F8108968E839F8358
:1004A00017C08E819F8113D18A838A81882311F09E
:1004B0006CD015C08E819F81FC018081883241F40F
:1004C00089818F5F89838E819F8108968E839F8328
:1004D00033D0882321F499818D81981710F38B8173
:1004E0009C812981FC0120838A812896CDBFDEBFB3
:1004F000DF91CF910895CF93DF93CDB7DEB73AD098
:10050000DF91CF910895CF93DF93CDB7DEB72597D5
:10051000CDBFDEBF89839A836B834C835D834C811F
:100520005D8189819A8120E06B8190DF2596CDBF26
:10053000DEBFDF91CF9108958091083F08950F931A
:100540001F93CF93DF93D82F08E010E0C1E08D2FE9
:100550008C2325DFCC0F01501109C9F7DF91CF9112
:100560001F910F9108953CDF882311F080E00895DA
:1005700086E008951092073FA2DE8FE891E0019790
:10058000F1F700C00000EFDF08951092073FEBDFA6
:100590000895CF92DF92EF92FF920F931F93CF9324
:1005A000DF93009709F462C0C62F8C018091083F49
:1005B000811163C0D8DF882329F01092093F10927F
:1005C000083F6DC0C13019F48CEEB9DF02C080EF76
:1005D000B6DFEE24E394C1E0D12CC12CF12CF2DE85
:1005E000D82FF0DED13009F045C0813009F04FC07E
:1005F0002EC08091093FE81609F449C08E1550F0CD
:10060000F801EF0DF11D80818C2309F040C0DE2C34
:10061000D0E002C0DE2CD0E0F801EF0DF11D8081AA
:100620009C2F9095982390838D2FB9DEE394CC0F67
:1006300059F4F801EF0DF11DE081EC25F0E0E052F6
:10064000F847C080F394C1E087E08F1540F6E0E4FE
:10065000EE1598F4C11011C0D092093FD1100DC011
:1006600081E08093083F1092073F07C084E017C0E5
:1006700080E015C0D813D0CFBCCFF80180818111A4
:10068000F7CF1092093F1092083F82E008C0F801AE
:10069000EF0DF11D80818C2B8083D1E0C5CFDF91E0
:1006A000CF911F910F91FF90EF90DF90CF90089521
:1006B0001092093F1092083F21E02093073F60937A
:1006C000063F009711F065DF089584E008959C01CE
:1006D0009091073F913029F4C9016091063F59DF9D
:1006E000089585E00895A1E21A2EAA1BBB1BFD0107
:1006F0000DC0AA1FBB1FEE1FFF1FA217B307E40701
:10070000F50720F0A21BB30BE40BF50B661F771F58
:10071000881F991F1A9469F7609570958095909538
:100720009B01AC01BD01CF010895E894DF93CF9305
:10073000FC01DB013FD07F936F93E9019A01AC018B
:10074000BF93AF933F932F93DF0134D026F46C1BFC
:100750007D0B820B930B9E01EB01FC0137D0AF9117
:10076000BF912F913F9132D0BE01CF01F9012F915E
:100770003F91CF91DF91089597FB10F816940008F0
:100780000F93083098F00850232F342F452F562F01
:10079000672F782F892F902DF4CF05949795879503
:1007A0007795679557954795379527950A95AAF7B1
:1007B0000F910895A29FB001B39FC001A39F01D0E4
:1007C000B29F700D811D1124911D0895F3DF460F16
:1007D000571FC81FD91F08F431960895F894FFCF0A
:1007E000005EBCE2613FDD83C29C7E20A3FD1F4111
:1007F0009DC3217FFCA2401E5F01E3BD3E6082DC01
:10080000237D9FC1421CFEA0E1BF5D0380DE3C62F0
:10081000BEE0025CDF81633D7C22C09E1D43A1FFE0
:100820004618FAA427799BC584DA3866E5BB5907D0
:10083000DB856739BAE406581947A5FB7826C49AC0
:10084000653BD987045AB8E6A7F91B45C6987A24B0
:10085000F8A6441A99C7257B3A6486D85B05E7B9A0
:100860008CD2306EEDB3510F4E10F2AC2F7193CD90
:10087000114FADF3702ECC92D38D6F31B2EC0E5080
:10088000AFF1134DCE90722C6D33D18F0C52B0EE70
:10089000326C8ED0530DEFB1F0AE4C1291CF2D7360
:1008A000CA947628ABF517490856B4EA6937D58B50
:1008B0005709EBB536688AD495CB2977F4AA481640
:1008C000E9B7550B88D6346A2B7597C94A14F6A830
:1008D000742AC896154BA9F7B6E80A54D7896B3520
:0608E0005D00000057045A
:00000001FF
S00F0000415474696E79302E737265638C
S113000019C020C01FC01EC01DC01CC01BC01AC008
S113001019C018C017C016C015C014C013C012C030
S113002011C010C00FC00EC00DC00CC00BC00AC060
S113003009C008C011241FBECFEFCDBFDFE3DEBF70
S113004002D006C0DDCFCF93DF93CDB7DEB7FFCFAD
S1070050F894FFCF4E
S113000019C033C032C031C030C02FC02EC02DC083
S11300102CC02BC02AC029C028C027C026C025C098
S113002024C023C022C021C020C01FC01EC01DC0C8
S11300301CC01BC011241FBECFEFCDBFDFE3DEBF4A
S11300401FE3A0E0BFE3E0EEF8E002C005900D92EC
S1130050A630B107D9F72FE3A6E0BFE301C01D9294
S1130060AC34B207E1F702D0B9C3CACFCF93DF9360
S1130070CDB7DEB740D2882371F44FE05FE363E08D
S113008088E29FE340D2882359F080910E3F8F5F2E
S113009080930E3F05C080910E3F8F5F80930E3F8B
S11300A080910E3F8F5F80930E3FFACFAF92BF9245
S11300B0CF92DF92EF92FF920F931F93CF93DF9330
S11300C0CDB7DEB72597CDBFDEBF80E690E0FC015B
S11300D08081882F90E081709927892B29F080E016
S11300E09DE7A0E0B0E013C080E690E0FC018081D1
S11300F0882F90E083709927892B29F080E094E27F
S1130100A4EFB0E004C080E094E2A4EFB0E08983FF
S11301109A83AB83BC8380E690E0FC018181882FC5
S113012090E081709927892B09F49BC080E690E0C8
S1130130FC01818186958F708F5F8D838D818730DF
S113014008F480C08D81882F90E08431910509F4F2
S11301504FC08531910534F48031910559F04297AF
S1130160C9F17FC08631910509F450C0489709F45C
S11301705BC077C089819A81AB81BC81BC01CD0110
S11301802BEA3AEA4AEA5AEAD0D2A22EB32EC42E75
S1130190D52EE62EF72E082F192F2A2D3B2D4C2D68
S11301A05D2D6E2D7F2D802F912F00E2E7D2A22EA0
S11301B0B32EC42ED52EE62EF72E082F192FD601D6
S11301C0C501B695A79597958795B695A7959795E3
S11301D087954BC089819A81AB81BC812AE030E04C
S11301E040E050E0BC01CD017ED2DA01C9013DC03E
S11301F089819A81AB81BC812CE030E040E050E001
S1130200BC01CD0170D2DA01C9012FC089819A8164
S1130210AB81BC8128E130E040E050E0BC01CD017D
S113022062D2DA01C90121C089819A81AB81BC8182
S113023020E330E040E050E0BC01CD0154D2DA01CB
S1130240C90113C08D81282F30E089819A81AB8147
S1130250BC8104C0B695A795979587952A95D2F742
S113026004C089819A81AB81BC81BC01CD012596F2
S1130270CDBFDEBFDF91CF911F910F91FF90EF9023
S1130280DF90CF90BF90AF900895CF93DF931F92EC
S1130290CDB7DEB7898380E098E02981FC01228311
S11302A0000080E098E0FC0184818823D4F780E09A
S11302B098E0FC0180810F90DF91CF910895CF9356
S11302C0DF9300D000D0CDB7DEB780E294E024E025
S11302D0FC01218380E294E028E0FC01228B80E091
S11302E098E028E0FC01258380E098E028ECFC01FC
S11302F0268380E098E023E0FC012783D7DEDC013D
S1130300CB0189839A83AB83BC8389819A81AB8136
S1130310BC81880F991FAA1FBB1F880F991FAA1F92
S1130320BB1F20E032EC41E050E0BC01CD01DBD149
S1130330DA01C9018093003F9093013FA093023FEB
S1130340B093033F89819A81AB81BC81880F991F47
S1130350AA1FBB1F880F991FAA1FBB1F20E835E2E5
S113036040E050E0BC01CD01BED1DA01C901809367
S1130370043F9093053F20E038E08091003F909146
S1130380013FA091023FB091033FF901808791871B
S113039000002496CDBFDEBFDF91CF910895CF93A7
S11303A0DF931F92CDB7DEB789838981882319F043
S11303B08FEF6BDF02C080E068DF00000F90DF91F9
S11303C0CF910895CF93DF93CDB7DEB78FEF5DDF85
S11303D0982F81E09F3F09F080E0DF91CF9108954D
S11303E0CF93DF931F92CDB7DEB7198280E098E0F8
S11303F020E038E0F90126812F77FC01268380E094
S113040098E020E038E0F90126812068FC01268389
S113041080E098E02091043F3091053FFC01208763
S1130420318780EF32DF898320E038E08091003F1C
S11304309091013FA091023FB091033FF901808761
S1130440918789810F90DF91CF910895CF93DF93A6
S1130450CDB7DEB72897CDBFDEBF8B839C836D837A
S11304604E835F83288719828B819C81892B11F4A9
S113047084E03BC08E819F8168851AD18A838A81FA
S1130480882369F58E819F81FC018081883201F582
S113049089818F5F89838E819F8108968E839F8354
S11304A017C08E819F8113D18A838A81882311F09A
S11304B06CD015C08E819F81FC018081883241F40B
S11304C089818F5F89838E819F8108968E839F8324
S11304D033D0882321F499818D81981710F38B816F
S11304E09C812981FC0120838A812896CDBFDEBFAF
S11304F0DF91CF910895CF93DF93CDB7DEB73AD094
S1130500DF91CF910895CF93DF93CDB7DEB72597D1
S1130510CDBFDEBF89839A836B834C835D834C811B
S11305205D8189819A8120E06B8190DF2596CDBF22
S1130530DEBFDF91CF9108958091083F08950F9316
S11305401F93CF93DF93D82F08E010E0C1E08D2FE5
S11305508C2325DFCC0F01501109C9F7DF91CF910E
S11305601F910F9108953CDF882311F080E00895D6
S113057086E008951092073FA2DE8FE891E001978C
S1130580F1F700C00000EFDF08951092073FEBDFA2
S11305900895CF92DF92EF92FF920F931F93CF9320
S11305A0DF93009709F462C0C62F8C018091083F45
S11305B0811163C0D8DF882329F01092093F10927B
S11305C0083F6DC0C13019F48CEEB9DF02C080EF72
S11305D0B6DFEE24E394C1E0D12CC12CF12CF2DE81
S11305E0D82FF0DED13009F045C0813009F04FC07A
S11305F02EC08091093FE81609F449C08E1550F0C9
S1130600F801EF0DF11D80818C2309F040C0DE2C30
S1130610D0E002C0DE2CD0E0F801EF0DF11D8081A6
S11306209C2F9095982390838D2FB9DEE394CC0F63
S113063059F4F801EF0DF11DE081EC25F0E0E052F2
S1130640F847C080F394C1E087E08F1540F6E0E4FA
S1130650EE1598F4C11011C0D092093FD1100DC00D
S113066081E08093083F1092073F07C084E017C0E1
S113067080E015C0D813D0CFBCCFF80180818111A0
S1130680F7CF1092093F1092083F82E008C0F801AA
S1130690EF0DF11D80818C2B8083D1E0C5CFDF91DC
S11306A0CF911F910F91FF90EF90DF90CF9008951D
S11306B01092093F1092083F21E02093073F609376
S11306C0063F009711F065DF089584E008959C01CA
S11306D09091073F913029F4C9016091063F59DF99
S11306E0089585E00895A1E21A2EAA1BBB1BFD0103
S11306F00DC0AA1FBB1FEE1FFF1FA217B307E407FD
S1130700F50720F0A21BB30BE40BF50B661F771F54
S1130710881F991F1A9469F7609570958095909534
S11307209B01AC01BD01CF010895E894DF93CF9301
S1130730FC01DB013FD07F936F93E9019A01AC0187
S1130740BF93AF933F932F93DF0134D026F46C1BF8
S11307507D0B820B930B9E01EB01FC0137D0AF9113
S1130760BF912F913F9132D0BE01CF01F9012F915A
S11307703F91CF91DF91089597FB10F816940008EC
S11307800F93083098F00850232F342F452F562FFD
S1130790672F782F892F902DF4CF059497958795FF
S11307A07795679557954795379527950A95AAF7AD
S11307B00F910895A29FB001B39FC001A39F01D0E0
S11307C0B29F700D811D1124911D0895F3DF460F12
S11307D0571FC81FD91F08F431960895F894FFCF06
S11307E0005EBCE2613FDD83C29C7E20A3FD1F410D
S11307F09DC3217FFCA2401E5F01E3BD3E6082DCFD
S1130800237D9FC1421CFEA0E1BF5D0380DE3C62EC
S1130810BEE0025CDF81633D7C22C09E1D43A1FFDC
S11308204618FAA427799BC584DA3866E5BB5907CC
S1130830DB856739BAE406581947A5FB7826C49ABC
S1130840653BD987045AB8E6A7F91B45C6987A24AC
S1130850F8A6441A99C7257B3A6486D85B05E7B99C
S11308608CD2306EEDB3510F4E10F2AC2F7193CD8C
S1130870114FADF3702ECC92D38D6F31B2EC0E507C
S1130880AFF1134DCE90722C6D33D18F0C52B0EE6C
S1130890326C8ED0530DEFB1F0AE4C1291CF2D735C
S11308A0CA947628ABF517490856B4EA6937D58B4C
S11308B05709EBB536688AD495CB2977F4AA48163C
S11308C0E9B7550B88D6346A2B7597C94A14F6A82C
S11308D0742AC896154BA9F7B6E80A54D7896B351C
S10908E05D000000570456
S9030000FC
......@@ -38,13 +38,18 @@ SUBDIRS := \
../source/Arch/AVR8 \
../source/Arch/AVR8/tinyAVR \
../source/Arch/AVR8/tinyAVR/tiny0 \
../source/Arch/AVR8/tinyAVR/tiny0/USART
../source/Arch/AVR8/tinyAVR/tiny0/ClockManagement \
../source/Arch/AVR8/tinyAVR/tiny0/USART \
../source/Peripheral/ \
../source/Peripheral/DS18B20/
# Add inputs and outputs from these tool invocations to the build variables
C_SRCS += \
../main.c \
../source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.c
../source/Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.c \
../source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.c \
../source/Peripheral/DS18B20/DS18B20.c
PREPROCESSING_SRCS +=
......@@ -55,19 +60,27 @@ ASM_SRCS +=
OBJS += \
main.o \
source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.o
source/Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.o \
source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.o \
source/Peripheral/DS18B20/DS18B20.o
OBJS_AS_ARGS += \
main.o \
source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.o
source/Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.o \
source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.o \
source/Peripheral/DS18B20/DS18B20.o
C_DEPS += \
main.d \
source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.d
source/Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.d \
source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.d \
source/Peripheral/DS18B20/DS18B20.d
C_DEPS_AS_ARGS += \
main.d \
source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.d
source/Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.d \
source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.d \
source/Peripheral/DS18B20/DS18B20.d
OUTPUT_FILE_PATH +=ATtiny0.elf
......@@ -90,6 +103,13 @@ LINKER_SCRIPT_DEP+=
@echo Finished building: $<
source/Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.o: ../source/Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.c
@echo Building file: $<
@echo Invoking: AVR/GNU C Compiler : 5.4.0
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -DMCU_NAME=MCU_NAME_ATTINY406 -DMCU_ARCH=MCU_ARCH_AVR8 -DMCU_FAMILY=MCU_FAMILY_TINY0 -DMCU_LITTLE_ENDIAN -DCONFIG="Config_DS18B20.h" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATtiny_DFP\1.3.229\include" -I"../../../../../include" -I"../../../../../configs" -O0 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny406 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATtiny_DFP\1.3.229\gcc\dev\attiny406" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "[email protected]" "$<"
@echo Finished building: $<
source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.o: ../source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.c
@echo Building file: $<
@echo Invoking: AVR/GNU C Compiler : 5.4.0
......@@ -97,6 +117,13 @@ source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.o: ../source/Arch/AVR8/tinyAV
@echo Finished building: $<
source/Peripheral/DS18B20/DS18B20.o: ../source/Peripheral/DS18B20/DS18B20.c
@echo Building file: $<
@echo Invoking: AVR/GNU C Compiler : 5.4.0
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -x c -funsigned-char -funsigned-bitfields -DDEBUG -DMCU_NAME=MCU_NAME_ATTINY406 -DMCU_ARCH=MCU_ARCH_AVR8 -DMCU_FAMILY=MCU_FAMILY_TINY0 -DMCU_LITTLE_ENDIAN -DCONFIG="Config_DS18B20.h" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATtiny_DFP\1.3.229\include" -I"../../../../../include" -I"../../../../../configs" -O0 -ffunction-sections -fdata-sections -fpack-struct -fshort-enums -g2 -Wall -mmcu=attiny406 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATtiny_DFP\1.3.229\gcc\dev\attiny406" -c -std=gnu99 -MD -MP -MF "$(@:%.o=%.d)" -MT"$(@:%.o=%.d)" -MT"$(@:%.o=%.o)" -o "[email protected]" "$<"
@echo Finished building: $<
......@@ -123,7 +150,7 @@ all: $(OUTPUT_FILE_PATH) $(ADDITIONAL_DEPENDENCIES)
$(OUTPUT_FILE_PATH): $(OBJS) $(USER_OBJS) $(OUTPUT_FILE_DEP) $(LIB_DEP) $(LINKER_SCRIPT_DEP)
@echo Building target: [email protected]
@echo Invoking: AVR/GNU Linker : 5.4.0
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="ATtiny0.map" -Wl,--start-group -Wl,-lm -Wl,--end-group -Wl,--gc-sections -mmcu=attiny406 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATtiny_DFP\1.3.229\gcc\dev\attiny406"
$(QUOTE)C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-gcc.exe$(QUOTE) -o$(OUTPUT_FILE_PATH_AS_ARGS) $(OBJS_AS_ARGS) $(USER_OBJS) $(LIBS) -Wl,-Map="ATtiny0.map" -Wl,--start-group -Wl,-lm -Wl,-lOneWire -Wl,--end-group -Wl,-L"../../OneWire/Debug" -Wl,--gc-sections -mmcu=attiny406 -B "C:\Program Files (x86)\Atmel\Studio\7.0\Packs\Atmel\ATtiny_DFP\1.3.229\gcc\dev\attiny406"
@echo Finished building target: [email protected]
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -O ihex -R .eeprom -R .fuse -R .lock -R .signature -R .user_signatures "ATtiny0.elf" "ATtiny0.hex"
"C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin\avr-objcopy.exe" -j .eeprom --set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex "ATtiny0.elf" "ATtiny0.eep" || exit 0
......
......@@ -4,5 +4,9 @@
main.c
source\Arch\AVR8\tinyAVR\tiny0\ClockManagement\SysClock.c
source\Arch\AVR8\tinyAVR\tiny0\USART\USART_OneWire.c
source\Peripheral\DS18B20\DS18B20.c
......@@ -27,7 +27,8 @@ source/Arch/AVR8/tinyAVR/tiny0/USART/USART_OneWire.d \
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\math.h \
c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\include\util\atomic.h \
../../../../../include/Common/Board/MCU/ATtiny406.h \
../../../../../include/Common/Ringbuffer/RingBuffer.h
../../../../../include/Common/Ringbuffer/RingBuffer.h \
../../../../../include/Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.h
../../../../../include/Arch/AVR8/tinyAVR/tiny0/USART/USART.h:
......@@ -86,3 +87,5 @@ c:\program\ files\ (x86)\atmel\studio\7.0\toolchain\avr8\avr8-gnu-toolchain\avr\
../../../../../include/Common/Board/MCU/ATtiny406.h:
../../../../../include/Common/Ringbuffer/RingBuffer.h:
../../../../../include/Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.h:
#include "Peripheral/DS18B20/DS18B20.h"
#define DS18B20_ALARM_UPPER_LIMIT 75
#define DS18B20_ALARM_LOWER_LIMIT 0
#define DS18B20_BUS_DEVICES 0x03
OneWire_Error_t ErrorCode;
uint8_t Devices;
OneWire_ROM_t DS18B20_ROM[DS18B20_BUS_DEVICES];
DS18B20_Scratchpad_t Scratchpad;
OneWire_PowerState_t PowerState;
double Temperature;
uint8_t AlarmDevices;
OneWire_ROM_t DS18B20_AlarmROM[DS18B20_BUS_DEVICES];
volatile uint8_t A;
int main(void)
{
while (1)
if(DS18B20_Init() == ONEWIRE_NO_ERROR)
{
if(DS18B20_GetDevices(&Devices, DS18B20_BUS_DEVICES, DS18B20_ROM) == ONEWIRE_NO_ERROR)
{
}
else
{
A++;
}
}
else
{
A++;
}
while(1)
{
A++;
}
}
\ No newline at end of file
/*
* SysClock.c
*
* Copyright (C) Daniel Kampert, 2018
* Website: www.kampis-elektroecke.de
* File info: Driver for Atmel AVR tiny0 system clock.
GNU GENERAL PUBLIC LICENSE:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Errors and commissions should be reported to [email protected]
*/
/** @file Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.h
* @brief Driver for Atmel AVR tiny0 clock system.
*
* This contains the implementation of the tiny0 clock system.
*
* @author Daniel Kampert
* @bug No known bugs
*/
#include "Arch/AVR8/tinyAVR/tiny0/ClockManagement/SysClock.h"
uint32_t SysClock_GetClockPer(void)
{
uint32_t SysClock = SysClock_GetClock();