From: hackbard Date: Fri, 23 Jun 2006 14:29:26 +0000 (+0000) Subject: initial ci (to continue work on compaq, nothing working by now!) X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b966394e758f0b6c51c5a41bfc1177d8c4fc2529;p=my-code%2Fatmel.git initial ci (to continue work on compaq, nothing working by now!) --- diff --git a/beginners/light_control.asm b/beginners/light_control.asm new file mode 100644 index 0000000..432ca7d --- /dev/null +++ b/beginners/light_control.asm @@ -0,0 +1,100 @@ +; +; control the light connected to the pwm output pins +; +; author: hackbard@hackdaworld.org +; + +; specify device +.include "../include/2313def.inc" + +; ------------------ +; interrupt vectors: +; ------------------ + +; reset +rjmp RESET +; int0 +reti +; int1 +reti +; timer 1 capture +reti +; timer 1 compare +reti +; timer 1 overflow +reti +; timer 0 overflow +reti +; usart rx complete +rjmp UART_RX +; usart data register empty +reti +; usart tx complete +reti +; analog comperator +reti +; pin change interrupt +reti +; timer/counter 1 compare match b +reti +; timer/counter 0 compare match a +reti +; timer/counter 0 compare match b +reti +; usi start condition +reti +; usi overflow +reti +; eeprom ready +reti +; watchdog timer overflow +reti + +; ----- +; code: +; ----- + +RESET: + ; set stackpointer + ldi r16,low(RAMEND) ; write top of ramend (lowbyte) + out SPL,r16 ; to stackpointer + + ; rs232 init + ldi r16,12 ; "38.4k bps @ 8 mhz" in r16 + out UBRR,r16 ; write to uart baudrate register + ldi r16,(1<