Bug in Studio ? Tiny 13 OC0A-Int wents wrong!

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

Hi !
I'm using Studio 4.12 SP3 and have problemns to simulate a Tiny13.
The OC0A Interrupt is executed if the counter is 1 higher than the compare value.
(e.g. OCR0A=3, then the OC0A INT will be called if the counter swaps from 3 to 4).
Any idea ?

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

From the "known issues":

Quote:
Timer/Counters

16-bit Timer/Counters on all devices have several problems with PWM, prescaler and output compare. Output compare registers are not buffered properly.

The Asynchronous Status Register (ASSR) is not supported in timers with asynchronous mode. This is due to lack of a generic external clock implementation.

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

OK... forgotten to mention....
The Timer runs with MCLK/256...
far enough time to generate an interrupt...
and its 8 BIT wide..

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

But did you read the comment above from the AVR Studio help system where the simulator known issues are listed. Specifically the "several problems with .... and output compare". So why are you surprised if you see a problem?

Cliff

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

OK, I have see the list now....
I've changed my statements in the code for this first, short test time with the simulator...
Thanks anyway