commit b48cacc91ae06fe0b7453fcd620aff890b63c270 Author: sergeyyarkov Date: Fri Oct 6 19:25:51 2023 +0300 project diff --git a/firmware.asm b/firmware.asm new file mode 100644 index 0000000..777e3ca --- /dev/null +++ b/firmware.asm @@ -0,0 +1,213 @@ +; Project name: Traffic Lights +; Description: Simple program of traffic lights on AVR microcontroller. +; Source code: https://github.com/sergeyyarkov/attiny24a_traffic-lights +; Device: ATtiny45v +; Assembler: AVR macro assembler 2.2.7 +; Clock frequency: 1MHz +; Fuses: lfuse: , hfuse: , efuse: , lock: +; +; Written by Sergey Yarkov 06.10.2023 + +.LIST + +.INCLUDE "definitions.asm" + +.MACRO stsi + ldi t1, @1 + sts @0, t1 +.ENDMACRO + +.DSEG +.ORG SRAM_START + +STATE: .BYTE 1 + +.CSEG + +.ORG 0x00 + rjmp RESET_vect + +.ORG 0x03 + rjmp TIMER1_COMPA + +RESET_vect: + ldi t1, LOW(RAMEND) + out SPL, t1 + +INIT: + ldi t1, (1<