select resolution

This commit is contained in:
Sergey Yarkov 2023-08-05 04:35:17 +03:00
parent 76c415f67f
commit 9fae0d671e
No known key found for this signature in database
GPG Key ID: E91CE1FABC619B6F
9 changed files with 697 additions and 480 deletions

Binary file not shown.

View File

@ -1,7 +1,7 @@
:1000000013C01AC019C018C017C016C015C014C03C
:1000100013C012C011C010C00FC00EC00DC03F06EB
:100020005B4F666D7D077F6F11241FBECFE5D1E06A
:10003000DEBFCDBF30D19CC2E3CFF894C09AC29A44
:10003000DEBFCDBF30D11EC3E3CFF894C09AC29AC1
:100040008DE08A95F1F70000C0988DE08A95F1F770
:100050000000C29878940895F894C298C0988DE0F2
:100060008A95F1F70000C29A8DE08A95F1F70000B9
@ -20,15 +20,15 @@
:100130008D2F806CA0DF8C2F9EDF8EDFDF91CF9123
:10014000089562E080E4EDDF61E080E4EADF60E0F2
:1001500080E4E7DF089521E08A30910550F021E046
:10016000EAE0F0E0BF01DDD1CB012F5F6A3071051D
:10016000EAE0F0E0BF015FD2CB012F5F6A3071059A
:10017000C8F7822F0895AF92BF92CF92DF92EF928D
:10018000FF920F931F93CF93DF9300D01F92CDB7B1
:10019000DEB7B62EF42E009749F461113BC08C01F6
:1001A000883E93407CF007EE13E00CC08C01883E43
:1001B00023E0920714F007EE13E099231CF4119545
:1001C00001951109C801C7DFA82E2AE030E0C80157
:1001D000B901BBD18B83CB01B901B7D18A83C801E7
:1001E00064E670E0B2D1CB01B901AFD1898331E0CF
:1001D000B9013DD28B83CB01B90139D28A83C801E1
:1001E00064E670E034D2CB01B90131D2898331E0C9
:1001F000A31691F083E0D82EDA1882E08D15A8F1CD
:1002000010E000E0C12C82E090E09C012F19310940
:10021000790118C08C01D3CFDA2CF2CFE1E0F0E005
@ -40,50 +40,66 @@
:10027000E25EFF4F84916C2D54DF0F900F900F9032
:10028000DF91CF911F910F91FF90EF90DF90CF9072
:10029000BF90AF900895CF93DF93CDB7DEB764974B
:1002A0000FB6F894DEBF0FBECDBF28E042E062E09B
:1002B00080E01DDF46DF04E610E001C042DFCE0132
:1002C0000196C3D08111FACFCE010196D1D08B898E
:1002D0009C89B80126D141E089899A894CDFEFCF0A
:1002E000F894BC9A8FEB93E00197F1F700C00000FF
:1002F000BC989AEB9A95F1F700C086B3E3E3F3E07C
:100300003197F1F700C0000078948295817091E0F8
:100310008927089598E00DC0BC9A20EA2A95F1F744
:10032000BC982AE12A95F1F700C0789486959150FF
:1003300069F0F89480FFF0CFBC9A20E12A95F1F79C
:10034000BC982AEA2A95F1F700C0EFCF089598E00B
:1003500080E007C022E92A95F1F700C07894915017
:1003600071F0F8948695BC9A20E12A95F1F7BC9833
:1003700028E12A95F1F7B49BEDCF8068EBCF089583
:10038000AFDF811101C008958CECC4DF81E0FBCFA9
:100390000F931F93CF93DF938C01A2DF811105C0D0
:1003A000DF91CF911F910F91089583E3B3DFE801AF
:1003B000085F1F4FCCDF8993C017D107D9F781E0C1
:1003C000EFCFFC01680F791F80E02CE80BC0869509
:1003D000915029F080FFFBCF86958227F9CFE61751
:1003E000F70721F09191892798E0F4CF0895EF92D3
:1003F000FF920F931F93CF93DF937C01C1DF8EEBAE
:1004000089DFE7018701085F1F4FA1DF8993C017CC
:10041000D107D9F768E070E0C701D3DFC82F97DFB5
:1004200091E0C81390E0892FDF91CF911F910F9138
:10043000FF90EF90089554DF811101C008958CEC76
:1004400069DF84E467DF81E0F9CFCF93DF93EC01CC
:1004500047DF811104C081E0DF91CF910895CE0183
:10046000089696DF81E098859832B1F780E0F4CF66
:10047000CF93DF93EC01DFDF811103C0DF91CF91D8
:1004800008952FE78FE492E1215080409040E1F7FA
:1004900000C00000CE01ABDF882381F329813881C1
:1004A000522F432FCA019923BCF1959587959595B5
:1004B00087959595879595958795998B888B287FB6
:1004C00011F03195388388818F70282F30E0C90171
:1004D000880F991F82959295907F9827807F982703
:1004E000821B930B880F991F880F991F820F931FF0
:1004F000880F991F880F991F880F991F9C019923B6
:100500006CF0359527953595279535952795359533
:1005100027953B8B2A8BB2CF0F96C7CF215F3F4FDA
:10052000F0CFAA1BBB1B51E107C0AA1FBB1FA61718
:10053000B70710F0A61BB70B881F991F5A95A9F78C
:1005400080959095BC01CD01089597FB072E16F478
:10055000009406D077FD08D0E4DF07FC05D03EF418
:10056000909581959F4F0895709561957F4F08955F
:04057000F894FFCF2D
:1002A0000FB6F894DEBF0FBECDBF6BE0CE01019656
:1002B000E5D028E042E062E080E019DF42DF04E6BA
:1002C00010E001C03EDFCE01019613D18111FACFBB
:1002D000CE01019621D18B899C89B801A4D141E03E
:1002E00089899A8948DFEFCFF894BC9A8FEB93E025
:1002F0000197F1F700C00000BC989AEB9A95F1F7CE
:1003000000C086B3E3E3F3E03197F1F700C00000EB
:1003100078948295817091E08927089598E00DC0C6
:10032000BC9A20EA2A95F1F7BC982AE12A95F1F7C0
:1003300000C078948695915069F0F89480FFF0CFD2
:10034000BC9A20E12A95F1F7BC982AEA2A95F1F7A0
:1003500000C0EFCF089598E080E007C022E92A9519
:10036000F1F700C07894915071F0F8948695BC9A9A
:1003700020E12A95F1F7BC9828E12A95F1F7B49B82
:10038000EDCF8068EBCF0895AFDF811101C00895F4
:100390008CECC4DF81E0FBCF0F931F93CF93DF93EF
:1003A0008C01A2DF811105C0DF91CF911F910F91C8
:1003B000089583E3B3DFE801085F1F4FCCDF899323
:1003C000C017D107D9F781E0EFCFFC01680F791F83
:1003D00080E02CE80BC08695915029F080FFFBCF80
:1003E00086958227F9CFE617F70721F091918927A3
:1003F00098E0F4CF0895EF92FF920F931F93CF935D
:10040000DF937C01C1DF8EEB89DFE7018701085FA5
:100410001F4FA1DF8993C017D107D9F768E070E0BB
:10042000C701D3DFC82F97DF91E0C81390E0892F71
:10043000DF91CF911F910F91FF90EF90089554DFBE
:10044000811101C00895A0DF88E468DF8FE19EE498
:100450000197F1F700C0000081E0F4CFCF93DF9364
:10046000EC0192DF8EE45ADF888158DF898156DF04
:100470008A8154DFE4DFDF91CF910895FF920F93DB
:100480001F93CF93DF9300D01F92CDB7DEB78C01BF
:10049000F62EB1DFF8018281898383818A83FAE0B5
:1004A000FF16B9F08BE0F81689F0E9E0FE16A1F02E
:1004B0008FE78B83CE010196D1DF0F900F900F90C5
:1004C000DF91CF911F910F91FF9008958FE58B835E
:1004D000F1CF8FE38B83EECF8FE18B83EBCF04DF04
:1004E000811101C008958CEC19DF84E417DF81E0ED
:1004F000F9CFCF93DF93EC01F7DE811104C081E0E7
:10050000DF91CF910895CE01089646DF81E098856E
:100510009832B1F780E0F4CFCF93DF93EC01DFDFC7
:10052000882309F456C02C81822F90E08095909505
:1005300080769927892B09F04FC02FE78FE492E14D
:10054000215080409040E1F700C00000CE0153DF11
:10055000882309F43EC029813881522F432FCA01D4
:1005600099230CF45BC095958795959587959595FE
:10057000879595958795998B888B287F11F0319574
:10058000388388818F70282F30E0C901880F991F28
:1005900082959295907F9827807F9827821B930B56
:1005A000880F991F880F991F820F931F880F991F1B
:1005B000880F991F880F991F9C0199238CF13595FD
:1005C00027953595279535952795359527953B8B17
:1005D0002A8BDF91CF91089526FF0AC02FEB87E287
:1005E00099E0215080409040E1F700C00000AECF7C
:1005F00025FF0AC02FEF86E994E02150804090400B
:10060000E1F700C00000A2CF2FE78BE492E0215079
:1006100080409040E1F700C0000098CF0F96A3CF34
:10062000215F3F4FCCCFAA1BBB1B51E107C0AA1FC4
:10063000BB1FA617B70710F0A61BB70B881F991F83
:100640005A95A9F780959095BC01CD01089597FB27
:10065000072E16F4009406D077FD08D0E4DF07FCDF
:1006600005D03EF4909581959F4F089570956195C2
:080670007F4F0895F894FFCFBD
:00000001FF

