Hello,
What you require to do would certainly seem feasible, but the PE beans provided might not be suitable - I do not use them personally.
To keep the code uncomplicated, I would assume use of unbuffered PWM. You will need to set up the TIM module so that overflow occurs every 10 ms, or perhaps a sub-multiple of this period for a higher PWM frequency. The PWM period will be the same as the timer overflow period. Set this by adjusting prescale and modulus values, and also taking into account the crystal frequency.
The PWM channel would normally be set up to "toggle on overflow", and for each output compare event to clear the PWM output. The channel register would contain the current pulse width value. Once set up, unbuffered PWM output will continue without the need for any interrupts - output compare interrupts are required only when the pulse width setting needs to alter, and would be disabled at other times.
The timer overflow interrupt would need to be remain enabled to time your periodic processing requirements. This ISR should remain as short as possible. If the display and keyboard routines are lengthy, it is better to do these outside of the ISR code - simply set a "flag" within the ISR, and poll the flag from within main().
Regards,
Mac