X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=beginners%2Fseason_junior.asm;h=8380e9215d7cdb6d4d04181f0ebe475d109c48e4;hb=c8b18c7c3560c9de4704291ca764cd1041228380;hp=94ba21c6ccf34330ea351fc4b7e798329e8d8213;hpb=448a02069232f473cbdde6b2aa698d062bd3876a;p=my-code%2Fatmel.git diff --git a/beginners/season_junior.asm b/beginners/season_junior.asm index 94ba21c..8380e92 100644 --- a/beginners/season_junior.asm +++ b/beginners/season_junior.asm @@ -6,15 +6,32 @@ ; at90s2313 ; setup: -; vcc card --- vcc cam -; rst card --- rst cam --- atmel t0 (pd4) -; clk card --- clk cam --- atmel t1 (pd5) +; vcc card --- atmel vcc +; vcc cam --- +; rst cam --- atmel int0 (pd2) +; rst card --- atmel (pd4) +; clk card -\ +; - atmel t1 (pd5) +; clk cam -/ ; gnd card --- gnd cam --- atmel gnd -; i/o card --- atmel int0 (pd2) +; i/o card --- atmel icp (pd6) ; i/o cam --- atmel int1 (pd3) -include "../include/2313def.inc" +.include "../include/2313def.inc" +; functions by now: +; +; stupid mode only by now. just see what cam/card do and redirect +; this to card/cam. +; +; next implementation: +; +; try to read one byte of card/cam communication and output via uart. +; output time information in some way. +; +; future: +; +; buffer/parse whole strings and decide whether to send to card or not. ; ; interrupt vectors: @@ -24,19 +41,19 @@ include "../include/2313def.inc" rjmp INIT ; int0 -rjmp REC_CARD +rjmp RST_CAM ; int1 rjmp REC_CAM ; timer/counter capt 1 -reti +rjmp REC_CARD ; timer/counter compare reti ; timer/counter overflow 1 -rjmp T1_OVERFLOW +rjmp CLK_OVERFLOW ; timer/counter overflow 0 reti @@ -45,7 +62,7 @@ reti reti ; uart data register empty -reti +rjmp UART_OUT ; uart tx complete reti @@ -57,6 +74,9 @@ reti ; init routine ; +MAIN: +rjmp MAIN + INIT: ; set stackpointer @@ -67,27 +87,185 @@ out SPL,r16 ldi r16,((1<