avr学习笔记

把avr的学习笔记记录到这里
winavr20060421的版本
http://sourceforge.net/projects/winavr/files/WinAVR/20060421/

遇到问题
http://www.amobbs.com/thread-582521-1-1.html
#include <avr/io.h>
#define uchar unsigned char
#defin unit unsigned int
void DelayMs(uint i)
{
	uint j
	for(;i!=0;i--){
		for(j=8000;j!=0;j--);
	}
}

int main(void){
	DDRC=0xFF;
	while(1){
		PORTC=0x00;
		DelayMs(1000);
		PORTC=0xFF;
		DelayMs(1000);
	}
}

猜你喜欢

转载自haoningabc.iteye.com/blog/1844101