03/28/1436 1 AVR Programming in C University of Kashan Faculty of Electrical and Computer Engineering Department of Computer Engineering Hossein Sabaghian-Bidgoli [email protected]Fall 2014 Lecture note 8 سی برنامه نویAVR با زبانC University of Kashan Microprocessors 2 ه اسمبلی؟ت ب نسبای آن مزایسی به زبان برنامه نویC راستت راحتگیرد میان کمتری زمر استدن آن آسان ت تغییر داستفاده کردده ای آمانهابع کتابخا میتوان از توا دیگرروکنترلرهای میکمه برای برناز همان جزئی میتوان اغییراتی و با ت براحتستفاده کرد ان اسمبلیت به زبا نسب معایب آنی نهای کدماشینی تر شدنن طوC بیشترحافظهشغال فضای ای برنامهد تر شدن اجرا کن
University of Kashan Microprocessors 42
Some function defined in stdlib.h
Other include files #include <math.h> #include
<stdio.h> #include <string.h>
03/28/1436
22
LCD
LCD
03/28/1436
23
LCD
#include <AVR/IO.h>
#include <util/delay.h>
main(){
DDRC=0xff;
DDRD=0xff;
while(1);