#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
#include <avr/wdt.h>
#include <util/delay.h>
main(void)
{
PORTA = 0x00;
DDRA = 0x01;
PORTB = 0x00;
DDRB = 0b00000000;
PORTC = 0x00;
DDRC = 0x00;
PORTD = 0x00;
DDRD = 0x00;
while(1){
PORTA |= (1<<0);
PORTA &= ~(1<<0);
}
return 0;
}
这个出来就是pa0端口方波了
|