Atmel Mikrocontroller Kickstart/EinfacheBeispiele
< Atmel Mikrocontroller Kickstart
Revision as of 22:23, 6 October 2005 by 2001:6f8:12f3:1:20e:35ff:fe9f:2f57 (talk)
Einfache Beispiele
led-an.asm: Schaltet die erste LED an PortB, also an PB0 an.
.include "m8def.inc" .ORG 0x0 ; reset vector rjmp reset .ORG 0x13 reset: ; reset subprocedure ; executed after a reset (poweron) ldi r16, 0xff ; configure PORTB as output out DDRB, r16 ldi r16, 0b00000001 ldi r16, 0x01 ; light first LED on PORTB com r16 out PORTB, r16 loop: rjmp loop ; start main loop