The Fast PWM program works fine on the UNO R4 WIFI board but not the Minima board. Same microcontroller, so can the program be adapted to work on the Minima ?
Hi @PolishPrince,
Sorry, I have absolutely no experience with either board, but Google pointed me to:
https://forum.digikey.com/t/fast-pwm-for-the-arduino-uno-r4-minima-and-uno-r4-wifi-boards/43792
Fast PWM for the Arduino UNO R4 Minima and UNO R4 WiFi boards
At a very quick glance, it appears the author provides a simple example for one of the boards, and adds some hints in the text as to how it might be modified for the other, bearing in mind that some processor pins are only accessible on one board, as they are internally connected on the other board.
I hope you can carefully read the article and find a solution to your question.
Best wishes and good luck, Dave
Thanks for your reply. I am trying this. I notice that in the code listing it says it will not work with the Minima. I am wondering why ? It seems to work if I lower the frequency from 25000 to something less.
Hi @polishprince,
Sorry, I am not in a position to sort through the details of this problem ... I just hoped the article would be helpful, given the title.
When the author suggests the programme in the article will not work with the Minima, perhaps the code is in some way unsuitable for the Minima, but maybe the Minima can still support PWM ... but it needs a different programme? Sorry, this is just a suggestion to check out ... not a statement of fact.
-----------------
As a general comment, below a 'certain' rate requirement, it is possible to generate a PWM waveform by writing a program that alternately sets the output from high-to-low and vice-versa, with appropriate timing ... a technique sometimes called bit-banging. The 'certain' rate obviously depends upon the rate that the processor can process the relevant instructions.
However, it is usually much better to find a processor with suitable PWM hardware support. Such support is often limited to specific GPIO pins, so carefully reading the documentation is obviously essential. This becomes more complex with some of the more sophisticated development boards, with external peripherals and/or an extra processor, like an ESP32, which will be connected to some of the GPIOs, and may preclude their use for PWM and other specialised purposes.
-----------------
Sorry, I don't think I can help you any more. Perhaps someone else, who is in possession of the boards you are looking at, can provide more insight.
Best wishes and good luck, Dave
I have been trying different things and have found that if I lower the PWM frequency the program and PWM works. I am able to make the PWM function as I need it too. I have looked at the microcontroller documentation and see that it's very complex however. I wish someone would make some videos or a book on how to program the RA micro so we can take advantage of its many features.
Never the less, Thanks very much for help..... Bob
You might try posting your questions to
which might give some ideas on how to resolve your issues.
AI does not fact check and can confidently give false information but I have found it useful anyway.