Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's doesn't work under attiny25 #22

Open
vahadg opened this issue Apr 4, 2015 · 0 comments
Open

It's doesn't work under attiny25 #22

vahadg opened this issue Apr 4, 2015 · 0 comments

Comments

@vahadg
Copy link

vahadg commented Apr 4, 2015

(attiny85 too)because:

define F_CPU 8000000UL

if defined( AVR_ATtinyX5 )

...

if F_CPU == 8000000UL

  __TCCR1 = _BV(CTC1) | _BV(CS12) | _BV(CS11) | _BV(CS10);__ // 1/64 prescaler
  __OCR1C = (64 >> speedFactor) - 1;__ 

...
OCR1A = 0; // Trigger interrupt when TCNT1 is reset to 0
TIMSK |= _BV(OCIE1A); // Turn on interrupt
TCNT1 = 0; // Set counter to 0
interrupt does not occur. If OCR1A > 0 It's occur, but It's work not correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant