Author Topic: Small MCU or CPLD?  (Read 5359 times)

0 Members and 1 Guest are viewing this topic.

Offline JPorticiTopic starter

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Small MCU or CPLD?
« on: December 21, 2018, 02:39:30 pm »
The eternal question :)

I 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 Cost

a 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 available

for 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 13mA

can someone shed some light :)?
 

Online iMo

  • Super Contributor
  • ***
  • Posts: 4784
  • Country: pm
  • It's important to try new things..
Re: Small MCU or CPLD?
« Reply #1 on: December 21, 2018, 02:47:43 pm »
It depends on what those buttons and leds should do..  :)
« Last Edit: December 21, 2018, 02:49:58 pm by imo »
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Small MCU or CPLD?
« Reply #2 on: December 21, 2018, 03:24:25 pm »
CPU
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14475
  • Country: fr
Re: Small MCU or CPLD?
« Reply #3 on: December 21, 2018, 03:38:01 pm »
Second that, I would go for any low-power MCU that you're confortable with. It will be much simpler overall and more flexible.
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: Small MCU or CPLD?
« Reply #4 on: December 21, 2018, 08:48:20 pm »
If the MCU can do 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.
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 2765
  • Country: us
Re: Small MCU or CPLD?
« Reply #5 on: December 21, 2018, 09:19:55 pm »
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
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Small MCU or CPLD?
« Reply #6 on: December 21, 2018, 09:34:21 pm »
I 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.

As 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.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Small MCU or CPLD?
« Reply #7 on: December 21, 2018, 10:09:28 pm »
MCU seems the way to go. But for low power I'd look at TI's MSP430 series.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline NivagSwerdna

  • Super Contributor
  • ***
  • Posts: 2495
  • Country: gb
Re: Small MCU or CPLD?
« Reply #8 on: December 21, 2018, 10:21:24 pm »
IMHO Follow path of least resistance...  MCU.  If the PIC can drive the LEDs directly then IMHO looks like quite a good choice.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: Small MCU or CPLD?
« Reply #9 on: December 21, 2018, 10:39:16 pm »
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.
 
The following users thanked this post: Siwastaja, newbrain, NivagSwerdna

Online cv007

  • Frequent Contributor
  • **
  • Posts: 826
Re: Small MCU or CPLD?
« Reply #10 on: December 21, 2018, 10:52:49 pm »
Quote
Easier to get done, just a C program with some attention to the detail to cut out every uA i can
On 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/rTCwusquFnb8AfQE6
but this is the opposite end of the power scale (as much as possible)
 

Offline NiHaoMike

  • Super Contributor
  • ***
  • Posts: 9018
  • Country: us
  • "Don't turn it on - Take it apart!"
    • Facebook Page
Re: Small MCU or CPLD?
« Reply #11 on: December 22, 2018, 04:25:28 am »
It would be easier to get a high refresh rate with a FPGA or CPLD. That's more important for larger displays, however.
Cryptocurrency has taught me to love math and at the same time be baffled by it.

Cryptocurrency lesson 0: Altcoins and Bitcoin are not the same thing.
 

Offline podericof

  • Newbie
  • Posts: 3
  • Country: gb
Re: Small MCU or CPLD?
« Reply #12 on: December 22, 2018, 12:09:02 pm »
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
 

Offline JPorticiTopic starter

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: Small MCU or CPLD?
« Reply #13 on: December 22, 2018, 03:03:28 pm »
All votes for MCU :D
As 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 MCU
yes, PIC16. small and cheap. No, not TI and certainly not PSOC
Know 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
 

Online PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1544
  • Country: au
Re: Small MCU or CPLD?
« Reply #14 on: December 22, 2018, 07:41:21 pm »
Small MCU or CPLD?

Usually if the MCU can be used, it is chosen.
Reasons to select a CPLD would be speed, or possibly Pin Drive.

... a small dot-matrix display (7x7 RGB) ....
- 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)
...
- will talk to other stuff via UART
5mA for 49 LEDs (RGB) ?  Have you measured that ?  100uA average per led_3 is not much

What baud rate is the UART - can the MCU manage that ? - if yes, select MCU
What 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 your measured/actual LED currents, you may need buffers on one axis.
 

Offline blacksheeplogic

  • Frequent Contributor
  • **
  • Posts: 532
  • Country: nz
Re: Small MCU or CPLD?
« Reply #15 on: December 23, 2018, 01:13:37 am »
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.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Small MCU or CPLD?
« Reply #16 on: December 23, 2018, 01:43:18 am »
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.

Why don't you just suggest some 4-core Intel CPU-based embedded SBC or just full-blown PC or even two, instead?   :palm:   Kind reminder of original requirements:

a contender for the MCU factor is the PIC16LF15385
- Low cost, low power, should fit the power budget
 
The following users thanked this post: Bassman59

Offline blacksheeplogic

  • Frequent Contributor
  • **
  • Posts: 532
  • Country: nz
Re: Small MCU or CPLD?
« Reply #17 on: December 23, 2018, 02:09:15 am »
Why don't you just suggest some 4-core Intel CPU-based embedded SBC or just full-blown PC or even two, instead?   :palm:   Kind reminder of original

Why??? 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.

 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Small MCU or CPLD?
« Reply #18 on: December 23, 2018, 07:57:33 am »
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.

On 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 PIC CPU microcontroller is all you need.

[edit] Also I do not agree to your "99$ is cheap" statement. There are 3$ Arduino Nano clones and 8$ .. 10$ CPLD boards around.
« Last Edit: December 23, 2018, 08:20:49 am by ogden »
 
The following users thanked this post: Siwastaja, newbrain

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Small MCU or CPLD?
« Reply #19 on: December 23, 2018, 11:39:12 am »
sometimes people go outboard :palm:

 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Small MCU or CPLD?
« Reply #20 on: December 23, 2018, 11:48:54 am »
Quote
On 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 ...


LOL

request: guys? I need to do (an astable multivibrator) Blinking LED
response: 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 ... :blah: :blah: :blah:


Relax!  :D
« Last Edit: December 23, 2018, 12:27:21 pm by legacy »
 
The following users thanked this post: JPortici

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Small MCU or CPLD?
« Reply #21 on: December 23, 2018, 12:04:53 pm »
Quote
On 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 ...

LOL

request: guys? I need to blink a led!

Yes, mr.Obvious. I was telling exactly that. - Nano-SOC is overkill. Do you read just first sentence of the whole post?
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Small MCU or CPLD?
« Reply #22 on: December 23, 2018, 12:27:43 pm »

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 :-DD)
 

Offline blacksheeplogic

  • Frequent Contributor
  • **
  • Posts: 532
  • Country: nz
Re: Small MCU or CPLD?
« Reply #23 on: December 23, 2018, 08:18:22 pm »

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 :-DD)

It 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.
 

Offline ogden

  • Super Contributor
  • ***
  • Posts: 3731
  • Country: lv
Re: Small MCU or CPLD?
« Reply #24 on: December 23, 2018, 08:36:01 pm »
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.

You know nothing about nasty then :)

Suggested 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.
« Last Edit: December 23, 2018, 09:00:37 pm by ogden »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf