AVRASM ver. 2.2.7 firmware.asm Sat Feb 25 23:36:49 2023 firmware.asm(14): Including file 'tn2313Adef.inc' firmware.asm(14): Including file 'tn2313Adef.inc' ; Project name: thermostat ; Description: Electronic thermostat on AVR Microcontroller ; Source code: https://github.com/sergeyyarkov/attiny2313a_thermostat ; Device: ATtiny2313A ; Device Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/doc8246.pdf ; Package: SOIC-20W_7.5x12.8mm_P1.27mm ; Assembler: AVR macro assembler 2.2.7 ; Clock frequency: 8 MHz External Crystal Oscillator ; Fuses: lfuse: 0xCF, hfuse: 0x9F, efuse: 0xFF, lock: 0xFF ; ; Written by Sergey Yarkov 22.01.2023 .INCLUDE "tn2313Adef.inc" ;***** Created: 2011-02-09 12:04 ******* Source: ATtiny2313A.xml ********* ;************************************************************************* ;* A P P L I C A T I O N N O T E F O R T H E A V R F A M I L Y ;* ;* Number : AVR000 ;* File Name : "tn2313Adef.inc" ;* Title : Register/Bit Definitions for the ATtiny2313A ;* Date : 2011-02-09 ;* Version : 2.35 ;* Support E-mail : avr@atmel.com ;* Target MCU : ATtiny2313A ;* ;* DESCRIPTION ;* When including this file in the assembly program file, all I/O register ;* names and I/O register bit names appearing in the data book can be used. ;* In addition, the six registers forming the three data pointers X, Y and ;* Z have been assigned names XL - ZH. Highest RAM address for Internal ;* SRAM is also defined ;* ;* The Register names are represented by their hexadecimal address. ;* ;* The Register Bit names are represented by their bit number (0-7). ;* ;* Please observe the difference in using the bit names with instructions ;* such as "sbr"/"cbr" (set/clear bit in register) and "sbrs"/"sbrc" ;* (skip if bit in register set/cleared). The following example illustrates ;* this: ;* ;* in r16,PORTB ;read PORTB latch ;* sbr r16,(1< OUT PD6 ; ; - This LED is used to indicate that device ; ; is working correctly ; ; 7SEG DIGIT 1 <-------------> OUT PD2 ; ; 7SEG DIGIT 2 <-------------> OUT PD3 ; ; 7SEG DIGIT 3 <-------------> OUT PD4 ; ; 7SEG DIGIT 4 <-------------> OUT PD5 ; ; ; ; USI CLOCK PIN <-------------> OUT PB0 ; ; USI DATA OUT PIN <-------------> OUT PB6 ; ; USI LATCH PIN <-------------> OUT PB7 ; ;=======================================================; 000003 e70c ldi r16, (1< USI Wire Mode ; USICS1 <--------------> USI Clock Source Select ; USICLK <--------------> USI Clock Strobe ; USITC <--------------> USI Toggle Clock (Enable clock generation) 00001a e10b ldi TEMP_REG_A, (1<