I finally wrote the program. In the process of running it, it came out that the PIC16F876A processor gives a minimum PWM frequency of 1.2 kHz instead of 100 Hz and it might be a problem to fully drive the solenoid valve. I have ordered a more suitable PIC16F1717 and will try to fire it up on the Merlo machine. When it starts I will make a circuit board. By the way, I will add an option to drive the version with three solenoid valves, and a fuel-saving option (low-speed operation), i.e. full opening of the solenoid valve at about 1500 rpm. I will use BTS432 circuits as the drayers for control. The controller has a 7-segm 4-digit display, and an externally attached simple 3-button programmer with resistance division attached to the analog port. The controller has a built-in hour meter, user-programmable code to access software functions, signal parameter display for service purposes, intuitive programming of the driving potentiometer. The whole thing took me about 4 kB of code. I will get back to you at the end of June and describe further progress.
Andrew
Andrew