From: hackbard Date: Wed, 10 Dec 2003 03:12:23 +0000 (+0000) Subject: work on season_junior.asm X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=448a02069232f473cbdde6b2aa698d062bd3876a;p=my-code%2Fatmel.git work on season_junior.asm --- diff --git a/beginners/season_junior.asm b/beginners/season_junior.asm index b955152..94ba21c 100644 --- a/beginners/season_junior.asm +++ b/beginners/season_junior.asm @@ -3,44 +3,55 @@ ; author: hackbard@hackdaworld.dyndns.org ; + +; at90s2313 +; setup: +; vcc card --- vcc cam +; rst card --- rst cam --- atmel t0 (pd4) +; clk card --- clk cam --- atmel t1 (pd5) +; gnd card --- gnd cam --- atmel gnd +; i/o card --- atmel int0 (pd2) +; i/o cam --- atmel int1 (pd3) + include "../include/2313def.inc" + ; ; interrupt vectors: ; ; reset -rjmp INIT ; init routine +rjmp INIT -; int 0 -rjmp REC_FROM_CARD ; smartcard sends data, we listen +; int0 +rjmp REC_CARD -; int 1 -rjmp REC_FROM_CAM ; cam sends data, we listen +; int1 +rjmp REC_CAM ; timer/counter capt 1 -reti ; we just count the smartcard clocks +reti ; timer/counter compare -reti ; not in use +reti ; timer/counter overflow 1 -reti ; not in use +rjmp T1_OVERFLOW ; timer/counter overflow 0 -reti ; not in use +reti ; uart rx complete -reti ; maybe we need it later +reti ; uart data register empty -reti ; maybe we need it later +reti ; uart tx complete -reti ; maybe we need it later +reti ; analog comparator -reti ; not in use +reti ; ; init routine @@ -52,8 +63,31 @@ INIT: ldi r16,low(RAMEND) out SPL,r16 +; enable interrupts int0,int1 +ldi r16,((1<