Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define F_CPU 7372800UL // UL -> unsigned long - frekvencija CPU-a
- #include <avr/io.h>
- #include <util/delay.h>
- void blink(void){
- PORTA ^= _BV(3);
- }
- int main(){
- DDRA = _BV(3);
- PORTA = _BV(3);
- PORTB = _BV(0);
- DDRB = 0;
- while (1){
- if(bit_is_clear(PINB,0)){
- blink();
- }
- _delay_ms(200);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement