EEVblog 1538 - NEW PROJECT Part 2 - Microcontroller Selection

preview_player
Показать описание
Part 2 in the new project design series, selecting a microcontroller.
32 Bit Timers, Real Time Clocks, and LCD animation.

00:00 - Searching for a microcontroller, the requirements
02:12 - 32 bit Timer
04:22 - Supplier parametric search is useless in this case
06:05 - Let's ask ChatGPT and watch it FAIL, Atmel ATmega
08:47 - PIC 18F series?
09:41 - How about TI MSP430?
11:52 - PIC 24F series
13:14 - LCD animation? I'm SOLD!
17:20 - But can we buy it? Is Chipageddon over?
20:03 - Dual PCB footprints
21:14 - Internal Timers and clock sources

Other channels:

#ElectronicsCreators #microcontroller #microchip
Рекомендации по теме
Комментарии
Автор

IME, the devil is always in the detail on these super low power requirement projects.

Personally speaking, PICs would be my first port of call but that's purely because that's where the vast majority of my knowledge lies.

Presumably the device is going to be operating in sleep most of the time, so make sure that that the timers can operate in sleep: modern PICs like the one you identified usually allow this.

Be aware that the PIC24FJxxxGL3xx series power draw IME isn't quite as good as some of the older LCD capable parts such as the PIC24FJxxxGA4xx series, but it's not far off.

You didn't say how many 32 bit counters you needed, or how you're going to use them: for example many 8 bit PICs have 24 bit NCOs that can be used as timers. It's also not clear why you discounted augmenting a lower resolution timer with software: IME in button cell powered LCD applications, an 8 bit PIC design draws substantially lower current than the 16 bitters.


You also didn't say anything about power budget other than it needs to last a year, but didn't mention the type of battery/cell you were considering using, which is another major consideration.

nezbrun
Автор

20:40 even better than dual binaries, you have the software detect the CPU type and configure itself. Multiple firmware versions are a PITA to deal with. Most PICs have a register you can use to identify the part number and also revision ( handy for errata workarounds). Failing that, you can just have a pin that gets pulled differently depending on package .

mikeselectricstuff
Автор

15:31 I absolutely love the code configurator. Saved me days of work dicking around with the registers and allowed me to pick and choose peripherals graphically.

mrcrud
Автор

I think the real-world work videos are very helpful.

willkendallpro
Автор

I wouldn't trust a cross-manufacturer parametric search - it would always be out of date and full of errors. Too much chance of missing out on suitable parts. Digikey is as good as it gets generally for para search but MCUs are too complex for this to work beyond basics like memory, speed, pincount etc.

mikeselectricstuff
Автор

One EXTREMELY nice feature of (some of the) modern PICs is that they can internally re-route peripheral I/O to almost arbitrary actual I/O pins - which might come in quite handy if one tries to nest two footprints, as it would immensely facilitate aligning "the same" pins on the two footprints.

AttilaAsztalos
Автор

One of the key parameters at present is availability, especially in any quantity.
Digi-Key has 24761 types of Microchip controllers listed but only 3987 are available and lead times can be up to a year. Ordering direct from the manufacturer doesn't improve the situation.
For my last project availability ended up becoming the key parameter and when I found a suitable part I ordered two years supply as I couldn't predict when I could get any more.

siliconjunkie
Автор

Dave, go back to 10:55 and read the abstract that specifically states a 32 bit timer capability.

rossmckenzie
Автор

finally... after so, so long, .. the reason i watch ur videos... just love ur design stuff. Ive learned more than i can describe!! After the disappointing drop of the power supply i was so eagerly following... Finally some design work. Pls c this 1 thru 2 the end. Do not leave this as a cliffhanger like the power supply project!!

sidharthap
Автор

I really like the "Engineering Designer" series videos the best. It applies real world tasks and challenges for new grad's and alike from a true Professional Engineers standpoint.

Daniel-vhlg
Автор

Hi Dave, these kinds of videos are your absolute best, please keep them coming. We're here to learn.

zvrana
Автор

If it's not the ATmega range I enjoy the STM32 uP's. For *fun* I took my PDVS2mini which is ATmega1284 based and built an STM32 version, almost identical. The code was surprisingly easy to port across. Great to hear Dave is working on a new product!

IanScottJohnston
Автор

I have a customer who needs 10 thousands of different simple devices. Usually he pre-selects the microcontrollers he can get, and then asks me with which one I can do it. Used recently a MSP430 part, for implementing a years long counter with seconds resolution. I ended up configuring the WDT to generate an interrupt instead of reset (nice feature of the chip), which generated one interrupt each second with an external 32k crystal, which also wakes up the device for a very short time to increment a software counter (and also reads a hall sensor). Works for years without battery swap.

Such short wakeups don't need much power, if the duty cycle is very low. So if you want to optimize the cost, you could probably use a cheaper microcontroller as well to implement your 32 bit counter in software. Even if it has only 16 bits and you want to count external events, you can generate an interrupt on overflow and then just increment a second software 16 bit counter.

Back in the old days, I had only 8 bit counters and could do all I wanted with it, or even a simple PIC12 without a counter and cycle accurate programming (if I didn't need to save power), balancing out every branch in assembler by hand to get a fixed clock. But glad these times are over, nowadays programming mircocontrollers is much easier, if it isn't a STM32 with their buggy and incomplete HALs (sorry, currently working with one, the HAL is really a mess if you want special features like full duplex double buffer I2S with DMA).

frankbuss
Автор

It's wonderful to read all the interesting comments. Dave gave us so much knowledge that we are all eager to help him any way we can.

edgar
Автор

Dave, outstanding ... most of my work was 'influenced' by corporate AVL's(approved vendor list) and existing bonded-inventory, resulting in a fit compromise. It is refreshing to see a clean slate design discussion.

danej
Автор

Thanks Dave. Hope you keep this project's videos coming. Love to see every step, hardware selection, PC board design. PIC programing tool. coding, etc.

tomhillpot
Автор

The library of supporting info provided alongside datasheets from mobs like Microchip is just awesome. So handy, particularly when you're a noob and need all the help you can get your hands on.

DadofScience
Автор

Hi Dave,

you can indeed use the 18FXXQYY 8-Bit Pic's to form a 16-Bit timer, although it is not immediately obvious. You can internally connect several input/output signals in the configuration of the peripherials. In addition, you can also put a CLC (configurable logic cell) inbetween. So, for example, on the PIC18F04/05/14/15/Q41 you can select TMR1 to have it's input from TMR0 output. Or you can put a CLC inbetween them.

As said, it's not immediately obvious, but possible. In fact, to get a 32-bit timer, TMR0 would be the only timer, and TMR1 would just be a counter, counting up by one each time TMR0 overflows.

Greetings,

Chris

mamalala
Автор

1:35 Yup, there are 8-bit uCs with 32-bit timer/counter capabilities, for example, the atXmega series can cascade two 16-bit timers into a 32-bit timer. But is not as good as a real 32bit timer, must jump through some hoops, is harder to use, etc. So my advice would be, if you need a 32-bit timer look for uC with real 32-bit hardware(timers, registers, cores), that makes it just easier to move the 32b data around.

PeetHobby
Автор

I have similar low power requirements with a current project. I have been experimenting with the RP2040 and an e-ink display.

Brian-L