# Duty Cycle Subroutine Gamma Corrected

I'm implementing a gamma corrected duty cycle routine (instead of a gamma lookup table) due to lack of program memory space available on my PIC12F629 I do not have enough space "64 plus" lines of a "lookup table" to be inserted.

The below formula working nicely in computer software program.But I need to implent it to a small PIC with assembly language to find out the duty cycle values. Can this be simplified?

Gamma Factor = 1

PWM Steps= 160

Gamma Steps = 64 Levels

i = 0 to 63

Duty Cycle = INT(PWM Steps^((i+1)/Gamma Steps)+ Gamma Factor)