Timer initiation in Atmega128

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Can someone help me with such type of code. Although, I come across this code in Timer initiation, but has been encountering it at many places.

TIMSK=(1<<OCIE0)

I know that TIMSK is a timer interrupt mask reister and OCIE0 is the bit-1 in that register. '<<' means logical left shift.

But i don't understand, what the code is doing overall. As no where in the file OCIE0 was assigned any value 0 or 1.

Thxs.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kumar.rohit0612, this'll help:

https://www.avrfreaks.net/index.p...

OCIE0 IS defined in the MCU header file, added thru

1) Studio 4.18 build 716 (SP3)
2) WinAvr 20100110
3) PN, all on Doze XP... For Now
A) Avr Dragon ver. 1
B) Avr MKII ISP, 2009 model
C) MKII JTAGICE ver. 1