Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- #define F_CPU 7372800UL
- */
- #include <avr/io.h>
- #include <avr/interrupt.h>
- ISR(TIMER1_COMPA_vect){
- PORTA ^= _BV(0);
- }
- int main(void){
- DDRA = _BV(0);
- PORTA = _BV(0);
- TCCR1A = _BV(WGM11) | _BV(WGM10);
- TCCR1B = _BV(CS10);
- OCR1A = 511;// 1023-> 0x03ff 1023*0.50 -> intenzitet LEDice je 100% na 1023
- TIMSK = _BV(OCIE1A);
- sei();
- while(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement