Problem with programming digispark ATtiny85 board with Arduino IDE
i=i++;                          //increment by one


The result of the above statement is not defined. That is, it is not necessarily &quot;i + 1&quot;.
See:

http://en.wikipedia.org/wiki/Sequence_point
http://c-faq.com/expr/seqpoints.html

Instead use:
i++;

Or:
i = i + 1;

A note about &quot;undefined behavior&quot;:
http://en.wikipedia.org/wiki/Undefined_behavior

When an instance of undefined behavior occurs, so far as the language specification is concerned anything could happen, maybe nothing at all.