I was considering getting a uno r4 and I looked at the clock speed and though:
Ten years since the last update of the uno and it’s only 48mhz?
Still want a uno R4 WiFi though.
I was considering getting a uno r4 and I looked at the clock speed and though:
Ten years since the last update of the uno and it’s only 48mhz?
Still want a uno R4 WiFi though.
Most of the cars I buy are 180km/h.
The previously annoying blue LED on my computer case is now configurated to draw 0.05mA.
Leo..
One possibility could be a "tip of the hat" to people who absolutely must drive two LEDs at 20 mA each.
Could be handy if you need to drive a string of shift registers (higher fanout).
Is this option implemented in the IDE, or just a chip feature not available to the programmer.
Leo..
Neither.
Only Ports P408 and P409 have this 20mA feature, and neither of those are used for the UNO R4 pins.
One obvious solution is to carry on using R3 Unos or why not use Classic Nanos instead ?
For the permanent projects that I have built, I have used Nanos without issue and will probably continue doing so. However I will be more wary in the future of the current I draw from the pins and will reduce it where I can and indeed use drivers on occasions where I may not have in the past.
Can I ask though, is it acceptable to reduce current draw by using analogWrite on PWM pins to reduce the pseudo voltage or must you use digitalWrite and a bigger resistor?
Using a PWM output reduces the average current but not the momentary current so is not really a solution
I kind of thought that might be the case, thanks for clarifying.
While the clock at 48MHz is only 3 times faster than the R3 the actual change in performance is not so straightforward to calculate. The key difference to me is the change in the instruction set which can do lots of mathematical operations in very few clock cycles.
e.g how long does a 32bit multiplication (floating point or integer) take on R3. Then time the same calculation in R4. you will see a much greater speed increase then a factor of 3.
With the many projects I did I never had problems with clock speed and performance. One project was driving 48 stepper motors at their max speed with a 16Mhz Nano, with more than half the time spare to do other things. I guess in most cases efficient coding is far more important than hardware.
Leo..
Then you will really be disappointed with the SamD boards.
The Arduino Docs say the pins are capable of 7mA but in reality are limited to ~2.5 mA default.
In order to achieve the rated 7mA you must set the drive strength yourself.
Might be more nuanced than that, I'm afraid. If the potential for damage is due to instantaneous current, yes, this is correct. If the potential for damage is due to localized heating of the relevant mosfet in the output stage, then I'd say PWM is beneficial.
Which damage mode is relevant? I'm not aware of any document out there that explains the risks to the output stage mosfets at this level of detail; certainly, I've never seen any indication in a datasheet; however, I'd lean towards the heating risk. I'm sure careers have been built on such analyses, so the information is likely out there somewhere.
@SierraGolfMike The latent issue here is what happens when your code screws up and leaves all the outputs full-on instead of 50%? If that happens, then if you were depending on PWM to protect your processor you've got a problem. Not a good design approach, I'm afraid. It's usually wise to design as if you know you'll make mistakes, not design for blue-skies and sunny days.
@SierraGolfMike Are you aware of the aggregate current limits per port, and per device, as well as the per-pin limits? You'll have to read the datasheet of the processor you're using, not just the Arduino-published over-simplifications. Here's the sheet:
https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/ATmega48A-PA-88A-PA-168A-PA-328-P-DS-DS40002061B.pdf
Check out the notes of the table on page 323. You'll find there are significant restrictions above and beyond "n mA per pin".
No doubt, you can get away with a lot of exceedances; no one here should argue that. The manufacturer's recommended limits aren't magic, they're based on careful testing of the product, and include allowances for production variability, full-range environmental limits, and a lot of other conditions, I'm sure. They may, however, fail randomly with no warning if exceeded. Or not. Arguing with anyone about whether 'it works' or not is pointless, because no one here can tell you you're wrong, just that you're violating the recommended operating conditions of the processor.
Oh, one more point. Remember, not all clone Nanos are created equal. Processor substitutions have been noted. It might be worthwhile to check your clones to ensure you know the output limits for the particular processor on your clone device, as they may differ quite a bit from the venerable '328P'.
I didn't work in, but did rub shoulders with people in an "Accelerated Life Cycle Testing" lab. There, not only the effect of all kinds of environmental influences are statistically determined, but the change over time.
After all that, the engineers know how to set the spec limits for nominal operation.
But also don't forget that the "normal rated current" for pins is determined by whether the output voltage remains at the specified logic levels, something that you care less about if you're driving LEDs...
The Uno LEDs are driven at about 4mA, BTW, except for the "power" LED. (1k resistors)
Good point, @westfw , I tend to forget that. With regard to that, I wonder if, since the port pins are subsets of ports, when one port pin is dragged down by an excessive load, are the VOH levels of the other pins of that particular port impacted, or are they independent?
For example, if one loads 3 pins of port C with 40 mA each, are the other 5 pins of the port likely to droop, impacting signal levels for, for example, other logic functions?
Guess it probably depends a lot on the wafer layout, among other things, so it's way beyond my pay grade.
Also, while I agree with the point, there has to be a reasonable limit. When they say n mA/pin, but then give another limit that's, for example, (n/4)*number of pins, is that because of a higher level droop(i.e. voltage loss in the chip power lead, for example), or an accumulated power dissipation? Or both?
Good point, it makes sense.
I was not aware of that as I have only looked at the very basic spec of the Arduino.
This is a mighty tome, 95% of which I will not understand, but I will have a look through it . Thanks for taking the time to post!
(Also, the AVRs have shown themselves over time to be very tolerant of abuse. For example, you can find any number of projects that connected LEDs directly to pins without any current limiting resistor. And they seem to work just fine, in many situations (I wouldn't do this for a commercial product...)
We don't have any relevant experience with the Renesas chip...)
Many thanks for all the input guys. I haven't bought an R4 yet but certainly food for thought in the way I work in future projects!
I have a question, it seems that the current of the LED inside UNO R4 also exceeds 8 milliamperes. Is this reasonable?
(the KPT-1608YC has a forward voltage of 2.1V, while the HSMG-C190 has a forward voltage of 2.2V. Therefore, the corresponding currents are 8.79mA and 8.48mA.)