Small MCU or CPLD? - Page 1
Forum section: electronics / general

author: JPortici
author_rank: Super Contributor
timestamp: December 21, 2018, 02:39:30 pm
content: The eternal questionI am doing initial research for a new thing. Basically some buttons and a small dot-matrix display (7x7 RGB) and i'm trying to decide if i should consider using a small CPLD over a small MCU.In order of importance:- Low power (i would assume an average current of 5mA @3.3V, LEDs included. the lower the better. This means about 1-2mA for the controller)- small, but ~44pin TQFP is fine. Can do double layer assembly if required- will talk to other stuff via UART- Low Costa contender for the MCU factor is the PIC16LF15385- Low cost, low power, should fit the power budget- Internal clock, very flexible routing: can run the core from LPFRC when UART is not needed (or even sleep) while PWM is using a faster clock source- Pins are remappable, very flexible: Basically, i need three PWM generators and each turn i change the output pins to select a different row/column- Easier to get done, just a C program with some attention to the detail to cut out every uA i can- Smaller packages availablefor the CPLD part i have eyed the ispMACH 4000V from lattice but i can't tell- How many macrocells i will need, i have to try and write the code but lower end models are simillarly priced to the MCU- If i need an external clock or there is an internal source- How much current it will need, the datasheet is scary on this regard: 1.8V versions have operating current consumption in the order of undred(s) of uA but 2.5 and 3.3V start at 1.8mA when supply is 1.8V and goes up to 13mAcan someone shed some light?

author: iMo
author_rank: Super Contributor
timestamp: December 21, 2018, 02:47:43 pm
content: It depends on what those buttons and leds should do..

author: legacy
author_rank: Super Contributor
timestamp: December 21, 2018, 03:24:25 pm
content: CPU

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 21, 2018, 03:38:01 pm
content: Second that, I would go for any low-power MCU that you're confortable with. It will be much simpler overall and more flexible.

author: Siwastaja
author_rank: Super Contributor
timestamp: December 21, 2018, 08:48:20 pm
content: If the MCUcando it - and even better, you already have one suitable, and it's low cost, even! - , there's very little reason to do otherwise. CPLD/FPGA's great when you simply cannot buy an MCU with the peripherals / IO capability you need.

author: jmelson
author_rank: Super Contributor
timestamp: December 21, 2018, 09:19:55 pm
content: The Xilinx XC9636XL runs off a single supply, has 44 pins and 36 of their "logic elements". It costs just over US $1 in single quantity. It has some bigger brothers if you need more logic capability. I've used them in several projects.Jon

author: ogden
author_rank: Super Contributor
timestamp: December 21, 2018, 09:34:21 pm
content: Quote from: JPortici on December 21, 2018, 02:39:30 pmAs already said: if you can do it with CPU - do it with CPU. If you can't (high speed signals or like that) - then seek for alternatives such as CPLD.

author: nctnico
author_rank: Super Contributor
timestamp: December 21, 2018, 10:09:28 pm
content: MCU seems the way to go. But for low power I'd look at TI's MSP430 series.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: December 21, 2018, 10:21:24 pm
content: IMHO Follow path of least resistance... MCU. If the PIC can drive the LEDs directly then IMHO looks like quite a good choice.

author: NorthGuy
author_rank: Super Contributor
timestamp: December 21, 2018, 10:39:16 pm
content: If it is commercial, then MCU of course - less work and less money.Otherwise, select the path that you're the least familiar with. It'll be more fun.

author: cv007
author_rank: Frequent Contributor
timestamp: December 21, 2018, 10:52:49 pm
content: QuoteOn these newer pic's, don't forget about the PMD where you can disable most modules and the system clock to peripherals (and can then pretend you are using an ARM). I think the datasheet power numbers are with the pmd in the default state, which is everything enabled. I'm not sure how much this amounts to, but its something.Here is my display module using a pic-https://goo.gl/photos/rTCwusquFnb8AfQE6but this is the opposite end of the power scale (as much as possible)

author: NiHaoMike
author_rank: Super Contributor
timestamp: December 22, 2018, 04:25:28 am
content: It would be easier to get a high refresh rate with a FPGA or CPLD. That's more important for larger displays, however.

author: podericof
author_rank: Newbie
timestamp: December 22, 2018, 12:09:02 pm
content: You could try using the PSoC which are MCU with several CPLD inside and with a few Analog components.http://www.cypress.com/products/32-bit-arm-cortex-m3-psoc-5lp

author: JPortici
author_rank: Super Contributor
timestamp: December 22, 2018, 03:03:28 pm
content: All votes for MCUAs always, i'm looking for an excuse to get out of the comfort zone, but at this point product's going to be done with MCUyes, PIC16. small and cheap. No, not TI and certainly not PSOCKnow all the gotchas and I've already did other low power stuff with PIC16, reality matched the numbers on datasheet to a reasonable degree so i am way more confident I get it done

author: PCB.Wiz
author_rank: Super Contributor
timestamp: December 22, 2018, 07:41:21 pm
content: Quote from: JPortici on December 21, 2018, 02:39:30 pmUsually if the MCUcanbe used, it is chosen.Reasons to select a CPLD would be speed, or possibly Pin Drive.Quote from: JPortici on December 21, 2018, 02:39:30 pm5mA for 49 LEDs (RGB) ? Have you measured that ? 100uA average per led_3 is not muchWhat baud rate is the UART - can the MCU manage that ? - if yes, select MCUWhat drive current is needed - can the MCU (possibly with buffers) manage that ? If yes, select MCU.eg a 7x7 matrix needs 7x more current on one axis, than the other. Depending on yourmeasured/actual LED currents, you may need buffers on one axis.

