; season - junior ; ; 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" ; 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 ; int0 rjmp REC_CARD ; int1 rjmp REC_CAM ; timer/counter capt 1 reti ; timer/counter compare reti ; timer/counter overflow 1 rjmp T1_OVERFLOW ; timer/counter overflow 0 reti ; uart rx complete reti ; uart data register empty reti ; uart tx complete reti ; analog comparator reti ; ; init routine ; INIT: ; set stackpointer ldi r16,low(RAMEND) out SPL,r16 ; enable interrupts int0,int1 ldi r16,((1< input, int1 -> output ldi r16,(1< input, int0 -> output ldi r16,(1<