X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=beginners%2Fseason_junior.asm;h=540c152daf51bdfb438f2b50a8dc554f5a975b64;hb=584c899914df33403e5e087ee093667445048758;hp=b9551528395be6cc5270a0a2a2ff3d30f900454a;hpb=e108908a7b122bb99cfc6521e0f049f587d7c0bc;p=my-code%2Fatmel.git diff --git a/beginners/season_junior.asm b/beginners/season_junior.asm index b955152..540c152 100644 --- a/beginners/season_junior.asm +++ b/beginners/season_junior.asm @@ -3,57 +3,212 @@ ; author: hackbard@hackdaworld.dyndns.org ; -include "../include/2313def.inc" + +; at90s2313 +; setup: +; vcc card --- atmel vcc +; vcc cam --- +; rst cam --- atmel int0 (pd2) +; rst card --- atmel (pb4) +; clk card -\ +; - atmel t1 (pd5) +; clk cam -/ +; gnd card --- gnd cam --- atmel gnd +; i/o card --- atmel icp (pd6) +; i/o cam --- atmel int1 (pd3) + +.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: ; ; reset -rjmp INIT ; init routine +rjmp INIT -; int 0 -rjmp REC_FROM_CARD ; smartcard sends data, we listen +; int0 +rjmp RST_CAM -; 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 +rjmp REC_CARD ; timer/counter compare -reti ; not in use +reti ; timer/counter overflow 1 -reti ; not in use +rjmp CLK_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 +rjmp UART_OUT ; uart tx complete -reti ; maybe we need it later +reti ; analog comparator -reti ; not in use +reti ; ; init routine ; +MAIN: +rjmp MAIN + INIT: ; set stackpointer ldi r16,low(RAMEND) out SPL,r16 +; +; hier weiter .... +; + +; enable interrupts int0,int1 +ldi r16,((1< input, int1 -> output +ldi r16,(1< input, int0 -> output +ldi r16,(1<