328-test
#include <mega328p.h>
#include <delay.h>
// Declare your global variables here
void main(void)
{
DDRB=(1<<DDB7) | (1<<DDB6) | (1<<DDB5) | (1<<DDB4) | (1<<DDB3) | (1<<DDB2) | (1<<DDB1) | (1<<DDB0);
PORTB=(1<<PORTB7) | (1<<PORTB6) | (1<<PORTB5) | (1<<PORTB4) | (1<<PORTB3) | (1<<PORTB2) | (1<<PORTB1) | (1<<PORTB0);
while (1)
{
PORTB=0xFF;
delay_ms(50);
PORTB=0x00;
delay_ms(500);
}
}
'Atmega328' 카테고리의 다른 글
| 1. Builtin LED 제어 (1) | 2023.11.14 |
|---|---|
| CP210X Window Universal Drive (0) | 2023.10.20 |
| 328-LCD Test (0) | 2023.10.20 |
| AVRISP-mk2 사용법 (0) | 2023.10.08 |
| AVR 프로그래밍 학습 참고자료 (0) | 2023.10.08 |
