personnally i would prefer to choose a single PIC with two internal PWM channel and simply poll the sensor. That will just make things really really easy. Internal PWM module run in background. You start HPWM and then you can do anything else without causing any problem to the PWM signal... this isn't the case with software PWM. Even your task is possible with a single PIC without any internal PWM module like the 16F84 or else other... it's just a bit much tricky.
As they're not much expensive than the 16F84 AND add much fun, PIC16F873, 16F876,18f242,18f252,18f2220,18f2320 and tons of other could be choose.
As i can't know all PIC in the whole world but just those i use(d), you can also look at the microchip website and do a search for a PIC with 2 internal PWM module ( also called CCP )
my 2 cents.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks