atmega 8是一款性价比很高的单片机,我们在使用的时候,可以通过很多方式进行使用,首先,我们先看看串口的程序。 //使用AVR
Studio 4.12 + WinAVR编译 //create by arcdevil @20051224 #include
#include #include #include //常量定义 #define
BAUDRATE 9600 //波特率
#define F_CPU 3686400 //晶振频率3.6864MHz
unsigned char sec,min,hour; unsigned int i = 0; unsigned char temp;
//向串口写数 void put_c(unsigned char c) { while( !(UCSRA & (1
阅读全文>>