Hi! I'm making a Caterpillar Engine Simulator project and for the throttle position sensor I need to create a PWM signal (I'm using a 16F887 pic) which goes to the electronic control module of the engine, the issue is that the duty cycle should be variable depending on the position of the pedal accelerator (from 5% to 95%), and I only know to put a constant value. I was hoping you guys could help me in this issue or to tell me if this could be possible through an A/D conversion of a range of 0-5V and then the digital value could go to the register of the pwm mode, in theory sounds good but please help me.