Recently I’ve been using the small pic12f629. My interest was to use it as a cheap D/A converter using PWM. Unfortunately, I chose this pic at the store without check the characteristics first, yeah, I know, how stupid of me! :-(
I thought it had a PWM module as well as a ADC converter, but not, no PWM and no ADC, but anyway, for my purposes it could works! Also, the price was good! just 1000 yen for 10 SO chips plus one DILP! :-)
So, I present a program to read three inputs “quasi-digital” coming from a FSR sensor and then, according to the inputs, the pic will generate a PWM signal with width of pulse depending on the combination of the input signals.