Hello:
I am currently trying to use pwm with webbolib to control two motors but I am having trouble picking the right frequencies.
I am using this:
void appInitHardware(void){
pwmInitHertz(B2,9000,100,null);}
To set the frequency to 9k in this case. It seems that when I use anything above 9000, the microcontroller does not work properly. Can any of you tell me how I can calculate the range of frequencies that I can use, and how do I check that the frequency is being set properly. I know that that function is a Boolean function but do not know how to use it to check. Any example would be appreciated. ( I know that there is a motorpwm function but I am using a different pin configuration than the one required by that function).
I have a atmega328p, with a 18432000 Hz crystal connected to a L298
Thanks in advance