Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .def tmp = r16
- .cseg
- rjmp reset
- .org $00C
- rjmp runningLight
- reset:
- ldi tmp, high(RAMEND)
- out SPH, tmp
- ldi tmp, low(RAMEND)
- out SPL, tmp
- ldi tmp, 0xff
- out DDRA, tmp
- out PORTA, tmp
- ldi tmp, 0
- out TCCR1A, tmp
- ldi tmp, (1 << WGM12) | (1 << CS11) | (1 << CS10)
- out TCCR1B, tmp
- ldi tmp, high(51032)
- out OCR1AH, tmp
- ldi tmp, low(51032)
- out OCR1AL, tmp
- ldi tmp, (1 << OCIE1A)
- out TIMSK, tmp
- sei
- main:
- rjmp main
- runningLight:
- in tmp, PORTA
- ror tmp
- out PORTA, tmp
- reti
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement