点灯
编写点灯程序
#include <atmel_start.h>
#include <avr/io.h>
#include <util/delay.h>
#define DELAY_TIME 500
int main(void)
{
/* Initializes MCU, drivers and middleware */
atmel_start_init();
/* Replace with your application code */
while (1)
{
PORTE_set_pin_level(7, 0);
_delay_ms(DELAY_TIME);
PORTE_set_pin_level(7, 1);
_delay_ms(DELAY_TIME);
}
}
|