三種型號(hào)單片機(jī)點(diǎn)亮一只發(fā)光二極管程序
#include
sbit LED=P1^0;
void main()
{
LED=0;
while(1);
}
/*******ATMEGA16A****************/
#include
#include
void main()
{
DDRA=0X01;
PORTA&=BIT(PORTA7);
while(1);
}
/*******PIC16F877**********************/
#include
#define uint unsigned int
#define uchar unsigned char
__CONFIG(0X3B31);
void main()
{
TRISA0=0;
RA0=0;
while(1);
}
評(píng)論