The calculation is the same for any mcu.
First find the frequency of the timer, in your case 12000000/1024 =11718.75Hz
Then the period to see the time it takes for each tick of the timer 1/11718.75Hz= 85.3us
Nor calculate how many ticks you need for required delay.
For 0.5ms 0.0005/0.0000853 = 5.86 , the closest integer is 6 , the compare match value you should use is the result -1 so 6-1=5 (I assume CTC mode , if not you should wait for 6 ticks to get the delay you want)