3 ; author: hackbard@hackdaworld.dyndns.org
9 ; vcc card --- atmel vcc
11 ; rst cam --- atmel int0 (pd2)
12 ; rst card --- atmel (pd4)
16 ; gnd card --- gnd cam --- atmel gnd
17 ; i/o card --- atmel icp (pd6)
18 ; i/o cam --- atmel int1 (pd3)
20 .include "../include/2313def.inc"
24 ; stupid mode only by now. just see what cam/card do and redirect
27 ; next implementation:
29 ; try to read one byte of card/cam communication and output via uart.
30 ; output time information in some way.
34 ; buffer/parse whole strings and decide whether to send to card or not.
49 ; timer/counter capt 1
52 ; timer/counter compare
55 ; timer/counter overflow 1
58 ; timer/counter overflow 0
64 ; uart data register empty
86 ; enable interrupts int0,int1
87 ldi r16,((1<<INT0)|(1<<INT1))
90 ldi r16,((1<<ISC01)|(1<<ISC00)|(1<<ISC10)|(1<<ISC11))
93 ; enable t/c overflow interrupt and icp
94 ldi r16,((1<<TOIE1)|(1<<TICIE1))
97 ldi r16,((1<<CS12)|(1<<CS11)|(1<<CS10)|(1<<ICNC1))
100 ; init bitcounter and overflow counter
101 ldi r20,0 ; bitcounter
102 ldi r21,0 ; register for constructing the byte
103 ldi r22,0 ; overflow counter
110 ; enable interrupts (global)
137 ; output high on port to cam
146 ; build the byte ;) - still wrong!
151 ; hier gehts weiter ...
158 ; output low on port to cam
175 ; int1 -> input, int0 -> output
186 ; output high on port to card
199 ; output low on port to card
211 ; t1_overflow routine
216 add r22,r1 ; inc counter overflow register