You want 20,000 counts before it overflows. Setting the prescaler to 1:256, you will need 20,000/256 counts = 78. The counter rolls over (overflows and sets T0IF) when it reaches 255, so if you pre-load it with 255-78 = 177, then it will overflow approximately every 20mS.
Bookmarks