]>
hackdaworld.org Git - my-code/atmel.git/commitdiff
mov countrgb,tmp
ldi uart_count,0
ldi count,0
-ldi RED,CM1
+ldi RED,CM2
ldi GREEN,0x0
ldi BLUE,0x0
; led pins are outputs
; reset rgb
;
RESET_RGB:
-ldi RED,CM1
+ldi RED,CM2
mov GREEN,zero
mov BLUE,zero
mov desc,zero
MAKE_RGB:
ldi tmp,(1<<RUP)
and tmp,desc
+add tmp,tmp
add RED,tmp
ldi tmp,(1<<GUP)
and tmp,desc
lsr tmp
lsr tmp
+add tmp,tmp
add GREEN,tmp
ldi tmp,(1<<BUP)
and tmp,desc
lsr tmp
lsr tmp
lsr tmp
+add tmp,tmp
add BLUE,tmp
ldi tmp,(1<<RDOWN)
and tmp,desc
lsr tmp
+add tmp,tmp
sub RED,tmp
ldi tmp,(1<<GDOWN)
and tmp,desc
lsr tmp
lsr tmp
lsr tmp
+add tmp,tmp
sub GREEN,tmp
ldi tmp,(1<<BDOWN)
and tmp,desc
lsr tmp
lsr tmp
lsr tmp
+add tmp,tmp
sub BLUE,tmp
add countrgb,one
reti