View File

@ -3,21 +3,21 @@ dist/default/production/attiny45v_thermometer.X.production.elf: file format
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000574 00000000 00000000 00000054 2**1
0 .text 00000678 00000000 00000000 00000054 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 00800060 00800060 000005c8 2**0
1 .data 00000000 00800060 00800060 000006cc 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .comment 00000030 00000000 00000000 000005c8 2**0
2 .comment 00000030 00000000 00000000 000006cc 2**0
CONTENTS, READONLY
3 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 000005f8 2**2
3 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 000006fc 2**2
CONTENTS, READONLY
4 .debug_info 00000420 00000000 00000000 00000634 2**0
4 .debug_info 00000420 00000000 00000000 00000738 2**0
CONTENTS, READONLY, DEBUGGING
5 .debug_abbrev 000003e8 00000000 00000000 00000a54 2**0
5 .debug_abbrev 000003e8 00000000 00000000 00000b58 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_line 000000f2 00000000 00000000 00000e3c 2**0
6 .debug_line 000000f2 00000000 00000000 00000f40 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_str 00000169 00000000 00000000 00000f2e 2**0
7 .debug_str 00000169 00000000 00000000 00001032 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
@ -54,7 +54,7 @@ Disassembly of section .text:
30: de bf out 0x3e, r29 ; 62
32: cd bf out 0x3d, r28 ; 61
34: 30 d1 rcall .+608 ; 0x296 <main>
36: 9c c2 rjmp .+1336 ; 0x570 <_exit>
36: 1e c3 rjmp .+1596 ; 0x674 <_exit>
00000038 <__bad_interrupt>:
38: e3 cf rjmp .-58 ; 0x0 <__vectors>
@ -224,7 +224,7 @@ Disassembly of section .text:
160: ea e0 ldi r30, 0x0A ; 10
162: f0 e0 ldi r31, 0x00 ; 0
164: bf 01 movw r22, r30
166: dd d1 rcall .+954 ; 0x522 <__udivmodhi4>
166: 5f d2 rcall .+1214 ; 0x626 <__udivmodhi4>
168: cb 01 movw r24, r22
16a: 2f 5f subi r18, 0xFF ; 255
16c: 6a 30 cpi r22, 0x0A ; 10
@ -280,19 +280,19 @@ Disassembly of section .text:
1cc: 30 e0 ldi r19, 0x00 ; 0
1ce: c8 01 movw r24, r16
1d0: b9 01 movw r22, r18
1d2: bb d1 rcall .+886 ; 0x54a <__divmodhi4>
1d2: 3d d2 rcall .+1146 ; 0x64e <__divmodhi4>
1d4: 8b 83 std Y+3, r24 ; 0x03
1d6: cb 01 movw r24, r22
1d8: b9 01 movw r22, r18
1da: b7 d1 rcall .+878 ; 0x54a <__divmodhi4>
1da: 39 d2 rcall .+1138 ; 0x64e <__divmodhi4>
1dc: 8a 83 std Y+2, r24 ; 0x02
1de: c8 01 movw r24, r16
1e0: 64 e6 ldi r22, 0x64 ; 100
1e2: 70 e0 ldi r23, 0x00 ; 0
1e4: b2 d1 rcall .+868 ; 0x54a <__divmodhi4>
1e4: 34 d2 rcall .+1128 ; 0x64e <__divmodhi4>
1e6: cb 01 movw r24, r22
1e8: b9 01 movw r22, r18
1ea: af d1 rcall .+862 ; 0x54a <__divmodhi4>
1ea: 31 d2 rcall .+1122 ; 0x64e <__divmodhi4>
1ec: 89 83 std Y+1, r24 ; 0x01
1ee: 31 e0 ldi r19, 0x01 ; 1
1f0: a3 16 cp r10, r19
@ -390,398 +390,534 @@ Disassembly of section .text:
2a4: de bf out 0x3e, r29 ; 62
2a6: 0f be out 0x3f, r0 ; 63
2a8: cd bf out 0x3d, r28 ; 61
2aa: 28 e0 ldi r18, 0x08 ; 8
2ac: 42 e0 ldi r20, 0x02 ; 2
2ae: 62 e0 ldi r22, 0x02 ; 2
2b0: 80 e0 ldi r24, 0x00 ; 0
2b2: 1d df rcall .-454 ; 0xee <TM1637_Init>
2b4: 46 df rcall .-372 ; 0x142 <TM1637_DisplayLine>
2b6: 04 e6 ldi r16, 0x64 ; 100
2b8: 10 e0 ldi r17, 0x00 ; 0
2ba: 01 c0 rjmp .+2 ; 0x2be <main+0x28>
2aa: 6b e0 ldi r22, 0x0B ; 11
2ac: ce 01 movw r24, r28
2ae: 01 96 adiw r24, 0x01 ; 1
2b0: e5 d0 rcall .+458 ; 0x47c <DallasTemp_SetResolution>
2b2: 28 e0 ldi r18, 0x08 ; 8
2b4: 42 e0 ldi r20, 0x02 ; 2
2b6: 62 e0 ldi r22, 0x02 ; 2
2b8: 80 e0 ldi r24, 0x00 ; 0
2ba: 19 df rcall .-462 ; 0xee <TM1637_Init>
2bc: 42 df rcall .-380 ; 0x142 <TM1637_DisplayLine>
2be: ce 01 movw r24, r28
2c0: 01 96 adiw r24, 0x01 ; 1
2c2: c3 d0 rcall .+390 ; 0x44a <DallasTemp_CheckError>
2c4: 81 11 cpse r24, r1
2c6: fa cf rjmp .-12 ; 0x2bc <main+0x26>
2c8: ce 01 movw r24, r28
2ca: 01 96 adiw r24, 0x01 ; 1
2cc: d1 d0 rcall .+418 ; 0x470 <DallasTemp_GetTemperature>
2ce: 8b 89 ldd r24, Y+19 ; 0x13
2d0: 9c 89 ldd r25, Y+20 ; 0x14
2d2: b8 01 movw r22, r16
2d4: 26 d1 rcall .+588 ; 0x522 <__udivmodhi4>
2d6: 41 e0 ldi r20, 0x01 ; 1
2d8: 89 89 ldd r24, Y+17 ; 0x11
2da: 9a 89 ldd r25, Y+18 ; 0x12
2dc: 4c df rcall .-360 ; 0x176 <TM1637_DisplayFixedNum>
2de: ef cf rjmp .-34 ; 0x2be <main+0x28>
2be: 04 e6 ldi r16, 0x64 ; 100
2c0: 10 e0 ldi r17, 0x00 ; 0
2c2: 01 c0 rjmp .+2 ; 0x2c6 <main+0x30>
2c4: 3e df rcall .-388 ; 0x142 <TM1637_DisplayLine>
2c6: ce 01 movw r24, r28
2c8: 01 96 adiw r24, 0x01 ; 1
2ca: 13 d1 rcall .+550 ; 0x4f2 <DallasTemp_CheckError>
2cc: 81 11 cpse r24, r1
2ce: fa cf rjmp .-12 ; 0x2c4 <main+0x2e>
2d0: ce 01 movw r24, r28
2d2: 01 96 adiw r24, 0x01 ; 1
2d4: 21 d1 rcall .+578 ; 0x518 <DallasTemp_GetTemperature>
2d6: 8b 89 ldd r24, Y+19 ; 0x13
2d8: 9c 89 ldd r25, Y+20 ; 0x14
2da: b8 01 movw r22, r16
2dc: a4 d1 rcall .+840 ; 0x626 <__udivmodhi4>
2de: 41 e0 ldi r20, 0x01 ; 1
2e0: 89 89 ldd r24, Y+17 ; 0x11
2e2: 9a 89 ldd r25, Y+18 ; 0x12
2e4: 48 df rcall .-368 ; 0x176 <TM1637_DisplayFixedNum>
2e6: ef cf rjmp .-34 ; 0x2c6 <main+0x30>
000002e0 <OneWire_Presence>:
2e0: f8 94 cli
2e2: bc 9a sbi 0x17, 4 ; 23
2e4: 8f eb ldi r24, 0xBF ; 191
2e6: 93 e0 ldi r25, 0x03 ; 3
2e8: 01 97 sbiw r24, 0x01 ; 1
2ea: f1 f7 brne .-4 ; 0x2e8 <OneWire_Presence+0x8>
2ec: 00 c0 rjmp .+0 ; 0x2ee <OneWire_Presence+0xe>
2ee: 00 00 nop
2f0: bc 98 cbi 0x17, 4 ; 23
2f2: 9a eb ldi r25, 0xBA ; 186
2f4: 9a 95 dec r25
2f6: f1 f7 brne .-4 ; 0x2f4 <OneWire_Presence+0x14>
2f8: 00 c0 rjmp .+0 ; 0x2fa <OneWire_Presence+0x1a>
2fa: 86 b3 in r24, 0x16 ; 22
2fc: e3 e3 ldi r30, 0x33 ; 51
2fe: f3 e0 ldi r31, 0x03 ; 3
300: 31 97 sbiw r30, 0x01 ; 1
302: f1 f7 brne .-4 ; 0x300 <OneWire_Presence+0x20>
304: 00 c0 rjmp .+0 ; 0x306 <OneWire_Presence+0x26>
306: 00 00 nop
308: 78 94 sei
30a: 82 95 swap r24
30c: 81 70 andi r24, 0x01 ; 1
30e: 91 e0 ldi r25, 0x01 ; 1
310: 89 27 eor r24, r25
312: 08 95 ret
000002e8 <OneWire_Presence>:
2e8: f8 94 cli
2ea: bc 9a sbi 0x17, 4 ; 23
2ec: 8f eb ldi r24, 0xBF ; 191
2ee: 93 e0 ldi r25, 0x03 ; 3
2f0: 01 97 sbiw r24, 0x01 ; 1
2f2: f1 f7 brne .-4 ; 0x2f0 <OneWire_Presence+0x8>
2f4: 00 c0 rjmp .+0 ; 0x2f6 <OneWire_Presence+0xe>
2f6: 00 00 nop
2f8: bc 98 cbi 0x17, 4 ; 23
2fa: 9a eb ldi r25, 0xBA ; 186
2fc: 9a 95 dec r25
2fe: f1 f7 brne .-4 ; 0x2fc <OneWire_Presence+0x14>
300: 00 c0 rjmp .+0 ; 0x302 <OneWire_Presence+0x1a>
302: 86 b3 in r24, 0x16 ; 22
304: e3 e3 ldi r30, 0x33 ; 51
306: f3 e0 ldi r31, 0x03 ; 3
308: 31 97 sbiw r30, 0x01 ; 1
30a: f1 f7 brne .-4 ; 0x308 <OneWire_Presence+0x20>
30c: 00 c0 rjmp .+0 ; 0x30e <OneWire_Presence+0x26>
30e: 00 00 nop
310: 78 94 sei
312: 82 95 swap r24
314: 81 70 andi r24, 0x01 ; 1
316: 91 e0 ldi r25, 0x01 ; 1
318: 89 27 eor r24, r25
31a: 08 95 ret
00000314 <OneWire_WriteByte>:
314: 98 e0 ldi r25, 0x08 ; 8
316: 0d c0 rjmp .+26 ; 0x332 <OneWire_WriteByte+0x1e>
318: bc 9a sbi 0x17, 4 ; 23
31a: 20 ea ldi r18, 0xA0 ; 160
31c: 2a 95 dec r18
31e: f1 f7 brne .-4 ; 0x31c <OneWire_WriteByte+0x8>
320: bc 98 cbi 0x17, 4 ; 23
322: 2a e1 ldi r18, 0x1A ; 26
0000031c <OneWire_WriteByte>:
31c: 98 e0 ldi r25, 0x08 ; 8
31e: 0d c0 rjmp .+26 ; 0x33a <OneWire_WriteByte+0x1e>
320: bc 9a sbi 0x17, 4 ; 23
322: 20 ea ldi r18, 0xA0 ; 160
324: 2a 95 dec r18
326: f1 f7 brne .-4 ; 0x324 <OneWire_WriteByte+0x10>
328: 00 c0 rjmp .+0 ; 0x32a <OneWire_WriteByte+0x16>
32a: 78 94 sei
32c: 86 95 lsr r24
32e: 91 50 subi r25, 0x01 ; 1
330: 69 f0 breq .+26 ; 0x34c <OneWire_WriteByte+0x38>
332: f8 94 cli
334: 80 ff sbrs r24, 0
336: f0 cf rjmp .-32 ; 0x318 <OneWire_WriteByte+0x4>
338: bc 9a sbi 0x17, 4 ; 23
33a: 20 e1 ldi r18, 0x10 ; 16
33c: 2a 95 dec r18
33e: f1 f7 brne .-4 ; 0x33c <OneWire_WriteByte+0x28>
340: bc 98 cbi 0x17, 4 ; 23
342: 2a ea ldi r18, 0xAA ; 170
326: f1 f7 brne .-4 ; 0x324 <OneWire_WriteByte+0x8>
328: bc 98 cbi 0x17, 4 ; 23
32a: 2a e1 ldi r18, 0x1A ; 26
32c: 2a 95 dec r18
32e: f1 f7 brne .-4 ; 0x32c <OneWire_WriteByte+0x10>
330: 00 c0 rjmp .+0 ; 0x332 <OneWire_WriteByte+0x16>
332: 78 94 sei
334: 86 95 lsr r24
336: 91 50 subi r25, 0x01 ; 1
338: 69 f0 breq .+26 ; 0x354 <OneWire_WriteByte+0x38>
33a: f8 94 cli
33c: 80 ff sbrs r24, 0
33e: f0 cf rjmp .-32 ; 0x320 <OneWire_WriteByte+0x4>
340: bc 9a sbi 0x17, 4 ; 23
342: 20 e1 ldi r18, 0x10 ; 16
344: 2a 95 dec r18
346: f1 f7 brne .-4 ; 0x344 <OneWire_WriteByte+0x30>
348: 00 c0 rjmp .+0 ; 0x34a <OneWire_WriteByte+0x36>
34a: ef cf rjmp .-34 ; 0x32a <OneWire_WriteByte+0x16>
34c: 08 95 ret
346: f1 f7 brne .-4 ; 0x344 <OneWire_WriteByte+0x28>
348: bc 98 cbi 0x17, 4 ; 23
34a: 2a ea ldi r18, 0xAA ; 170
34c: 2a 95 dec r18
34e: f1 f7 brne .-4 ; 0x34c <OneWire_WriteByte+0x30>
350: 00 c0 rjmp .+0 ; 0x352 <OneWire_WriteByte+0x36>
352: ef cf rjmp .-34 ; 0x332 <OneWire_WriteByte+0x16>
354: 08 95 ret
0000034e <OneWire_ReadByte>:
34e: 98 e0 ldi r25, 0x08 ; 8
350: 80 e0 ldi r24, 0x00 ; 0
352: 07 c0 rjmp .+14 ; 0x362 <OneWire_ReadByte+0x14>
354: 22 e9 ldi r18, 0x92 ; 146
356: 2a 95 dec r18
358: f1 f7 brne .-4 ; 0x356 <OneWire_ReadByte+0x8>
35a: 00 c0 rjmp .+0 ; 0x35c <OneWire_ReadByte+0xe>
35c: 78 94 sei
35e: 91 50 subi r25, 0x01 ; 1
360: 71 f0 breq .+28 ; 0x37e <OneWire_ReadByte+0x30>
362: f8 94 cli
364: 86 95 lsr r24
366: bc 9a sbi 0x17, 4 ; 23
368: 20 e1 ldi r18, 0x10 ; 16
36a: 2a 95 dec r18
36c: f1 f7 brne .-4 ; 0x36a <OneWire_ReadByte+0x1c>
36e: bc 98 cbi 0x17, 4 ; 23
370: 28 e1 ldi r18, 0x18 ; 24
00000356 <OneWire_ReadByte>:
356: 98 e0 ldi r25, 0x08 ; 8
358: 80 e0 ldi r24, 0x00 ; 0
35a: 07 c0 rjmp .+14 ; 0x36a <OneWire_ReadByte+0x14>
35c: 22 e9 ldi r18, 0x92 ; 146
35e: 2a 95 dec r18
360: f1 f7 brne .-4 ; 0x35e <OneWire_ReadByte+0x8>
362: 00 c0 rjmp .+0 ; 0x364 <OneWire_ReadByte+0xe>
364: 78 94 sei
366: 91 50 subi r25, 0x01 ; 1
368: 71 f0 breq .+28 ; 0x386 <OneWire_ReadByte+0x30>
36a: f8 94 cli
36c: 86 95 lsr r24
36e: bc 9a sbi 0x17, 4 ; 23
370: 20 e1 ldi r18, 0x10 ; 16
372: 2a 95 dec r18
374: f1 f7 brne .-4 ; 0x372 <OneWire_ReadByte+0x24>
376: b4 9b sbis 0x16, 4 ; 22
378: ed cf rjmp .-38 ; 0x354 <OneWire_ReadByte+0x6>
37a: 80 68 ori r24, 0x80 ; 128
37c: eb cf rjmp .-42 ; 0x354 <OneWire_ReadByte+0x6>
37e: 08 95 ret
00000380 <OneWire_SkipROM>:
380: af df rcall .-162 ; 0x2e0 <OneWire_Presence>
382: 81 11 cpse r24, r1
384: 01 c0 rjmp .+2 ; 0x388 <OneWire_SkipROM+0x8>
374: f1 f7 brne .-4 ; 0x372 <OneWire_ReadByte+0x1c>
376: bc 98 cbi 0x17, 4 ; 23
378: 28 e1 ldi r18, 0x18 ; 24
37a: 2a 95 dec r18
37c: f1 f7 brne .-4 ; 0x37a <OneWire_ReadByte+0x24>
37e: b4 9b sbis 0x16, 4 ; 22
380: ed cf rjmp .-38 ; 0x35c <OneWire_ReadByte+0x6>
382: 80 68 ori r24, 0x80 ; 128
384: eb cf rjmp .-42 ; 0x35c <OneWire_ReadByte+0x6>
386: 08 95 ret
388: 8c ec ldi r24, 0xCC ; 204
38a: c4 df rcall .-120 ; 0x314 <OneWire_WriteByte>
38c: 81 e0 ldi r24, 0x01 ; 1
38e: fb cf rjmp .-10 ; 0x386 <OneWire_SkipROM+0x6>
00000390 <OneWire_ReadROM>:
390: 0f 93 push r16
392: 1f 93 push r17
394: cf 93 push r28
396: df 93 push r29
398: 8c 01 movw r16, r24
39a: a2 df rcall .-188 ; 0x2e0 <OneWire_Presence>
39c: 81 11 cpse r24, r1
39e: 05 c0 rjmp .+10 ; 0x3aa <OneWire_ReadROM+0x1a>
3a0: df 91 pop r29
3a2: cf 91 pop r28
3a4: 1f 91 pop r17
3a6: 0f 91 pop r16
3a8: 08 95 ret
3aa: 83 e3 ldi r24, 0x33 ; 51
3ac: b3 df rcall .-154 ; 0x314 <OneWire_WriteByte>
3ae: e8 01 movw r28, r16
3b0: 08 5f subi r16, 0xF8 ; 248
3b2: 1f 4f sbci r17, 0xFF ; 255
3b4: cc df rcall .-104 ; 0x34e <OneWire_ReadByte>
3b6: 89 93 st Y+, r24
3b8: c0 17 cp r28, r16
3ba: d1 07 cpc r29, r17
3bc: d9 f7 brne .-10 ; 0x3b4 <OneWire_ReadROM+0x24>
3be: 81 e0 ldi r24, 0x01 ; 1
3c0: ef cf rjmp .-34 ; 0x3a0 <OneWire_ReadROM+0x10>
00000388 <OneWire_SkipROM>:
388: af df rcall .-162 ; 0x2e8 <OneWire_Presence>
38a: 81 11 cpse r24, r1
38c: 01 c0 rjmp .+2 ; 0x390 <OneWire_SkipROM+0x8>
38e: 08 95 ret
390: 8c ec ldi r24, 0xCC ; 204
392: c4 df rcall .-120 ; 0x31c <OneWire_WriteByte>
394: 81 e0 ldi r24, 0x01 ; 1
396: fb cf rjmp .-10 ; 0x38e <OneWire_SkipROM+0x6>
000003c2 <OneWire_CRC8_Update>:
3c2: fc 01 movw r30, r24
3c4: 68 0f add r22, r24
3c6: 79 1f adc r23, r25
3c8: 80 e0 ldi r24, 0x00 ; 0
3ca: 2c e8 ldi r18, 0x8C ; 140
3cc: 0b c0 rjmp .+22 ; 0x3e4 <OneWire_CRC8_Update+0x22>
3ce: 86 95 lsr r24
3d0: 91 50 subi r25, 0x01 ; 1
3d2: 29 f0 breq .+10 ; 0x3de <OneWire_CRC8_Update+0x1c>
3d4: 80 ff sbrs r24, 0
3d6: fb cf rjmp .-10 ; 0x3ce <OneWire_CRC8_Update+0xc>
3d8: 86 95 lsr r24
3da: 82 27 eor r24, r18
3dc: f9 cf rjmp .-14 ; 0x3d0 <OneWire_CRC8_Update+0xe>
3de: e6 17 cp r30, r22
3e0: f7 07 cpc r31, r23
3e2: 21 f0 breq .+8 ; 0x3ec <OneWire_CRC8_Update+0x2a>
3e4: 91 91 ld r25, Z+
3e6: 89 27 eor r24, r25
3e8: 98 e0 ldi r25, 0x08 ; 8
3ea: f4 cf rjmp .-24 ; 0x3d4 <OneWire_CRC8_Update+0x12>
3ec: 08 95 ret
00000398 <OneWire_ReadROM>:
398: 0f 93 push r16
39a: 1f 93 push r17
39c: cf 93 push r28
39e: df 93 push r29
3a0: 8c 01 movw r16, r24
3a2: a2 df rcall .-188 ; 0x2e8 <OneWire_Presence>
3a4: 81 11 cpse r24, r1
3a6: 05 c0 rjmp .+10 ; 0x3b2 <OneWire_ReadROM+0x1a>
3a8: df 91 pop r29
3aa: cf 91 pop r28
3ac: 1f 91 pop r17
3ae: 0f 91 pop r16
3b0: 08 95 ret
3b2: 83 e3 ldi r24, 0x33 ; 51
3b4: b3 df rcall .-154 ; 0x31c <OneWire_WriteByte>
3b6: e8 01 movw r28, r16
3b8: 08 5f subi r16, 0xF8 ; 248
3ba: 1f 4f sbci r17, 0xFF ; 255
3bc: cc df rcall .-104 ; 0x356 <OneWire_ReadByte>
3be: 89 93 st Y+, r24
3c0: c0 17 cp r28, r16
3c2: d1 07 cpc r29, r17
3c4: d9 f7 brne .-10 ; 0x3bc <OneWire_ReadROM+0x24>
3c6: 81 e0 ldi r24, 0x01 ; 1
3c8: ef cf rjmp .-34 ; 0x3a8 <OneWire_ReadROM+0x10>
000003ee <DallasTemp_ReadScratchpad>:
3ee: ef 92 push r14
3f0: ff 92 push r15
3f2: 0f 93 push r16
3f4: 1f 93 push r17
3f6: cf 93 push r28
3f8: df 93 push r29
3fa: 7c 01 movw r14, r24
3fc: c1 df rcall .-126 ; 0x380 <OneWire_SkipROM>
3fe: 8e eb ldi r24, 0xBE ; 190
400: 89 df rcall .-238 ; 0x314 <OneWire_WriteByte>
402: e7 01 movw r28, r14
404: 87 01 movw r16, r14
406: 08 5f subi r16, 0xF8 ; 248
408: 1f 4f sbci r17, 0xFF ; 255
40a: a1 df rcall .-190 ; 0x34e <OneWire_ReadByte>
40c: 89 93 st Y+, r24
40e: c0 17 cp r28, r16
410: d1 07 cpc r29, r17
412: d9 f7 brne .-10 ; 0x40a <__LOCK_REGION_LENGTH__+0xa>
414: 68 e0 ldi r22, 0x08 ; 8
416: 70 e0 ldi r23, 0x00 ; 0
418: c7 01 movw r24, r14
41a: d3 df rcall .-90 ; 0x3c2 <OneWire_CRC8_Update>
41c: c8 2f mov r28, r24
41e: 97 df rcall .-210 ; 0x34e <OneWire_ReadByte>
420: 91 e0 ldi r25, 0x01 ; 1
422: c8 13 cpse r28, r24
424: 90 e0 ldi r25, 0x00 ; 0
426: 89 2f mov r24, r25
428: df 91 pop r29
42a: cf 91 pop r28
42c: 1f 91 pop r17
42e: 0f 91 pop r16
430: ff 90 pop r15
432: ef 90 pop r14
434: 08 95 ret
000003ca <OneWire_CRC8_Update>:
3ca: fc 01 movw r30, r24
3cc: 68 0f add r22, r24
3ce: 79 1f adc r23, r25
3d0: 80 e0 ldi r24, 0x00 ; 0
3d2: 2c e8 ldi r18, 0x8C ; 140
3d4: 0b c0 rjmp .+22 ; 0x3ec <OneWire_CRC8_Update+0x22>
3d6: 86 95 lsr r24
3d8: 91 50 subi r25, 0x01 ; 1
3da: 29 f0 breq .+10 ; 0x3e6 <OneWire_CRC8_Update+0x1c>
3dc: 80 ff sbrs r24, 0
3de: fb cf rjmp .-10 ; 0x3d6 <OneWire_CRC8_Update+0xc>
3e0: 86 95 lsr r24
3e2: 82 27 eor r24, r18
3e4: f9 cf rjmp .-14 ; 0x3d8 <OneWire_CRC8_Update+0xe>
3e6: e6 17 cp r30, r22
3e8: f7 07 cpc r31, r23
3ea: 21 f0 breq .+8 ; 0x3f4 <OneWire_CRC8_Update+0x2a>
3ec: 91 91 ld r25, Z+
3ee: 89 27 eor r24, r25
3f0: 98 e0 ldi r25, 0x08 ; 8
3f2: f4 cf rjmp .-24 ; 0x3dc <OneWire_CRC8_Update+0x12>
3f4: 08 95 ret
00000436 <DallasTemp_Convert>:
436: 54 df rcall .-344 ; 0x2e0 <OneWire_Presence>
438: 81 11 cpse r24, r1
43a: 01 c0 rjmp .+2 ; 0x43e <DallasTemp_Convert+0x8>
000003f6 <DallasTemp_ReadScratchpad>:
3f6: ef 92 push r14
3f8: ff 92 push r15
3fa: 0f 93 push r16
3fc: 1f 93 push r17
3fe: cf 93 push r28
400: df 93 push r29
402: 7c 01 movw r14, r24
404: c1 df rcall .-126 ; 0x388 <OneWire_SkipROM>
406: 8e eb ldi r24, 0xBE ; 190
408: 89 df rcall .-238 ; 0x31c <OneWire_WriteByte>
40a: e7 01 movw r28, r14
40c: 87 01 movw r16, r14
40e: 08 5f subi r16, 0xF8 ; 248
410: 1f 4f sbci r17, 0xFF ; 255
412: a1 df rcall .-190 ; 0x356 <OneWire_ReadByte>
414: 89 93 st Y+, r24
416: c0 17 cp r28, r16
418: d1 07 cpc r29, r17
41a: d9 f7 brne .-10 ; 0x412 <__LOCK_REGION_LENGTH__+0x12>
41c: 68 e0 ldi r22, 0x08 ; 8
41e: 70 e0 ldi r23, 0x00 ; 0
420: c7 01 movw r24, r14
422: d3 df rcall .-90 ; 0x3ca <OneWire_CRC8_Update>
424: c8 2f mov r28, r24
426: 97 df rcall .-210 ; 0x356 <OneWire_ReadByte>
428: 91 e0 ldi r25, 0x01 ; 1
42a: c8 13 cpse r28, r24
42c: 90 e0 ldi r25, 0x00 ; 0
42e: 89 2f mov r24, r25
430: df 91 pop r29
432: cf 91 pop r28
434: 1f 91 pop r17
436: 0f 91 pop r16
438: ff 90 pop r15
43a: ef 90 pop r14
43c: 08 95 ret
43e: 8c ec ldi r24, 0xCC ; 204
440: 69 df rcall .-302 ; 0x314 <OneWire_WriteByte>
442: 84 e4 ldi r24, 0x44 ; 68
444: 67 df rcall .-306 ; 0x314 <OneWire_WriteByte>
446: 81 e0 ldi r24, 0x01 ; 1
448: f9 cf rjmp .-14 ; 0x43c <DallasTemp_Convert+0x6>
0000044a <DallasTemp_CheckError>:
44a: cf 93 push r28
44c: df 93 push r29
44e: ec 01 movw r28, r24
450: 47 df rcall .-370 ; 0x2e0 <OneWire_Presence>
452: 81 11 cpse r24, r1
454: 04 c0 rjmp .+8 ; 0x45e <DallasTemp_CheckError+0x14>
456: 81 e0 ldi r24, 0x01 ; 1
458: df 91 pop r29
45a: cf 91 pop r28
45c: 08 95 ret
45e: ce 01 movw r24, r28
460: 08 96 adiw r24, 0x08 ; 8
462: 96 df rcall .-212 ; 0x390 <OneWire_ReadROM>
464: 81 e0 ldi r24, 0x01 ; 1
466: 98 85 ldd r25, Y+8 ; 0x08
468: 98 32 cpi r25, 0x28 ; 40
46a: b1 f7 brne .-20 ; 0x458 <DallasTemp_CheckError+0xe>
46c: 80 e0 ldi r24, 0x00 ; 0
46e: f4 cf rjmp .-24 ; 0x458 <DallasTemp_CheckError+0xe>
0000043e <DallasTemp_CopyScratchpad>:
43e: 54 df rcall .-344 ; 0x2e8 <OneWire_Presence>
440: 81 11 cpse r24, r1
442: 01 c0 rjmp .+2 ; 0x446 <DallasTemp_CopyScratchpad+0x8>
444: 08 95 ret
446: a0 df rcall .-192 ; 0x388 <OneWire_SkipROM>
448: 88 e4 ldi r24, 0x48 ; 72
44a: 68 df rcall .-304 ; 0x31c <OneWire_WriteByte>
44c: 8f e1 ldi r24, 0x1F ; 31
44e: 9e e4 ldi r25, 0x4E ; 78
450: 01 97 sbiw r24, 0x01 ; 1
452: f1 f7 brne .-4 ; 0x450 <DallasTemp_CopyScratchpad+0x12>
454: 00 c0 rjmp .+0 ; 0x456 <DallasTemp_CopyScratchpad+0x18>
456: 00 00 nop
458: 81 e0 ldi r24, 0x01 ; 1
45a: f4 cf rjmp .-24 ; 0x444 <DallasTemp_CopyScratchpad+0x6>
00000470 <DallasTemp_GetTemperature>:
470: cf 93 push r28
472: df 93 push r29
474: ec 01 movw r28, r24
476: df df rcall .-66 ; 0x436 <DallasTemp_Convert>
478: 81 11 cpse r24, r1
47a: 03 c0 rjmp .+6 ; 0x482 <DallasTemp_GetTemperature+0x12>
47c: df 91 pop r29
47e: cf 91 pop r28
480: 08 95 ret
482: 2f e7 ldi r18, 0x7F ; 127
484: 8f e4 ldi r24, 0x4F ; 79
486: 92 e1 ldi r25, 0x12 ; 18
488: 21 50 subi r18, 0x01 ; 1
48a: 80 40 sbci r24, 0x00 ; 0
48c: 90 40 sbci r25, 0x00 ; 0
48e: e1 f7 brne .-8 ; 0x488 <DallasTemp_GetTemperature+0x18>
490: 00 c0 rjmp .+0 ; 0x492 <DallasTemp_GetTemperature+0x22>
492: 00 00 nop
494: ce 01 movw r24, r28
496: ab df rcall .-170 ; 0x3ee <DallasTemp_ReadScratchpad>
498: 88 23 and r24, r24
49a: 81 f3 breq .-32 ; 0x47c <DallasTemp_GetTemperature+0xc>
49c: 29 81 ldd r18, Y+1 ; 0x01
49e: 38 81 ld r19, Y
4a0: 52 2f mov r21, r18
4a2: 43 2f mov r20, r19
4a4: ca 01 movw r24, r20
4a6: 99 23 and r25, r25
4a8: bc f1 brlt .+110 ; 0x518 <DallasTemp_GetTemperature+0xa8>
4aa: 95 95 asr r25
4ac: 87 95 ror r24
4ae: 95 95 asr r25
4b0: 87 95 ror r24
4b2: 95 95 asr r25
4b4: 87 95 ror r24
4b6: 95 95 asr r25
4b8: 87 95 ror r24
4ba: 99 8b std Y+17, r25 ; 0x11
4bc: 88 8b std Y+16, r24 ; 0x10
4be: 28 7f andi r18, 0xF8 ; 248
4c0: 11 f0 breq .+4 ; 0x4c6 <DallasTemp_GetTemperature+0x56>
4c2: 31 95 neg r19
4c4: 38 83 st Y, r19
4c6: 88 81 ld r24, Y
4c8: 8f 70 andi r24, 0x0F ; 15
4ca: 28 2f mov r18, r24
4cc: 30 e0 ldi r19, 0x00 ; 0
4ce: c9 01 movw r24, r18
4d0: 88 0f add r24, r24
4d2: 99 1f adc r25, r25
4d4: 82 95 swap r24
4d6: 92 95 swap r25
4d8: 90 7f andi r25, 0xF0 ; 240
4da: 98 27 eor r25, r24
4dc: 80 7f andi r24, 0xF0 ; 240
4de: 98 27 eor r25, r24
4e0: 82 1b sub r24, r18
4e2: 93 0b sbc r25, r19
4e4: 88 0f add r24, r24
4e6: 99 1f adc r25, r25
4e8: 88 0f add r24, r24
4ea: 99 1f adc r25, r25
4ec: 82 0f add r24, r18
4ee: 93 1f adc r25, r19
4f0: 88 0f add r24, r24
4f2: 99 1f adc r25, r25
4f4: 88 0f add r24, r24
4f6: 99 1f adc r25, r25
4f8: 88 0f add r24, r24
4fa: 99 1f adc r25, r25
4fc: 9c 01 movw r18, r24
4fe: 99 23 and r25, r25
500: 6c f0 brlt .+26 ; 0x51c <DallasTemp_GetTemperature+0xac>
502: 35 95 asr r19
504: 27 95 ror r18
506: 35 95 asr r19
508: 27 95 ror r18
50a: 35 95 asr r19
50c: 27 95 ror r18
50e: 35 95 asr r19
510: 27 95 ror r18
512: 3b 8b std Y+19, r19 ; 0x13
514: 2a 8b std Y+18, r18 ; 0x12
516: b2 cf rjmp .-156 ; 0x47c <DallasTemp_GetTemperature+0xc>
518: 0f 96 adiw r24, 0x0f ; 15
51a: c7 cf rjmp .-114 ; 0x4aa <DallasTemp_GetTemperature+0x3a>
51c: 21 5f subi r18, 0xF1 ; 241
51e: 3f 4f sbci r19, 0xFF ; 255
520: f0 cf rjmp .-32 ; 0x502 <DallasTemp_GetTemperature+0x92>
0000045c <DallasTemp_WriteScratchpad>:
45c: cf 93 push r28
45e: df 93 push r29
460: ec 01 movw r28, r24
462: 92 df rcall .-220 ; 0x388 <OneWire_SkipROM>
464: 8e e4 ldi r24, 0x4E ; 78
466: 5a df rcall .-332 ; 0x31c <OneWire_WriteByte>
468: 88 81 ld r24, Y
46a: 58 df rcall .-336 ; 0x31c <OneWire_WriteByte>
46c: 89 81 ldd r24, Y+1 ; 0x01
46e: 56 df rcall .-340 ; 0x31c <OneWire_WriteByte>
470: 8a 81 ldd r24, Y+2 ; 0x02
472: 54 df rcall .-344 ; 0x31c <OneWire_WriteByte>
474: e4 df rcall .-56 ; 0x43e <DallasTemp_CopyScratchpad>
476: df 91 pop r29
478: cf 91 pop r28
47a: 08 95 ret
00000522 <__udivmodhi4>:
522: aa 1b sub r26, r26
524: bb 1b sub r27, r27
526: 51 e1 ldi r21, 0x11 ; 17
528: 07 c0 rjmp .+14 ; 0x538 <__udivmodhi4_ep>
0000047c <DallasTemp_SetResolution>:
47c: ff 92 push r15
47e: 0f 93 push r16
480: 1f 93 push r17
482: cf 93 push r28
484: df 93 push r29
486: 00 d0 rcall .+0 ; 0x488 <DallasTemp_SetResolution+0xc>
488: 1f 92 push r1
48a: cd b7 in r28, 0x3d ; 61
48c: de b7 in r29, 0x3e ; 62
48e: 8c 01 movw r16, r24
490: f6 2e mov r15, r22
492: b1 df rcall .-158 ; 0x3f6 <DallasTemp_ReadScratchpad>
494: f8 01 movw r30, r16
496: 82 81 ldd r24, Z+2 ; 0x02
498: 89 83 std Y+1, r24 ; 0x01
49a: 83 81 ldd r24, Z+3 ; 0x03
49c: 8a 83 std Y+2, r24 ; 0x02
49e: fa e0 ldi r31, 0x0A ; 10
4a0: ff 16 cp r15, r31
4a2: b9 f0 breq .+46 ; 0x4d2 <DallasTemp_SetResolution+0x56>
4a4: 8b e0 ldi r24, 0x0B ; 11
4a6: f8 16 cp r15, r24
4a8: 89 f0 breq .+34 ; 0x4cc <DallasTemp_SetResolution+0x50>
4aa: e9 e0 ldi r30, 0x09 ; 9
4ac: fe 16 cp r15, r30
4ae: a1 f0 breq .+40 ; 0x4d8 <DallasTemp_SetResolution+0x5c>
4b0: 8f e7 ldi r24, 0x7F ; 127
4b2: 8b 83 std Y+3, r24 ; 0x03
4b4: ce 01 movw r24, r28
4b6: 01 96 adiw r24, 0x01 ; 1
4b8: d1 df rcall .-94 ; 0x45c <DallasTemp_WriteScratchpad>
4ba: 0f 90 pop r0
4bc: 0f 90 pop r0
4be: 0f 90 pop r0
4c0: df 91 pop r29
4c2: cf 91 pop r28
4c4: 1f 91 pop r17
4c6: 0f 91 pop r16
4c8: ff 90 pop r15
4ca: 08 95 ret
4cc: 8f e5 ldi r24, 0x5F ; 95
4ce: 8b 83 std Y+3, r24 ; 0x03
4d0: f1 cf rjmp .-30 ; 0x4b4 <DallasTemp_SetResolution+0x38>
4d2: 8f e3 ldi r24, 0x3F ; 63
4d4: 8b 83 std Y+3, r24 ; 0x03
4d6: ee cf rjmp .-36 ; 0x4b4 <DallasTemp_SetResolution+0x38>
4d8: 8f e1 ldi r24, 0x1F ; 31
4da: 8b 83 std Y+3, r24 ; 0x03
4dc: eb cf rjmp .-42 ; 0x4b4 <DallasTemp_SetResolution+0x38>
0000052a <__udivmodhi4_loop>:
52a: aa 1f adc r26, r26
52c: bb 1f adc r27, r27
52e: a6 17 cp r26, r22
530: b7 07 cpc r27, r23
532: 10 f0 brcs .+4 ; 0x538 <__udivmodhi4_ep>
534: a6 1b sub r26, r22
536: b7 0b sbc r27, r23
000004de <DallasTemp_Convert>:
4de: 04 df rcall .-504 ; 0x2e8 <OneWire_Presence>
4e0: 81 11 cpse r24, r1
4e2: 01 c0 rjmp .+2 ; 0x4e6 <DallasTemp_Convert+0x8>
4e4: 08 95 ret
4e6: 8c ec ldi r24, 0xCC ; 204
4e8: 19 df rcall .-462 ; 0x31c <OneWire_WriteByte>
4ea: 84 e4 ldi r24, 0x44 ; 68
4ec: 17 df rcall .-466 ; 0x31c <OneWire_WriteByte>
4ee: 81 e0 ldi r24, 0x01 ; 1
4f0: f9 cf rjmp .-14 ; 0x4e4 <DallasTemp_Convert+0x6>
00000538 <__udivmodhi4_ep>:
538: 88 1f adc r24, r24
53a: 99 1f adc r25, r25
53c: 5a 95 dec r21
53e: a9 f7 brne .-22 ; 0x52a <__udivmodhi4_loop>
540: 80 95 com r24
542: 90 95 com r25
544: bc 01 movw r22, r24
546: cd 01 movw r24, r26
548: 08 95 ret
000004f2 <DallasTemp_CheckError>:
4f2: cf 93 push r28
4f4: df 93 push r29
4f6: ec 01 movw r28, r24
4f8: f7 de rcall .-530 ; 0x2e8 <OneWire_Presence>
4fa: 81 11 cpse r24, r1
4fc: 04 c0 rjmp .+8 ; 0x506 <DallasTemp_CheckError+0x14>
4fe: 81 e0 ldi r24, 0x01 ; 1
500: df 91 pop r29
502: cf 91 pop r28
504: 08 95 ret
506: ce 01 movw r24, r28
508: 08 96 adiw r24, 0x08 ; 8
50a: 46 df rcall .-372 ; 0x398 <OneWire_ReadROM>
50c: 81 e0 ldi r24, 0x01 ; 1
50e: 98 85 ldd r25, Y+8 ; 0x08
510: 98 32 cpi r25, 0x28 ; 40
512: b1 f7 brne .-20 ; 0x500 <DallasTemp_CheckError+0xe>
514: 80 e0 ldi r24, 0x00 ; 0
516: f4 cf rjmp .-24 ; 0x500 <DallasTemp_CheckError+0xe>
0000054a <__divmodhi4>:
54a: 97 fb bst r25, 7
54c: 07 2e mov r0, r23
54e: 16 f4 brtc .+4 ; 0x554 <__divmodhi4+0xa>
550: 00 94 com r0
552: 06 d0 rcall .+12 ; 0x560 <__divmodhi4_neg1>
554: 77 fd sbrc r23, 7
556: 08 d0 rcall .+16 ; 0x568 <__divmodhi4_neg2>
558: e4 df rcall .-56 ; 0x522 <__udivmodhi4>
55a: 07 fc sbrc r0, 7
55c: 05 d0 rcall .+10 ; 0x568 <__divmodhi4_neg2>
55e: 3e f4 brtc .+14 ; 0x56e <__divmodhi4_exit>
00000518 <DallasTemp_GetTemperature>:
518: cf 93 push r28
51a: df 93 push r29
51c: ec 01 movw r28, r24
51e: df df rcall .-66 ; 0x4de <DallasTemp_Convert>
520: 88 23 and r24, r24
522: 09 f4 brne .+2 ; 0x526 <DallasTemp_GetTemperature+0xe>
524: 56 c0 rjmp .+172 ; 0x5d2 <DallasTemp_GetTemperature+0xba>
526: 2c 81 ldd r18, Y+4 ; 0x04
528: 82 2f mov r24, r18
52a: 90 e0 ldi r25, 0x00 ; 0
52c: 80 95 com r24
52e: 90 95 com r25
530: 80 76 andi r24, 0x60 ; 96
532: 99 27 eor r25, r25
534: 89 2b or r24, r25
536: 09 f0 breq .+2 ; 0x53a <DallasTemp_GetTemperature+0x22>
538: 4f c0 rjmp .+158 ; 0x5d8 <DallasTemp_GetTemperature+0xc0>
53a: 2f e7 ldi r18, 0x7F ; 127
53c: 8f e4 ldi r24, 0x4F ; 79
53e: 92 e1 ldi r25, 0x12 ; 18
540: 21 50 subi r18, 0x01 ; 1
542: 80 40 sbci r24, 0x00 ; 0
544: 90 40 sbci r25, 0x00 ; 0
546: e1 f7 brne .-8 ; 0x540 <DallasTemp_GetTemperature+0x28>
548: 00 c0 rjmp .+0 ; 0x54a <DallasTemp_GetTemperature+0x32>
54a: 00 00 nop
54c: ce 01 movw r24, r28
54e: 53 df rcall .-346 ; 0x3f6 <DallasTemp_ReadScratchpad>
550: 88 23 and r24, r24
552: 09 f4 brne .+2 ; 0x556 <DallasTemp_GetTemperature+0x3e>
554: 3e c0 rjmp .+124 ; 0x5d2 <DallasTemp_GetTemperature+0xba>
556: 29 81 ldd r18, Y+1 ; 0x01
558: 38 81 ld r19, Y
55a: 52 2f mov r21, r18
55c: 43 2f mov r20, r19
55e: ca 01 movw r24, r20
560: 99 23 and r25, r25
562: 0c f4 brge .+2 ; 0x566 <DallasTemp_GetTemperature+0x4e>
564: 5b c0 rjmp .+182 ; 0x61c <DallasTemp_GetTemperature+0x104>
566: 95 95 asr r25
568: 87 95 ror r24
56a: 95 95 asr r25
56c: 87 95 ror r24
56e: 95 95 asr r25
570: 87 95 ror r24
572: 95 95 asr r25
574: 87 95 ror r24
576: 99 8b std Y+17, r25 ; 0x11
578: 88 8b std Y+16, r24 ; 0x10
57a: 28 7f andi r18, 0xF8 ; 248
57c: 11 f0 breq .+4 ; 0x582 <DallasTemp_GetTemperature+0x6a>
57e: 31 95 neg r19
580: 38 83 st Y, r19
582: 88 81 ld r24, Y
584: 8f 70 andi r24, 0x0F ; 15
586: 28 2f mov r18, r24
588: 30 e0 ldi r19, 0x00 ; 0
58a: c9 01 movw r24, r18
58c: 88 0f add r24, r24
58e: 99 1f adc r25, r25
590: 82 95 swap r24
592: 92 95 swap r25
594: 90 7f andi r25, 0xF0 ; 240
596: 98 27 eor r25, r24
598: 80 7f andi r24, 0xF0 ; 240
59a: 98 27 eor r25, r24
59c: 82 1b sub r24, r18
59e: 93 0b sbc r25, r19
5a0: 88 0f add r24, r24
5a2: 99 1f adc r25, r25
5a4: 88 0f add r24, r24
5a6: 99 1f adc r25, r25
5a8: 82 0f add r24, r18
5aa: 93 1f adc r25, r19
5ac: 88 0f add r24, r24
5ae: 99 1f adc r25, r25
5b0: 88 0f add r24, r24
5b2: 99 1f adc r25, r25
5b4: 88 0f add r24, r24
5b6: 99 1f adc r25, r25
5b8: 9c 01 movw r18, r24
5ba: 99 23 and r25, r25
5bc: 8c f1 brlt .+98 ; 0x620 <DallasTemp_GetTemperature+0x108>
5be: 35 95 asr r19
5c0: 27 95 ror r18
5c2: 35 95 asr r19
5c4: 27 95 ror r18
5c6: 35 95 asr r19
5c8: 27 95 ror r18
5ca: 35 95 asr r19
5cc: 27 95 ror r18
5ce: 3b 8b std Y+19, r19 ; 0x13
5d0: 2a 8b std Y+18, r18 ; 0x12
5d2: df 91 pop r29
5d4: cf 91 pop r28
5d6: 08 95 ret
5d8: 26 ff sbrs r18, 6
5da: 0a c0 rjmp .+20 ; 0x5f0 <DallasTemp_GetTemperature+0xd8>
5dc: 2f eb ldi r18, 0xBF ; 191
5de: 87 e2 ldi r24, 0x27 ; 39
5e0: 99 e0 ldi r25, 0x09 ; 9
5e2: 21 50 subi r18, 0x01 ; 1
5e4: 80 40 sbci r24, 0x00 ; 0
5e6: 90 40 sbci r25, 0x00 ; 0
5e8: e1 f7 brne .-8 ; 0x5e2 <DallasTemp_GetTemperature+0xca>
5ea: 00 c0 rjmp .+0 ; 0x5ec <DallasTemp_GetTemperature+0xd4>
5ec: 00 00 nop
5ee: ae cf rjmp .-164 ; 0x54c <DallasTemp_GetTemperature+0x34>
5f0: 25 ff sbrs r18, 5
5f2: 0a c0 rjmp .+20 ; 0x608 <DallasTemp_GetTemperature+0xf0>
5f4: 2f ef ldi r18, 0xFF ; 255
5f6: 86 e9 ldi r24, 0x96 ; 150
5f8: 94 e0 ldi r25, 0x04 ; 4
5fa: 21 50 subi r18, 0x01 ; 1
5fc: 80 40 sbci r24, 0x00 ; 0
5fe: 90 40 sbci r25, 0x00 ; 0
600: e1 f7 brne .-8 ; 0x5fa <DallasTemp_GetTemperature+0xe2>
602: 00 c0 rjmp .+0 ; 0x604 <DallasTemp_GetTemperature+0xec>
604: 00 00 nop
606: a2 cf rjmp .-188 ; 0x54c <DallasTemp_GetTemperature+0x34>
608: 2f e7 ldi r18, 0x7F ; 127
60a: 8b e4 ldi r24, 0x4B ; 75
60c: 92 e0 ldi r25, 0x02 ; 2
60e: 21 50 subi r18, 0x01 ; 1
610: 80 40 sbci r24, 0x00 ; 0
612: 90 40 sbci r25, 0x00 ; 0
614: e1 f7 brne .-8 ; 0x60e <DallasTemp_GetTemperature+0xf6>
616: 00 c0 rjmp .+0 ; 0x618 <DallasTemp_GetTemperature+0x100>
618: 00 00 nop
61a: 98 cf rjmp .-208 ; 0x54c <DallasTemp_GetTemperature+0x34>
61c: 0f 96 adiw r24, 0x0f ; 15
61e: a3 cf rjmp .-186 ; 0x566 <DallasTemp_GetTemperature+0x4e>
620: 21 5f subi r18, 0xF1 ; 241
622: 3f 4f sbci r19, 0xFF ; 255
624: cc cf rjmp .-104 ; 0x5be <DallasTemp_GetTemperature+0xa6>
00000560 <__divmodhi4_neg1>:
560: 90 95 com r25
562: 81 95 neg r24
564: 9f 4f sbci r25, 0xFF ; 255
566: 08 95 ret
00000626 <__udivmodhi4>:
626: aa 1b sub r26, r26
628: bb 1b sub r27, r27
62a: 51 e1 ldi r21, 0x11 ; 17
62c: 07 c0 rjmp .+14 ; 0x63c <__udivmodhi4_ep>
00000568 <__divmodhi4_neg2>:
568: 70 95 com r23
56a: 61 95 neg r22
56c: 7f 4f sbci r23, 0xFF ; 255
0000062e <__udivmodhi4_loop>:
62e: aa 1f adc r26, r26
630: bb 1f adc r27, r27
632: a6 17 cp r26, r22
634: b7 07 cpc r27, r23
636: 10 f0 brcs .+4 ; 0x63c <__udivmodhi4_ep>
638: a6 1b sub r26, r22
63a: b7 0b sbc r27, r23
0000056e <__divmodhi4_exit>:
56e: 08 95 ret
0000063c <__udivmodhi4_ep>:
63c: 88 1f adc r24, r24
63e: 99 1f adc r25, r25
640: 5a 95 dec r21
642: a9 f7 brne .-22 ; 0x62e <__udivmodhi4_loop>
644: 80 95 com r24
646: 90 95 com r25
648: bc 01 movw r22, r24
64a: cd 01 movw r24, r26
64c: 08 95 ret
00000570 <_exit>:
570: f8 94 cli
0000064e <__divmodhi4>:
64e: 97 fb bst r25, 7
650: 07 2e mov r0, r23
652: 16 f4 brtc .+4 ; 0x658 <__divmodhi4+0xa>
654: 00 94 com r0
656: 06 d0 rcall .+12 ; 0x664 <__divmodhi4_neg1>
658: 77 fd sbrc r23, 7
65a: 08 d0 rcall .+16 ; 0x66c <__divmodhi4_neg2>
65c: e4 df rcall .-56 ; 0x626 <__udivmodhi4>
65e: 07 fc sbrc r0, 7
660: 05 d0 rcall .+10 ; 0x66c <__divmodhi4_neg2>
662: 3e f4 brtc .+14 ; 0x672 <__divmodhi4_exit>
00000572 <__stop_program>:
572: ff cf rjmp .-2 ; 0x572 <__stop_program>
00000664 <__divmodhi4_neg1>:
664: 90 95 com r25
666: 81 95 neg r24
668: 9f 4f sbci r25, 0xFF ; 255
66a: 08 95 ret
0000066c <__divmodhi4_neg2>:
66c: 70 95 com r23
66e: 61 95 neg r22
670: 7f 4f sbci r23, 0xFF ; 255
00000672 <__divmodhi4_exit>:
672: 08 95 ret
00000674 <_exit>:
674: f8 94 cli
00000676 <__stop_program>:
676: ff cf rjmp .-2 ; 0x676 <__stop_program>

