Re: I need some help with PIC programming
I don't understand your numbers but if by "1.080.000 ... a second" you mean that the MCU has to respond to just over 1 million pulses a second (about 1 every uS) then you are going to need a very fast device and I'm not sure if many Microchip MCUs have a clock speed greater than about 160MHz (about 80MIPS).
On the other hand if the "18.000/min" refers to 18 thousand revolutions a minute with one pulse per revolution (300 pulses per second or one every 3.3mS) then that should be easily done.
The ADC in the MCUs measure voltage and so what really matters is the voltage that you are applying across the potentiometer and the voltage on the wiper when it at the required place.
Counting the pulses and then stopping one every three should not be a problem, as long as the above are taken into consideration.
The biggest problem you will face is "...there can't be ANY delay...". There will ALWAYS be a delay! Logic gates might measure the delays in nS or pS but it will be there. Using an MCU you are limited to how fast the instructions are executed and how many instructions you need, plus various overheads (e.g. if you are using interrupts).
Therefore, what is the actual delay that you can withstand? If this is for a physical motor then I would have thought you could withstand 10's of uS delay at least.
What I really suggest you do it so start with a 'flash a LED' project. The learning curve for the Microchip MCUs can be quite steep to get the first bit of code working (configure the IO ports, the oscillator, the CONFIG settings, and then getting the code programmed into the device and perhaps debugged). The good news is that once you have that working then the basic 'mechanics' is done and you can start to build up to the actual application yo have in mind.