attiny2313a_thermostat/firmware.lst
2023-01-24 01:32:27 +03:00

164 lines
7.1 KiB
Plaintext

gavrasm Gerd's AVR assembler version 5.4 (C)2022 by DG4FAC
----------------------------------------------------------
Path: /home/sergeyyarkov/Documents/Applications/attiny2313a_thermostat/
Source file: firmware.asm
Hex file: firmware.hex
Eeprom file: firmware.eep
Compiled: 24.01.2023, 01:15:04
Pass: 2
1: ;
2: ; Project name: thermostat
3: ; Description: Electronic thermostat on AVR Microcontroller
4: ; Source code: https://github.com/sergeyyarkov/attiny2313a_thermostat
5: ; Device: ATtiny2313A
6: ; Device Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/doc8246.pdf
7: ; Package: SOIC-20W_7.5x12.8mm_P1.27mm
8: ; Assembler: AVR macro assembler 2.2.7
9: ; Clock frequency: 12 MHz External Crystal Oscillator
10: ; Fuses: lfuse: 0x4F, hfuse: 0x9F, efuse: 0xFF, lock: 0xFF
11: ;
12: ; Written by Sergey Yarkov 22.01.2023
13:
14: .INCLUDE "tn2313Adef.inc"
-> Warning 009: Include defs not necessary, using internal values!
File: /home/sergeyyarkov/Documents/Applications/attiny2313a_thermostat/firmware.asm, Line: 14
Source line: .INCLUDE "tn2313Adef.inc"
15: .LIST
16:
17: .DEF tmp_r_a = r16
18:
19: ;========================================;
20: ; LABELS ;
21: ;========================================;
22:
23: .EQU LED_POWER_PORT = PD6
24:
25:
26: ;========================================;
27: ; CODE SEGMENT ;
28: ;========================================;
29:
30: .CSEG
31: .ORG 0x00
32:
33: ;========================================;
34: ; VECTORS ;
35: ;========================================;
36:
37: 000000 C014 rjmp RESET_vect ; Program start at RESET vector
38: 000001 9518 reti ; External Interrupt Request 0 / inactive
39: 000002 9518 reti ; External Interrupt Request 1 / inactive
40: 000003 9518 reti ; Timer/Counter1 Capture Event / inactive
41: 000004 9518 reti ; Timer/Counter1 Compare Match A / inactive
42: 000005 9518 reti ; Timer/Counter1 Overflow / inactive
43: 000006 9518 reti ; Timer/Counter0 Overflow / inactive
44: 000007 9518 reti ; USART0, Rx Complete / inactive
45: 000008 9518 reti ; USART0 Data Register Empty / inactive
46: 000009 9518 reti ; USART0, Tx Complete / inactive
47: 00000A 9518 reti ; Analog Comparator / inactive
48: 00000B 9518 reti ; Pin Change Interrupt Request 0/ inactive
49: 00000C 9518 reti ; Timer/Counter1 Compare Match B / inactive
50: 00000D 9518 reti ; Timer/Counter0 Compare Match A / inactive
51: 00000E 9518 reti ; Timer/Counter0 Compare Match B / inactive
52: 00000F 9518 reti ; USI Start Condition/ inactive
53: 000010 9518 reti ; USI Overflow / inactive
54: 000011 9518 reti ; EEPROM Ready/ inactive
55: 000012 9518 reti ; Watchdog Timer Overflow / inactive
56: 000013 9518 reti ; Pin Change Interrupt Request 1 / inactive
57: 000014 9518 reti ; Pin Change Interrupt Request 2 / inactive
58:
59: RESET_vect:
60: ;
61: ; INIT STACK POINTER
62: 000015 ED0F ldi tmp_r_a, low(RAMEND)
63: 000016 BF0D out SPL, tmp_r_a
64:
65: MCU_INIT:
66: 000017 D001 rcall INIT_PORTS
67: 000018 C004 rjmp LOOP
68:
69: INIT_PORTS:
70: 000019 E400 ldi r16, (1<<LED_POWER_PORT)
71: 00001A BB01 out DDRD, r16
72: 00001B BB02 out PORTD, r16
73: 00001C 9508 ret
74:
75: ;========================================;
76: ; MAIN PROGRAM LOOP ;
77: ;========================================;
78:
79: LOOP:
80: 00001D E400 ldi r16, (1<<LED_POWER_PORT)
81: 00001E BB02 out PORTD, r16
82:
83: 00001F D006 rcall DELAY
84: 000020 D005 rcall DELAY
85:
86: 000021 E000 ldi r16, (0<<LED_POWER_PORT)
87: 000022 BB02 out PORTD, r16
88:
89: 000023 D002 rcall DELAY
90: 000024 D001 rcall DELAY
91:
92: 000025 CFF7 rjmp LOOP
93:
94: DELAY:
95: 000026 E302 ldi r16, 50 ; 1 clock cycle
96: _DEL_1:
97: 000027 EF1F ldi r17, 255 ; 1 clock cycle
98: _DEL_2:
99: 000028 951A dec r17 ; 1 clock cycle
100: 000029 0000 nop ; 1 clock cycle
101: 00002A F7E9 brne _DEL_2 ; 2 clock cycle when jumping / 1 when continue
102:
103: 00002B 950A dec r16 ; 1 clock cycle
104: 00002C F7D1 brne _DEL_1 ; 2 clock cycle when jumping / 1 when continue
105: 00002D 9508 ret
106:
107: INFO: .DB "AVR Thermostat. Written by Sergey Yarkov 22.01.2023"
-> Warning 004: Number of bytes on line is odd, added 00 to fit program memory!
File: /home/sergeyyarkov/Documents/Applications/attiny2313a_thermostat/firmware.asm, Line: 107
Source line: INFO: .DB "AVR Thermostat. Written by Sergey Yarkov 22.01.2023"
00002E 5641 2052 4854 5245
000032 4F4D 5453 5441 202E
000036 5257 5449 4554 204E
00003A 5942 5320 5245 4547
00003E 2059 4159 4B52 564F
000042 3220 2E32 3130 322E
000046 3230 0033
108:
109: ;========================================;
110: ; EEPROM SEGMENT ;
111: ;========================================;
112:
113: .ESEG
List of symbols:
Type nDef nUsed Decimalval Hexval Name
T 1 1 89 59 ATTINY2313A
L 1 2 21 15 RESET_VECT
L 1 0 23 17 MCU_INIT
L 1 2 25 19 INIT_PORTS
L 1 4 29 1D LOOP
L 1 8 38 26 DELAY
L 1 2 39 27 _DEL_1
L 1 2 40 28 _DEL_2
L 1 0 46 2E INFO
R 1 2 16 10 TMP_R_A
C 1 0 23 17 NOW_Y
C 1 0 1 01 NOW_M
C 1 0 24 18 NOW_D
C 1 0 44950 AF96 NOW_I
C 1 3 6 06 LED_POWER_PORT
No macros.
Program : 46 words.
Constants : 26 words.
Total program memory: 72 words.
Eeprom space : 0 bytes.
Data segment : 0 bytes.
Compilation completed, no errors.
Compilation ended 24.01.2023, 01:15:04