From: hackbard Date: Sun, 14 Nov 2004 11:29:07 +0000 (+0000) Subject: fading lieghts, but strange behaviour with led_b X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=f46755da7a25916d0f212f02d8aafa5060440302;p=my-code%2Fatmel.git fading lieghts, but strange behaviour with led_b --- diff --git a/beginners/rgb_mali.asm b/beginners/rgb_mali.asm index fc89777..ca83557 100644 --- a/beginners/rgb_mali.asm +++ b/beginners/rgb_mali.asm @@ -17,18 +17,18 @@ .def tmp = r16 .def uart_count = r17 .def count = r18 -.def R = r19 -.def G = r20 -.def B = r21 -.def mode r22 -.equ cm 0 -.equ rgb 1 +.def RED = r19 +.def GREEN = r20 +.def BLUE = r21 +.def mode = r22 +.equ cm = 0 +.equ rgb = 1 .def OUTR = r23 .def FULLR = r24 -.equ LED_R PD2 -.equ LED_G PD3 -.equ LED_B PD4 -.equ LED_PORT PORTD +.equ LED_R = PD2 +.equ LED_G = PD3 +.equ LED_B = PD4 +.equ LED_PORT = PORTD ; ; interrupt voctors @@ -44,7 +44,7 @@ reti ; timer/counter compare reti ; timer/counter overflow 1 -reti +rjmp INC_RGB ; timer/counter overflow 0 reti ; uart rx complete @@ -63,6 +63,12 @@ INIT: ; alloc stack pointer ldi r16,low(RAMEND) out SPL,r16 +; timer: clock/1024 +ldi tmp,((1<