AVR Assembly Tutorials

 

AVR Assembly Tutorials

These tutorials assume you have some basic knowledge of programming AVR microcontrollers in C. If you do not, I recommend you start there.


WELCOME

Here you will find a collection of tutorials I have put together using AVR microcontrollers in both C and Assembly language. In addition, I have a showcase and source code for many of the projects I have built using AVR microcontrollers.


Highlight Javascript

For all of my code examples on this website, I use Highlight Javascript (hljs). If the code examples below do not have highlighted syntax, please enable javascript!

AVR Assembly

	.include "m328pdef.inc"

	.cseg
	.org 	0x00
main:	sbi	DDRB,PINB0		; set PINB0 to output
	sbi	PORTB,PINB0		; set PINB0 output high

loop:	rjmp	loop

AVR C

#include<avr/io.h>

int main(void)
{
    DDRB |= (1 << PINB0)	// set PINB0 to output
    PORTB |= (1 << PINB0)	// set PINB0 output high

    while(1)
    {

    }
}

Helpful Links






UART Communication

إرسال تعليق

Post a Comment (0)

أحدث أقدم