Advertisement
Guest User

OCR2A/OCR2B in Atmega 644

a guest
Dec 27th, 2010
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. Dear Customer,
  2.  
  3. Thank you for contacting Atmel Technical Support.
  4.  
  5. The OCR2B register is used in all modes other than CTC mode. In CTC mode only the ‘OCR2A’ (as top value) value will be used for comparision.This has been described in the “table 15-8 Waveform Generation Mode Bit Description” in page number 148 (section 15) of datasheet.
  6.  
  7. For example in normal mode
  8. 1. When ever the TCNT2 equals OCR2A the output compare flag (OCF2A) will be set and if the corresponding interrupt is enabled, then the output compare flag generates an output compare A interrupt.
  9. 2. When ever the TCNT2 equals OCR2B the output compare flag (OCF2B) will be set and if the corresponding interrupt is enabled, then the output compare flag generates an output compare B interrupt.
  10. 3. When ever the TCNT2 equals 0xFF the over flow flag (TOV2) will be set and if the corresponding interrupt is enabled, then the over flow interrupt will be generated.
  11.  
  12. But in CTC mode the only the compare register OCR2A will be used for both.
  13.  
  14. Thanks for your valuable input (data sheet vague) and we will describe with more clarity in future.
  15.  
  16. Hope this helps. Sorry for the inconvenience.
  17.  
  18. Best Regards,
  19. Vijay Jayaraman K
  20. Atmel Technical Support Team
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement