달력

5

« 2026/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
2023. 11. 14. 17:06

1. Builtin LED 제어 Atmega3282023. 11. 14. 17:06

 

#include <mega328p.h>  
#include <delay.h> 
void main(void)
{
DDRB=0xFF;      
PORTB=0x00;
while (1)
      {
      PORTB=0xFF;  // 0x20;  PB5 pin에 Builtin LED가 접속되어 있다.
      delay_ms(50);
      PORTB=0x00;
      delay_ms(1000);
      }
}//

'Atmega328' 카테고리의 다른 글

Timer/Count 0 기본  (1) 2023.11.14
Timer/counter 0 Test  (0) 2023.11.14
CP210X Window Universal Drive  (0) 2023.10.20
328-Test  (0) 2023.10.20
328-LCD Test  (0) 2023.10.20
:
Posted by gonlab