View File

@ -22,8 +22,6 @@ Discarded input sections
.text 0x0000000000000000 0x0 build/default/production/dstemperature.o
.data 0x0000000000000000 0x0 build/default/production/dstemperature.o
.bss 0x0000000000000000 0x0 build/default/production/dstemperature.o
.text.DallasTemp_WriteScratchpad
0x0000000000000000 0x32 build/default/production/dstemperature.o
.text 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
.data 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
.bss 0x0000000000000000 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
@ -197,7 +195,7 @@ END GROUP
.rela.plt
*(.rela.plt)
.text 0x0000000000000000 0x574
.text 0x0000000000000000 0x678
*(.vectors)
.vectors 0x0000000000000000 0x1e /home/sergeyyarkov/.mchp_packs/Microchip/ATtiny_DFP/3.0.151/gcc/dev/attiny45/avr25/crtattiny45.o
0x0000000000000000 __vectors
@ -298,50 +296,59 @@ END GROUP
.text.TM1637_DisplayFixedNum
0x0000000000000176 0x120 build/default/production/main.o
0x0000000000000176 TM1637_DisplayFixedNum
.text.main 0x0000000000000296 0x4a build/default/production/main.o
.text.main 0x0000000000000296 0x52 build/default/production/main.o
0x0000000000000296 main
.text.OneWire_Presence
0x00000000000002e0 0x34 build/default/production/onewire.o
0x00000000000002e0 OneWire_Presence
0x00000000000002e8 0x34 build/default/production/onewire.o
0x00000000000002e8 OneWire_Presence
.text.OneWire_WriteByte
0x0000000000000314 0x3a build/default/production/onewire.o
0x0000000000000314 OneWire_WriteByte
0x000000000000031c 0x3a build/default/production/onewire.o
0x000000000000031c OneWire_WriteByte
.text.OneWire_ReadByte
0x000000000000034e 0x32 build/default/production/onewire.o
0x000000000000034e OneWire_ReadByte
0x0000000000000356 0x32 build/default/production/onewire.o
0x0000000000000356 OneWire_ReadByte
.text.OneWire_SkipROM
0x0000000000000380 0x10 build/default/production/onewire.o
0x0000000000000380 OneWire_SkipROM
0x0000000000000388 0x10 build/default/production/onewire.o
0x0000000000000388 OneWire_SkipROM
.text.OneWire_ReadROM
0x0000000000000390 0x32 build/default/production/onewire.o
0x0000000000000390 OneWire_ReadROM
0x0000000000000398 0x32 build/default/production/onewire.o
0x0000000000000398 OneWire_ReadROM
.text.OneWire_CRC8_Update
0x00000000000003c2 0x2c build/default/production/onewire.o
0x00000000000003c2 OneWire_CRC8_Update
0x00000000000003ca 0x2c build/default/production/onewire.o
0x00000000000003ca OneWire_CRC8_Update
.text.DallasTemp_ReadScratchpad
0x00000000000003ee 0x48 build/default/production/dstemperature.o
0x00000000000003ee DallasTemp_ReadScratchpad
0x00000000000003f6 0x48 build/default/production/dstemperature.o
0x00000000000003f6 DallasTemp_ReadScratchpad
.text.DallasTemp_CopyScratchpad
0x000000000000043e 0x1e build/default/production/dstemperature.o
0x000000000000043e DallasTemp_CopyScratchpad
.text.DallasTemp_WriteScratchpad
0x000000000000045c 0x20 build/default/production/dstemperature.o
0x000000000000045c DallasTemp_WriteScratchpad
.text.DallasTemp_SetResolution
0x000000000000047c 0x62 build/default/production/dstemperature.o
0x000000000000047c DallasTemp_SetResolution
.text.DallasTemp_Convert
0x0000000000000436 0x14 build/default/production/dstemperature.o
0x0000000000000436 DallasTemp_Convert
0x00000000000004de 0x14 build/default/production/dstemperature.o
0x00000000000004de DallasTemp_Convert
.text.DallasTemp_CheckError
0x000000000000044a 0x26 build/default/production/dstemperature.o
0x000000000000044a DallasTemp_CheckError
0x00000000000004f2 0x26 build/default/production/dstemperature.o
0x00000000000004f2 DallasTemp_CheckError
.text.DallasTemp_GetTemperature
0x0000000000000470 0xb2 build/default/production/dstemperature.o
0x0000000000000470 DallasTemp_GetTemperature
0x0000000000000518 0x10e build/default/production/dstemperature.o
0x0000000000000518 DallasTemp_GetTemperature
.text.libgcc.div
0x0000000000000522 0x28 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
0x0000000000000522 __udivmodhi4
0x0000000000000626 0x28 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_udivmodhi4.o)
0x0000000000000626 __udivmodhi4
.text.libgcc.div
0x000000000000054a 0x26 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_divmodhi4.o)
0x000000000000054a __divmodhi4
0x000000000000054a _div
0x0000000000000570 . = ALIGN (0x2)
0x000000000000064e 0x26 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_divmodhi4.o)
0x000000000000064e __divmodhi4
0x000000000000064e _div
0x0000000000000674 . = ALIGN (0x2)
*(.fini9)
.fini9 0x0000000000000570 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
0x0000000000000570 exit
0x0000000000000570 _exit
.fini9 0x0000000000000674 0x0 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
0x0000000000000674 exit
0x0000000000000674 _exit
*(.fini9)
*(.fini8)
*(.fini8)
@ -360,11 +367,11 @@ END GROUP
*(.fini1)
*(.fini1)
*(.fini0)
.fini0 0x0000000000000570 0x4 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
.fini0 0x0000000000000674 0x4 /opt/avr8-gnu-toolchain-linux_x86_64/bin/../lib/gcc/avr/7.3.0/avr25/libgcc.a(_exit.o)
*(.fini0)
0x0000000000000574 _etext = .
0x0000000000000678 _etext = .
.data 0x0000000000800060 0x0 load address 0x0000000000000574
.data 0x0000000000800060 0x0 load address 0x0000000000000678
[!provide] PROVIDE (__data_start, .)
*(.data)
*(.data*)
@ -382,8 +389,8 @@ END GROUP
*(.bss*)
*(COMMON)
[!provide] PROVIDE (__bss_end, .)
0x0000000000000574 __data_load_start = LOADADDR (.data)
0x0000000000000574 __data_load_end = (__data_load_start + SIZEOF (.data))
0x0000000000000678 __data_load_start = LOADADDR (.data)
0x0000000000000678 __data_load_end = (__data_load_start + SIZEOF (.data))
.noinit 0x0000000000800060 0x0
[!provide] PROVIDE (__noinit_start, .)

