/** fader.c A busy looping program to fade the led using the opb_timer's pwm NOTE: As best I can tell, the documentation regarding the pwm period and duty cycle calculations regarding up-counting vs. downcounting is backwards. This code assumes that this is the case */ /* include the low level driver for the timer/counter */ #include /* include the parameters specific to this design including the base address of the timer/counter peripheral */ #include #define TIME_WASTE_COUNT 80000 void waste_time(void) { int i; for(i=0; i