Notice
Recent Posts
Tags
- Algorithm
- full adder
- 4bit parallel adder
- gpio
- Method
- 8bit timer/counter
- behavior modeling
- java
- interrupt
- ctc mode
- Comparator
- timer / counter
- dataflow modeling
- verilog
- ATMEGA128A
- atmega 128a
- atmega 128
- MUX
- Linked List
- fast pwm mode
- sequential logic circuit
- structural modeling
- normal mode
- LED
- Set
- interface
- structure
- half adder
- Recursion
- behavioral modeling
목록LED (6)
거북이처럼 천천히
GPIO - LED control (2)
1) 환경 : Microchip studio2.) 목표 : 0핀 -> 3핀 -> 0핀, 7핀 -> 4핀 -> 7핀 LED를 Shift하여 출력3) Source code#define F_CPU 16000000UL#include #include #define TIME 150int main(void) { // PORTD의 8핀을 출력으로 설정 // PORTD = 1111 1111 DDRD = 0xff; while(1) { for(uint8_t i=0; i>i); _delay_ms(TIME); } // i의 값을 1 ~ 3으로 설정한 이유 // 0 ~ 4까지로 설정할 경우, 0, 3, 4, 7핀이 중복해서 불이 들어오기 때문에 ..
Embedded Programming/Atmega 128A (실습)
2024. 5. 25. 13:02