What's the best way to search for a suitable microcontroller? - Page 1
Forum section: electronics / general

author: Refrigerator
author_rank: Super Contributor
timestamp: October 22, 2020, 07:56:51 pm
content: I have a need for a micro with 3 UART's (preferably DMA), one GPIO and a pin count as low as possible but i'm struggling to find one.Is there a search engine for microcontrollers? What's the best way to search for one?

author: james_s
author_rank: Super Contributor
timestamp: October 22, 2020, 08:23:04 pm
content: Use the parametric search on a distributor like DigiKey, Mouser, etc, or if there is a particular manufacture that you like, use the parametric search on their site. They will almost always let you select peripherals such as number of uarts.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: October 23, 2020, 01:04:20 am
content: Quote from: Refrigerator on October 22, 2020, 07:56:51 pmThe smallest MCUs tend to have 1-2 UARTs and the ones with more UARTs tend to come in higher pin count packages....As above, the Disti search engines can help, but number of UARTs is often not listed correctly.You may be able to do one UART in SW, and so use any of the many MCUs with 2 UARTS ?

author: brucehoult
author_rank: Super Contributor
timestamp: October 23, 2020, 02:01:04 am
content: How much performance do you need?Assuming you only need TX and RX for the UARTs, that's 6 I/O pins for them, plus 1 GPIO. And power and ground. So it's possible in 9 pins.You could try an FPGA with 10 I/Os such as this ICE40 for $1.46 qty 1, $1.18 qty 100.https://www.digikey.com/en/products/detail/lattice-semiconductor-corporation/ICE40UL1K-SWG16ITR1K/5130900How much processing do you need?That FPGA is certainly big enough to put a PicoRV32 or SeRV core in, and PicoRV32 shoudl run at around 40 MIPS I think. I don't know how many logic elements a UART takes.There are various other cores and projects that might be suitable if you're interested it taking that path.

author: westfw
author_rank: Super Contributor
timestamp: October 23, 2020, 02:33:43 am
content: Alas, most microcontroller parametric searches do not include the NUMBER of each type of peripheral, and even datasheets are bit vague about how peripherals interfere with each other.ATmega4808 (xx08, actually), as well as the newer AVR-DA and AVR-DB have 3 USARTs in a 28pin SSOP or 32pin QFN/TQFP. No DMA. (I think the DA/DB chips are also in DIP28...)SAMD21 has up to 4 UARTs in 32pin QFN/TQFP. And DMA. SAMD20 is similar (but not DMA! Lest you think they only left out USB.)

author: james_s
author_rank: Super Contributor
timestamp: October 23, 2020, 02:59:00 am
content: Hm I could swear the DigiKey parametric search used to show the number of UARTs but indeed now it appears it does not. I wonder if I'm remembering wrong or if they crippled it at some point.

author: NorthGuy
author_rank: Super Contributor
timestamp: October 23, 2020, 03:11:47 am
content: If an MCU has remappable pins and you don't need to use all your UART modules simultaneously, you may get by with one or two UART modules by switching the pins they operate upon.

author: westfw
author_rank: Super Contributor
timestamp: October 23, 2020, 05:45:27 am
content: Microchip and Cypress, at least, have a parametric search that includes “number of SeialMumble”

author: snarkysparky
author_rank: Frequent Contributor
timestamp: October 23, 2020, 12:17:54 pm
content: Microchip ATSAMD214 sercom units. $1.00 each for quan 1

author: woofy
author_rank: Frequent Contributor
timestamp: October 23, 2020, 12:34:28 pm
content: Microchip have a superb parametric search.So how about a PIC18F04Q413 uarts4 dma14 pins$0.69 in qtyand there's a 20 pin version for $0.84 if you need a few more I/O pins.

author: Refrigerator
author_rank: Super Contributor
timestamp: October 24, 2020, 11:46:32 am
content: Quote from: woofy on October 23, 2020, 12:34:28 pmClose but no cigar.QuoteI would need to have the micro within a week or so. Also i'm very limited on PCB space and SSOP14 is the biggest i can fit, which is why i need the pin count to be as low as possible.By the way i've never fiddled with PIC micros, only Atmel and STM. How similar are these to the usual Atmel/STM stuff and what interface/IDE do they use, can they be programmed through the usual FTDI adapter?

author: chris_leyson
author_rank: Super Contributor
timestamp: October 24, 2020, 12:10:31 pm
content: Sounds like you've narrowed the choice down to Atmel or STM. There are plenty of dual UART parts available and maybe you could do the 3rd UART in software, depending on Baud rate. If you don't need to use all three UARTs at once maybe you could multiplex one or two of them by setting the pin configuration registers.