View File

@ -16,6 +16,15 @@ uint8_t DallasTemp_ReadScratchpad(uint8_t *scratchpad) {
return 1;
}
// TODO parasite power
uint8_t DallasTemp_CopyScratchpad(void) {
if (!OneWire_Presence()) return 0;
OneWire_SkipROM();
OneWire_WriteByte(DS18B20_CMD_CPSCRATCHPAD);
_delay_ms(10);
return 1;
}
void DallasTemp_WriteScratchpad(uint8_t *data) {
uint8_t i = 3;
@ -26,14 +35,33 @@ void DallasTemp_WriteScratchpad(uint8_t *data) {
OneWire_WriteByte(*data++);
} while (--i);
OneWire_Presence();
DallasTemp_CopyScratchpad();
}
void DallasTemp_SetResolution(DallasSensor *Sensor, uint8_t r) {
DallasTemp_ReadScratchpad(Sensor->SCRATCHPAD);
// TODO вынести в отдельную функцию DallasTemp_CopyScratchpad
OneWire_SkipROM();
OneWire_WriteByte(0x48);
uint8_t data[3] = { Sensor->SCRATCHPAD[2], Sensor->SCRATCHPAD[3], 0x7f };
_delay_ms(10);
switch(r) {
case 12:
data[2] = 0x7f;
break;
case 11:
data[2] = 0x5f;
break;
case 10:
data[2] = 0x3f;
break;
case 9:
data[2] = 0x1f;
break;
default:
data[2] = 0x7f;
break;
}
DallasTemp_WriteScratchpad(data);
}
uint8_t DallasTemp_Convert(void) {
@ -52,7 +80,17 @@ uint8_t DallasTemp_CheckError(DallasSensor* Sensor) {
void DallasTemp_GetTemperature(DallasSensor *Sensor) {
if (!DallasTemp_Convert()) return;
_delay_ms(750); // TODO задержку делать в зависимости от разрешения АЦП датчика
if (!(~Sensor->SCRATCHPAD[4] & 0x60)) {
_delay_ms(750);
} else if (!(~Sensor->SCRATCHPAD[4] & 0x40)) {
_delay_ms(375);
} else if (!(~Sensor->SCRATCHPAD[4] & 0x20)) {
_delay_ms(188);
} else {
_delay_ms(94);
}
if (!DallasTemp_ReadScratchpad(Sensor->SCRATCHPAD)) return;
Sensor->TEMPERATURE = ((Sensor->SCRATCHPAD[1] << 8) | Sensor->SCRATCHPAD[0]) / 16;

View File

@ -3,6 +3,7 @@
#define DS18B20_CMD_CONVERTTEMP 0x44
#define DS18B20_CMD_RSCRATCHPAD 0xbe
#define DS18B20_CMD_WSCRATCHPAD 0x4e
#define DS18B20_CMD_CPSCRATCHPAD 0x48
#define DS18B20_CONST_FAMILY_CODE 0x28
#ifndef DSTEMPERATURE_H
@ -15,7 +16,7 @@ typedef struct DallasSensor {
uint16_t TEMPERATURE_FRACTION; // Дробная часть
} DallasSensor;
// TODO сделать функию установки разрешения АЦП датчика
// TODO сделать чтобы все работало с несколькими датчиками а не с одним (выполнять команду skiprom если один датчик, иначе выбирать к какому датчику обращаться)
/**
* Читает ОЗУ датчика
@ -30,12 +31,29 @@ uint8_t DallasTemp_ReadScratchpad(uint8_t *scratchpad);
*/
void DallasTemp_WriteScratchpad(uint8_t *data);
/**
* Перемещает данные из ОЗУ в EEPROM датчика
* @return "1" - данные успешно записаны, "0" - если не было ответа от датчика
*/
uint8_t DallasTemp_CopyScratchpad(void);
/**
* Отправляет команду для оцифровки температуры.
* @return "1" - если команда отправлена, "0" - если не было ответа от датчика
*/
uint8_t DallasTemp_Convert(void);
/**
* Задает разрешение АЦП датчика
* Время оцифровки:
* - 12 бит - 750ms
* - 11 бит - 375ms
* - 10 бит - 187.5ms
* - 9 бит - 93.75ms
* @param r - разрешение АЦП (от 9 до 12)
*/
void DallasTemp_SetResolution(DallasSensor *Sensor, uint8_t r);
/**
* Получает оцифрованное значение датчика и конвертирует занчение в читаемый вид.
* @param Sensor - датчика

2
main.c
View File

@ -232,6 +232,8 @@ void TM1637_DisplayFixedNum(int16_t num, uint8_t frac, uint8_t presicion) {
int main(void) {
DallasSensor Sensor_01;
DallasTemp_SetResolution(&Sensor_01, 11);
TM1637_Init(PORT_TWI_DIO, PORT_TWI_CLK, TM1637_BRIGHTNESS_2, TM1637_DISP_ON);
TM1637_DisplayLine();