The values in the table are simply a list of sine values for each angle, scaled so the result falls between 0 and 255 so they fit best into an 8-bit number. The sine values range from -1 to +1 so the first scale them so they use all the 8 bits by multiplying by 127, this makes the range -127 to +127. As we don't really want negative numbers, add 127 to the result to make them all positive, the range is then 0 to 254.
For example:
Sin(0) = 0, 0 x 127 = 0, 0+127 = 127.
Sin(1.4) = 0.024, 0.024 x 127 = 3.10, 3.10 +127 = 130.
.
Sin(90) = 1, 1 x 127 = 127, 127 + 127 = 254.
Sin(180) = 0, 0 x 127 = 0, 0 + 127 = 127
Sin(270) = -1, -1 x 127 = -127, -127 + 127 = 0.
It's easiest to set up a small spreadsheet with the values to calculate them all quickly.
These are the PWM values at the 255 points in the sine wave which represent the voltage at that place in the sine curve. For example if you wanted a frequency of 100Hz, you would have to go through all 255 values one hundred times a second so the rate you advance through the table would be 255 x 100 = 25500 steps per second.
To actually generate the voltage, you produce the PWM waveform by running a second counter, it loops continuously and resets or sets the PIC pin according to the value read from the table. It is basically a small timing loop which is fed values from the table in a bigger loop. For example, if the table value was 0, you would simply leave the pin low all the time, if the value was 128 you would set the pin high until the small loop had counted up to 128 then set it low again. If the value was 254 the pin would be high all the time. So what you are producing is a repeated pulse on the pin that varies in width according to the table value. This is PWM ! By averaging the value with an RC filter you produce what is very close to a pure sine wave.
Brian.