Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- LOOP:
- lds Temp2, PORTB_IN
- sbrc Temp2, SW1BIT ;jump over if bit 2 is 0
- call PLAY_C
- lds Temp2, PORTB_IN
- sbrc Temp2, SW2BIT ;for SW2
- call PLAY_D
- lds Temp2, PORTA_IN
- sbrc Temp2, SW3BIT ;for SW3
- call PLAY_E
- lds Temp2, PORTA_IN
- sbrc Temp2, SW4BIT ;for SW4
- call PLAY_F
- rjmp LOOP
- ...blabla
- TCE0_CCA_ISR:
- push Temp2
- lds Temp2,CPU_SREG
- push Temp2
- ldi temp2, BUZZEROFF ;select both pins
- sts PORTE_OUTTGL, Temp2 ;and toggle
- ldi Temp2, TC_CLKSEL_OFF_gc
- sts TCE0_CTRLA, Temp2
- pop Temp2
- sts CPU_SREG,Temp2
- pop Temp2
- reti
Advertisement
Add Comment
Please, Sign In to add comment