I plan to use two 18v25cs on Arduino UNO to control two motors. To enable drive, brake and coast, I would need to connect to four PWM output on Arduino.
I plan to use pins 9/10 and pins 3/11 which have the same frequency of 500Hz. However, the timer for pins9/10 is 16bit and has higher resolution than pin3/11. Would that make the motors operate differently??
I also consider to use pins 5/6 and pins 3/11 because they both have the same timer of 8 bits. but the frequency for pins 5/6 is 1000Hz. I could change the frequency of pins 3/11 to 1000Hz but i would like to keep programming the low level stuff to the minimum.
Not really. That timer (timer1) can also run in 8-bit mode if you configure it so.
The Arduino library uses one of the timers to implement millis and micros and delay. This causes both interrupt overhead and interference if you also try to use the same timer.
If you’re programming a microcontroller, you really have to dive in and deal with the low-level stuff. It’s the only way you’ll get to a robust and efficient solution.
I recommend ditching the Arduino IDE and library, and just go straight to the Atmega microcontroller using avr-gcc and avc-libc. Read the data sheet from Atmel to see how to program it. If you already know how to program, it really isn’t that hard