author: cv007
author_rank: Frequent Contributor
timestamp: October 24, 2020, 01:05:21 pm
content: SAMD10D -24pin VQFN, 4x4mm, 3 SERCOM's>By the way i've never fiddled with PIC micros, only Atmel and STM.That does not narrow it down much- they both make 8bit/32bit mcu's. The SAMD10D was not hard to find, so am guessing your Atmel micros were the 8bit AVR, otherwise you would most likely already be familiar with the SAM lineup.You will probably get better help if you describe just a little why you need 3 separate uarts (and I assume at high speeds if dma is wanted). Maybe you do, but seems a little odd when the only other io is a single gpio pin. Sounds like some kind of translation is the goal, with maybe switching involved.For example, in some other forum someone thought they needed 2 uarts to intercept some uart comm, replace a specific byte in the stream, and send it on its way to the original destination. They only needed a single uart, as the baud rate was the same for the incoming and outgoing, and there was only one-way communication taking place (rx in, modify only a specific byte, tx out).Many mcu's will also be able to move the usart pins around, so if 3 are wanted simply as an a/b selector then you really only need 2, and if you only need 2 the choices available is much larger.

author: Refrigerator
author_rank: Super Contributor
timestamp: October 24, 2020, 01:38:51 pm
content: Quote from: cv007 on October 24, 2020, 01:05:21 pmYeah, i've only had experience with Atmega and Attiny MCU's.Quote from: cv007 on October 24, 2020, 01:05:21 pmThe goal is to make triangular LED modules (kind of like nanoleaf) that would interconnect into any shape (within a grid), the single IO is for WS2812 LED's. I prefer DMA because it simplifies things and data just appears in memory.Each side would have one UART to communicate to adjacent LED modules. Each module would calculate its position automatically based on what it received through the uart. One module would have the power/data wire connected to it that would serve as a reference also.Perhaps i can get away with 2 UART's, i'll have to think about it.The PCB will be about 5.5mm wide and there will be one for each side of the triangle. Each PCB will be identical, one with MCU, others with jumpers to configure them as passthroughs.

author: brucehoult
author_rank: Super Contributor
timestamp: October 24, 2020, 02:21:56 pm
content: From what you're saying now, does it even have to necessarily be UART?What about a clock at WS2812 rate going to every board, and 3 simple input pins and 3 + 1 (the WS2812) output pins with everything changing synchronously with the clock? That's just 8 GPIOs, which is trivial to find.Not that you usually can't afford to take interrupts while you're writing data out to WS2812 because the timing is very critical. I don't know whether you could afford contention from DMA either -- it would depend on the overall system speed.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 24, 2020, 02:36:58 pm
content: As cv007 already suggested above, I was thinking about looking at ATSAM MCUs, such as this:https://www.microchip.com/wwwproducts/en/ATSAMD10D14

author: cv007
author_rank: Frequent Contributor
timestamp: October 24, 2020, 05:03:43 pm
content: Maybe I misunderstand, but I take it since the triangle has 3 sides you have a problem using the ws2812 to repeat, so the plan is to use the uart as the data mover, and each mcu will control their own led.Working out the routing would seem difficult (to me anyway), as you have both the possibility of a 'tee' and also of 'closed loop'.If I tried to do something like this, I would first consider how many of these things could be in use. If some reasonable number, I would assign these triangles an address (can be done after programming), then 'broadcast' the data to an address with the data it needs (all mcu uart rx tied together)-0xFF 0xFF 0xFF 0xFF //sync, start of new 'frame'0x01 0x11 0x22 0x33 //mcu 1 = rgb data0x02 0x11 0x88 0x99 //mcu 2 = rgb data0x0A 0x55 0x66 0x77 //mcu 10 = rgb dataeach mcu gets it own data by looking for its address, in this case limited to 254 mcu's, then sets it own led with the new dataWith something like 115200 baud, you could get 254 led's going at 10fps (assuming each led needed new data every time). There would be no 'routing' to deal with, and anything with a uart could be used as the source of the led data (pc, esp32, etc.) since the mcu's handle the led directly. The mcu requirements now fall to almost anything with a uart, and since setting the led can be done within a single uart char time frame, you can bit bang the ws2812 without missing an incoming uart char. You basically need 4 pins for the mcu- power, ground, rx, led output.Just a thought.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: October 24, 2020, 11:45:14 pm
content: Quote from: Refrigerator on October 24, 2020, 01:38:51 pmIf you are size-paranoid, then BGA packages can come very smallThe EFM32HG from Silabs for example is 36-CSP (3.02x2.89)