Notice
Recent Posts
Tags
- ctc mode
- normal mode
- atmega 128
- Pspice
- gpio
- dataflow modeling
- ATMEGA128A
- LED
- Recursion
- full adder
- structural modeling
- ring counter
- D Flip Flop
- interrupt
- half adder
- Algorithm
- verilog
- structure
- interface
- Method
- Set
- MUX
- atmega 128a
- java
- Shift Register
- Linked List
- siso shift register
- behavioral modeling
- Comparator
- fast pwm mode
목록gpio control (1)
거북이처럼 천천히
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/pV0pW/btsHB6EhTPq/myeA7MgMWkcBHHmTgdesx0/img.png)
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