author: blacksheeplogic
author_rank: Frequent Contributor
timestamp: December 23, 2018, 01:13:37 am
content: A DE0-NANO-SOC/Atlas-SOC board is inexpensive and given you the option of fully implemented in the embedded FPGA, Full implementation using a dual ARM-9 HPS, or using QSYS and splitting the design.

author: ogden
author_rank: Super Contributor
timestamp: December 23, 2018, 01:43:18 am
content: Quote from: blacksheeplogic on December 23, 2018, 01:13:37 amWhy don't you just suggest some 4-core Intel CPU-based embedded SBC or just full-blown PC or even two, instead?Kind reminder of original requirements:Quote from: JPortici on December 21, 2018, 02:39:30 pm

author: blacksheeplogic
author_rank: Frequent Contributor
timestamp: December 23, 2018, 02:09:15 am
content: Quote from: ogden on December 23, 2018, 01:43:18 amWhy??? If your note sure what best meets your requirements, surly you would want to prototype first so a board like the Nano-SOC gives you flexibility cheaply. Once you have this select the most appropriate device. Randomly suggesting makes no sense as does the original question 'what should I get for my project'. I made a suggestion to step back, use a board and prototype a solution to determine the best fit.

author: ogden
author_rank: Super Contributor
timestamp: December 23, 2018, 07:57:33 am
content: Quote from: blacksheeplogic on December 23, 2018, 02:09:15 amOn Nano-SOC you would prototype some complex DSP (math-intensive) "cross-compileable" project where you are not sure - it shall be implemented on multi-core ARM or FPGA. For 7x7 RGB dot display and some buttons it will be overkill that cannot be *reused* in case you see that small PICCPUmicrocontroller is all you need. Also I do not agree to your "99$ is cheap" statement. There are 3$ Arduino Nano clones and 8$ .. 10$ CPLD boards around.

author: legacy
author_rank: Super Contributor
timestamp: December 23, 2018, 11:39:12 am
content: sometimes people go outboard

author: legacy
author_rank: Super Contributor
timestamp: December 23, 2018, 11:48:54 am
content: QuoteLOLrequest:guys? I need to do (an astable multivibrator) Blinking LEDresponse:yeah, you need to implement a tensor processing unit able to accelerate application-specific integrated circuit (ASIC) in order to compute the curvature of the universe inside a supermassive black hole (we have already found one in our galaxy), just around the singularity, thus I suggest you ... to enhance the Riemann tensor, and to implement one in hardware, and for the purpose I suggest you a cluster of FPGA clocked at 10Ghz so you also need a liquid cooling system like that is going to be used at CERN to study neutrinos, because ...Relax!

author: ogden
author_rank: Super Contributor
timestamp: December 23, 2018, 12:04:53 pm
content: Quote from: legacy on December 23, 2018, 11:48:54 amYes, mr.Obvious. I was telling exactly that. - Nano-SOC is overkill. Do you read just first sentence of the whole post?

author: legacy
author_rank: Super Contributor
timestamp: December 23, 2018, 12:27:43 pm
content: the super advanced user would have replied: { two transistors, four resistors, two capacitors, two LEDs }(user warning: this circuit might not be working inside a black-hole)

author: blacksheeplogic
author_rank: Frequent Contributor
timestamp: December 23, 2018, 08:18:22 pm
content: Quote from: legacy on December 23, 2018, 12:27:43 pmIt is quite startling how poor posters behave. I gave my thoughts to the original poster who was looking to do some research on a CPLD vrs a Micro-controller to look at a basic board that provided flexibility to model and prototype a solution's. I also assumed the original poster with >< 23,00 posts was beyond flashing leds.Now, I understand several of you may lack the initiative to pick up a prototype board and learn how to use it (it does required some reading) but there is no reason to be nasty on a forum just because you don't happen to think the suggestion fits with your world view. Leave the suggestion and move on especially when your not the original poster.I had assumed by the forum title that projects were beyond the blink a led. I'm not going to respond to any threads in this forum again.

author: ogden
author_rank: Super Contributor
timestamp: December 23, 2018, 08:36:01 pm
content: Quote from: blacksheeplogic on December 23, 2018, 08:18:22 pmYou know nothing about nasty thenSuggested by you 99$ FPGA board is not inexpensive as you say. It is also overkill for the purpose of OP. If you fail to understand that - don't blame others who disagree with you in this regard.

author: JPortici
author_rank: Super Contributor
timestamp: December 24, 2018, 10:44:10 am
content: Quote from: PCB.Wiz on December 22, 2018, 07:41:21 pmWell, yes, a lot of things are omitted/implied, like the fact that not every LED will be active at time, not even one entire row, that 7x7 is the absolute worst case and we may have to reduce the matrix to 5x7 or even 5x5, that there will be reservoir capacitors, that the display won't be always on and suchI just tried to simplify the problem to the maximum extent.By the way, i love it how things always deviate to the point that ridiculously overkill solutions are suggested, as legacy and ogden pointed outQuote from: blacksheeplogic on December 23, 2018, 08:18:22 pmsometimes what the end user wants/needs is just a fancy led blinking machine

author: JPortici
author_rank: Super Contributor
timestamp: January 14, 2019, 04:42:33 pm
content: Little update, i assembled two prototypes, one using RGB and the other using only while LEDs.With the current LED/Resistor combo, using only one colour at a time i have a 7.5mA peak current with the RGB version, 4.5mA peak current with the white version.I can increase the LED base resistor, because these little bastards are very bright, and a beautiful colour too.RGB LED: ASMB-KTF0-0A306White LED: LW Q38G-Q2OO-3K5L-1