PIC XLP real world run current - Page 1
Forum section: electronics / general

author: Howardlong
author_rank: Super Contributor
timestamp: March 07, 2018, 03:27:08 pm
content: A few months ago I did some work evaluating various PICs and their run current for a particular application. In general, data sheets contain incomplete or misleading information about processor consumption, and you're left to figure it out empirically for your given application.Attached is a spreadsheet with the detail covering several XLP devices.Please read the notes: this is run current only, it does not evaluate sleep or idle modes.The biggest take away is that the only way to achieve banner uA/MHz specs is to use the low voltage parts at their lowest voltage at their highest speeds without any PLL or clock division. The most efficient clocking method is to use an external clock. The crystal oscillator is the most efficient internal oscillator block. The internal oscillators are usually pretty inefficient, especially if used with a postscaler.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 07, 2018, 05:24:34 pm
content: Nice work.I suppose you know EEMBC?https://www.eembc.org/ulpmark/index.phpMicrochip XLP-flagged microcontrollers used to be competitive for the low-power market a few years back, but IMO they are not at all anymore. You can find much more powerful and less power-hungry overall in a lot of ARM Cortex M4 implementations for instance, with the STM32 L4 series being very good in that respect.As you showed us, the run current of PIC XLP devices is not impressive by today's standards. Additionally, for most of them, their idle current is not either. Their sleep current is decently low but in par with a lot of recent uCs.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: March 07, 2018, 07:23:08 pm
content: Quote from: Howardlong on March 07, 2018, 03:27:08 pmThanks for that. Coincidentally I am evaluating the running current of a PIC10F322 at 32kHz right now. It will be interesting to see how it compares to your numbers.Quote from: HowardlongSTM32 L4 is available in SOT23-6?

author: Howardlong
author_rank: Super Contributor
timestamp: March 08, 2018, 01:17:09 am
content: I wasn’t aware of the eembc, but I am now. I discovered some time ago that the devil is in the detail when it comes to ultra low power stuff, and it’s incredibly application soecific. All devices have pros and cons depending on the use case. It’s brave to try to come up with generic benchmarks, and even more difficult to make them meaningful outside of a specific use case.For example, the figures I gave only relate to CPU, not to peripherals. For the specific target, I ended up using the PIC24F16KM202 not because it had the best CPU efficiency, but because it had some uktra low power op amps and DACs on chip: other devices had op amps and DACs but they were rather power hungry.I also looked at devices with DMA to offload from the CPU allowing much longer idle times, but devices with DMA also didn’t have the efficient op amps and DACs, and the CPUs were not as frugal.The Silabs Gecko I soent some time evaluating, and frankly I couldn’t get them close to a PIC16 in my application. 32 bits means a lot of transistors to switch!

author: carljrb
author_rank: Contributor
timestamp: March 08, 2018, 02:09:55 am
content: Quote from: SiliconWizard on March 07, 2018, 05:24:34 pmIt's already fairly well documented that they aren't so good at very low power. Their numbers are quite misleading and certainly come from their sales/marketing dept instead of engineering!This white paper by TI says it all:http://www.ti.com/lit/wp/slay015/slay015.pdf

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: March 08, 2018, 05:02:12 am
content: The results are in!On 3.7V my PIC10F322 (notXLP) draws 16uA when running at 32kHz. In sleep it draws 0.3uA.At first I couldn't get the sleep current below 12uA. Then I found out that the internal voltage regulator has a low power mode, which cut the sleep current down to 0.6uA. I don't need the 32kHz oscillator in sleep to I switch to 256kHz just beforehand, which reduces the sleep current to 0.3uA.For my application (an LED turned on and off via a magnetic reed switch) this is perfect. Insignificant running current compared to the load, and sleep current low enough that I don't have to worry about it draining the 30mAh Lipo battery.

author: Howardlong
author_rank: Super Contributor
timestamp: March 08, 2018, 06:05:55 am
content: Quote from: carljrb on March 08, 2018, 02:09:55 amI’d be very wary of any vendor supplied document, particularly a competitor, and keep an open mind. You can just as easily find a set of Microchip responses on this on Youtube.In my experience of low power battery stuff, it’s key to be able to evaluate at an early stage the options, because the detail you need to come up with any solution for a given set of requirements will not be presented in the datasheet. The datasheet gives you a very loose summary.What I truly do not understand are the repeated Microchip claims in their datasheets of ~32uA/MHz across a large number of PIC16 devices, a result that I was unable to achieve even closely except on one device. And for that you need to be running at high speed with an external oscillator.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 08, 2018, 01:23:38 pm
content: Quote from: Bruce Abbott on March 07, 2018, 07:23:08 pmMicrochip have insanely versatile and profuse product lines, so they certainly have their uses and distinct advantages, including ease of use, variety of packaging, combination of peripherals...I was specifically talking about power draw here.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 08, 2018, 01:50:00 pm
content: Quote from: Howardlong on March 08, 2018, 06:05:55 amAnd you should be wary of competitors claims and battles. That said, what TI claims here is mostly right.As I said, these last few years have seen a rise in ultra-low power MCUs that really are way ahead of what we had just a few years back. As far as low-power is concerned, Microchip is behind for anything that requires some computing power. The Gecko line is behind now as well.What matters of course is entirely dependant on your requirements, and mostly the overall duty cycle, that is the proportion of time during which your MCU is active to the total time.Raw µA/MHz figures are an indication, but they don't mean much by themselves. What the MCU can achieve by MHz is equally important. A modern ultra-low power 32-bit MCU can execute on average more than 1 instruction per clock cycle, whereas the 8- and 16-bit architecture of PIC MCUs can only execute 0.25 or 0.5 instruction per clock cycle. So for the same required execution time you can lower your clock with most recent 32-bit MCUs and get much lower run current. I'd suggest trying an MSP432 dev kit or an STM32L4 nucleo board for instance, and see for yourself, you will probably be surprised.If you only need to run your MCU at a very low frequency such as < 100 kHz for instance, this is the area where the ULP 32-bitters will be falling short.Of course other considerations than power draw may also make you chose 8-bit or 16-bit MCUs, such as cost, available packages, and simplicity.

author: josip
author_rank: Regular Contributor
timestamp: March 08, 2018, 02:29:58 pm
content: Quote from: SiliconWizard on March 08, 2018, 01:50:00 pmHere is a few years old topic, where except low power, cost and other things are also included in discussion.https://forum.43oh.com/topic/3416-stm32l-vs-msp430f5-whats-left-for-msp430/

author: Howardlong
author_rank: Super Contributor
timestamp: March 08, 2018, 04:18:17 pm
content: Quote from: SiliconWizard on March 08, 2018, 01:50:00 pmThe TI document is correct, but it is also an exercise in cherry picking, deliberately setting up scenarios to best show their device. All vendors do it.Yes, uA/MHz != uA/MIPs, that’s why you’ll notice I deliberately calculated it out in the spreadsheet. uA/MHz is a somewhat disingenuous marketing thing Microchip use, obfuscatiing the real performance.The devil is in the detail, and part of the design will be about choosing the most appropriate device which much of the time can only be effectively determined empirically because there is simply never enough information in the data sheets to make a valid judgement for a given use case.I would add though that the lowest power PIC24 I have found disappointing in terms of core power consumption. The PIC16 consistently outperforms it significantly in terms of uA/MIPs, even taking into account additional overhead for being an 8 bitter. The best performing PIC32 in terms of power consumption is even worse than the PIC24.