Author Topic: Recommend a microcontroller  (Read 2784 times)

0 Members and 1 Guest are viewing this topic.

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 17860
  • Country: nl
    • NCT Developments
Re: Recommend a microcontroller
« Reply #25 on: September 06, 2019, 10:50:59 pm »
Oh please don't turn a simple project into a multi-processor turd which is impossible to debug.  :palm:
Rule number one with communication is that it will fail and thus you'll need to handle communication failures. In turn this means you need to built in a way to reset a multi-processor system back into a known good state. Also: each processor will run at it's own pace and do stuff at it's own time. At one point all this asynchronousness needs to become synchronised. In short: avoid multi processor systems like the plague. They are extremely hard to get to work reliably.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: Dabbot

Online mariush

  • Super Contributor
  • ***
  • Posts: 3810
  • Country: ro
  • .
Re: Recommend a microcontroller
« Reply #26 on: September 06, 2019, 11:06:01 pm »
The only way those small microcontrollers would interact with the main micro would be through something standard like i2c or spi ... nothing complicated, no bit-banging, plain and simple... nothing to keep synchronized, or whatever. They'd basically behave like dumb port expander chips.

You'd have 3-4 commands like "send me state of all 32 buttons" and the micro sends 4 bytes back through the i2c or spi or whatever ... or you send a one byte command followed by a bunch of bytes with the color information for leds. ex set led 1, r, g,b ... 4 bytes ... send and forget.

how is this any different than using shift registers or shifting data for 120 leds on a strip every time something changes?
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 17860
  • Country: nl
    • NCT Developments
Re: Recommend a microcontroller
« Reply #27 on: September 06, 2019, 11:22:17 pm »
The only way those small microcontrollers would interact with the main micro would be through something standard like i2c or spi ... nothing complicated, no bit-banging, plain and simple... nothing to keep synchronized, or whatever. They'd basically behave like dumb port expander chips.

You'd have 3-4 commands like "send me state of all 32 buttons" and the micro sends 4 bytes back through the i2c or spi or whatever ... or you send a one byte command followed by a bunch of bytes with the color information for leds. ex set led 1, r, g,b ... 4 bytes ... send and forget.

how is this any different than using shift registers or shifting data for 120 leds on a strip every time something changes?
If they behave like dump port expanders then it is better to just buy port dumb expanders. But as soon as you are going to implement more clever commands (IOW some form of sequential logic) you'll be opening a can of worms. I've seen the strategy to use many small microcontrollers instead of one big one fail many times. Especially when the project is being built by a relatively novice person.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 5688
  • Country: nl
Re: Recommend a microcontroller
« Reply #28 on: September 07, 2019, 08:17:55 am »
Agree with nctnico, if not absolutely required don't do it.
If you do have to use it don't use communication dependencies use some thing simple like a mailbox, eg dual port sram where both controllers can read write to.
 

Offline krho

  • Regular Contributor
  • *
  • Posts: 213
  • Country: si
Re: Recommend a microcontroller
« Reply #29 on: September 07, 2019, 08:19:46 am »
Check www.ucapps.de, seems like they've already done what you want. The latest Core was designed around STM32F4: http://ucapps.de/mbhp_core_stm32f4.html
Taht cannot be sold as it uses evaluation boards from stm, which explicitly forbids selling final products containing their eval boards.
 

Offline donotdespisethesnake

  • Frequent Contributor
  • **
  • Posts: 884
  • Country: gb
  • Embedded stuff
Re: Recommend a microcontroller
« Reply #30 on: September 07, 2019, 12:10:40 pm »
Check www.ucapps.de, seems like they've already done what you want. The latest Core was designed around STM32F4: http://ucapps.de/mbhp_core_stm32f4.html
Taht cannot be sold as it uses evaluation boards from stm, which explicitly forbids selling final products containing their eval boards.

Unless they have a patent, they can't stop you doing whatever you like with the board, I think the "first sale" doctrine applies. But on a practical note, if you tried to order 10,000 boards from them they could just say "no". I don't know why they put this stupid non-legal clause in anyway, it's this sort of dumb-ass shit that always puts me off anything to do with STM.

Anyway, while we are nominating favourite random micros, mine is XMC4700, there's nice dev boards and the "DAVE" IDE and libraries are some of the best I've used, unlike typical vendor offerings. https://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-arm-cortex-m/32-bit-xmc4000-industrial-microcontroller-arm-cortex-m4/xmc4700/#!tools
Bob
"All you said is just a bunch of opinions."
 

Offline mrunje96

  • Contributor
  • Posts: 8
  • Country: hr
Re: Recommend a microcontroller
« Reply #31 on: September 07, 2019, 05:50:21 pm »
So the best way would be to use some ethernet chip/mcu example w5100 and then talk over SPI to mcu that is powerful enough to do 120buttons scan around 10+ times in second, send something over midiusb/ethernet, depending on message from ethernet output right color to leds?

Is there any problem to communicate with different PC's in same LAN, like i want to send one data on 192.168.1.1, another to 192.168.1.2 and recieve respond or another data from both of them?
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 17860
  • Country: nl
    • NCT Developments
Re: Recommend a microcontroller
« Reply #32 on: September 07, 2019, 05:58:48 pm »
The Wiznet chips support multiple open TCP/IP connections and if you use UDP you can serve many hosts. Just reply to the address of the sender of the message.

I recommend to use the W5500 or the W6100. The latter also has IPv6 support.
« Last Edit: September 07, 2019, 06:05:13 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 3431
  • Country: fr
Re: Recommend a microcontroller
« Reply #33 on: September 07, 2019, 07:23:38 pm »
I hadn't looked at Wiznet products in a while. I remembered chips which would only support 10Base-T and SPI or something like that. The W6100 seems pretty nice though: 100Base-T, and both SPI and parallel interfaces.

If they could release a 1000Base-T version with a 16-bit or 32-bit FIFO interface, that would be great! ;D
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 17860
  • Country: nl
    • NCT Developments
Re: Recommend a microcontroller
« Reply #34 on: September 07, 2019, 07:27:59 pm »
I hadn't looked at Wiznet products in a while. I remembered chips which would only support 10Base-T and SPI or something like that. The W6100 seems pretty nice though: 100Base-T, and both SPI and parallel interfaces.

If they could release a 1000Base-T version with a 16-bit or 32-bit FIFO interface, that would be great! ;D
Why would you need a 1000Base-T device? The Wiznet chips themselves and most general purpose microcontrollers don't have the processing power to deal with that kind of bandwidth anyway and every switch supports at least 100Base-T.
« Last Edit: September 07, 2019, 07:29:39 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 3431
  • Country: fr
Re: Recommend a microcontroller
« Reply #35 on: September 07, 2019, 07:54:11 pm »
I hadn't looked at Wiznet products in a while. I remembered chips which would only support 10Base-T and SPI or something like that. The W6100 seems pretty nice though: 100Base-T, and both SPI and parallel interfaces.

If they could release a 1000Base-T version with a 16-bit or 32-bit FIFO interface, that would be great! ;D
Why would you need a 1000Base-T device? The Wiznet chips themselves and most general purpose microcontrollers don't have the processing power to deal with that kind of bandwidth anyway and every switch supports at least 100Base-T.

I'm sure you would have said the same thing if I had asked for a 100Base-T device back when they were only offering 10Base-T... :D
And since this is Wiznet's main business, they probably WILL release such a chip one of these days anyway.

There are many cases in which getting more than about 10MBytes/s throughput (if you're lucky and the stars are aligned) can be useful, just like having USB 2 HS (with about half the throughput) can be as well. There are all kinds of MCUs these days, some pretty fast. You could also want to use this with a small FPGA instead of having to deal with an ethernet + TCP/IP stack as IPs that could be costly and/or require a big FPGA just to be synthesized on. You could want to use anything (FPGA, MCU) else than a full SOC requiring a full OS just to get an ethernet interface... while still getting better throughput than what you'd get with a simple embedded ethernet peripheral on an MCU, requiring additional libraries and possibly significant debug time.

So I think there would be some market for this. Really ethernet+TCP/IP is not something that I'm very fond of messing with at the implementation level.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 17860
  • Country: nl
    • NCT Developments
Re: Recommend a microcontroller
« Reply #36 on: September 07, 2019, 08:04:25 pm »
If you are getting into FPGA territory then adding a SoC with a 1GB ethernet + Linux isn't a far stretch to make. Also if you are going the FPGA route then implementing UDP is quite simple (together with a soft core). I have an FPGA (with softcore) design which pushes data out at a rate of 400MBps or so on a 1Gbit/s interface.

The Wiznet chips are really geared towards simple IoT device which need to send a little bit of data. If they get more fancy than that they will get too expensive.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 3431
  • Country: fr
Re: Recommend a microcontroller
« Reply #37 on: September 07, 2019, 08:29:18 pm »
If you are getting into FPGA territory then adding a SoC with a 1GB ethernet + Linux isn't a far stretch to make.

Again, I may not want a SoC + a Linux OS just to run my damn device if I don't have to. So this chip would just allow me to do that. Not every fly requires a hammer to get killed.

Also if you are going the FPGA route then implementing UDP is quite simple (together with a soft core). I have an FPGA (with softcore) design which pushes data out at a rate of 400MBps or so on a 1Gbit/s interface.

Yeah. It may be simple, but did you write a complete ethernet controller + UDP in RTL? Did you buy anything? How big is the FPGA? And the Wiznet device supports TCP and IPV6. It's another world already.
(Again I already said why I wouldn't necessarily consider doing this. If you have, good for you.) Kinda same territory here as USB to me, for my uses. Would I want to bother writing my own USB core? I don't think so. Would I consider buying an IP? Maybe if the product and quantities justify this, but otherwise, most likely not.

The Wiznet chips are really geared towards simple IoT device which need to send a little bit of data. If they get more fancy than that they will get too expensive.

They are geared towards whatever will sell. The W6100 is already clearly a significant step up.
And too expensive? The W6100 is currently about 2.5€ per 1! So even if the 1000Base-T version was 4 times that, I would seriously consider it.
 

Offline mrunje96

  • Contributor
  • Posts: 8
  • Country: hr
Re: Recommend a microcontroller
« Reply #38 on: September 07, 2019, 08:45:56 pm »
Since im quite new to this kind of controllers (wiznet w6100) and stacking them, do i need to program anything to them or just connect to mcu and ethernet magjack and do programing only on mcu?
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 17860
  • Country: nl
    • NCT Developments
Re: Recommend a microcontroller
« Reply #39 on: September 07, 2019, 08:59:45 pm »
Yeah. It may be simple, but did you write a complete ethernet controller + UDP in RTL? Did you buy anything? How big is the FPGA?
This was on a Spartan 6. The ethernet core is from an existing (open source) project. But even then getting the packets into the softcore and implementing ARP wasn't such a big job. Things get hairy with TCP/IP (I wouldn't touch that) but UDP is pretty simple.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 17860
  • Country: nl
    • NCT Developments
Re: Recommend a microcontroller
« Reply #40 on: September 07, 2019, 09:00:56 pm »
Since im quite new to this kind of controllers (wiznet w6100) and stacking them, do i need to program anything to them or just connect to mcu and ethernet magjack and do programing only on mcu?
You just program the mcu to communicate with the Wiznet chip (over SPI) and that's it. Wiznet has example code on their website.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline mrunje96

  • Contributor
  • Posts: 8
  • Country: hr
Re: Recommend a microcontroller
« Reply #41 on: September 07, 2019, 09:06:28 pm »
Since im quite new to this kind of controllers (wiznet w6100) and stacking them, do i need to program anything to them or just connect to mcu and ethernet magjack and do programing only on mcu?
You just program the mcu to communicate with the Wiznet chip (over SPI) and that's it. Wiznet has example code on their website.

Thanks, i will check that
 

Offline brucehoult

  • Super Contributor
  • ***
  • Posts: 1122
  • Country: nz
  • Currently at SiFive, previously Samsung R&D
Re: Recommend a microcontroller
« Reply #42 on: September 07, 2019, 11:52:08 pm »
Many or most evaluation boards are not going to have CE FC certification. Ours certainly don't. Raspberry Pis, Odroids, Arduinos etc do.
 

Online rsjsouza

  • Super Contributor
  • ***
  • Posts: 3448
  • Country: us
  • Eternally curious
    • Vbe - vídeo blog eletrônico
Re: Recommend a microcontroller
« Reply #43 on: September 08, 2019, 02:05:12 am »
Many or most evaluation boards are not going to have CE FC certification. Ours certainly don't. Raspberry Pis, Odroids, Arduinos etc do.
Some level of compliance must be done, but being a non-enclosed PCB carries very little requirements for electromagnetic compatibility or safety. The famous printed phrase: "For evaluation only; not FCC approved for resale"
Vbe - vídeo blog eletrônico http://videos.vbeletronico.com

Oh, the "whys" of the datasheets... The information is there not to be an axiomatic truth, but instead each speck of data must be slowly inhaled while carefully performing a deep search inside oneself to find the true metaphysical sense...
 

Offline fchk

  • Regular Contributor
  • *
  • Posts: 57
  • Country: de
Re: Recommend a microcontroller
« Reply #44 on: September 08, 2019, 06:31:31 am »
Hi, can someone recommend me a microcontroller for project (im currently at rpi 3b+ just for prototyping) that uses ethernet ( UDP for OSC protocol/comunication), midi through USB, around 120 buttons (that i will handle through shift registers 165D, or you have better idea for this amount of buttons) and same number of leds (WS2812, so im just sending data to data in pin of led and it has +5v, gnd pin and data out..) + few slide potentiometers. Thanks in advance.  :-+ :-+

TI TIVA TM4C129.
Builtin 10/100 Ethernet MAC+PHY
Buildin USB Host/Device/OTG
120 MHZ, up to 1M Flash/256k RAM
nice TI RTOS for free

Launchpad available
https://www.digikey.nl/product-detail/nl/texas-instruments/EK-TM4C1294XL/296-37267-ND/4725808

fchk
 

Offline Sal Ammoniac

  • Frequent Contributor
  • **
  • Posts: 906
  • Country: us
    • Embedded Tales Blog
Re: Recommend a microcontroller
« Reply #45 on: September 09, 2019, 04:29:47 pm »
Anyway, while we are nominating favourite random micros, mine is XMC4700, there's nice dev boards and the "DAVE" IDE and libraries are some of the best I've used, unlike typical vendor offerings. https://www.infineon.com/cms/en/product/microcontroller/32-bit-industrial-microcontroller-based-on-arm-cortex-m/32-bit-xmc4000-industrial-microcontroller-arm-cortex-m4/xmc4700/#!tools

The Infineon XMC4000 series is quite nice, especially for motor control, power conversion, and things like that. Documentation is not bad either, even though it's obviously translated from German it's still better than ST or Freescale documentation. They have an application note for each peripheral on the chip that goes into detail beyond what's in the reference manual, which is somewhat unusual these days.

I don't know much about Dave as I've never used it (I typically use the XMC4700 with IAR or CrossWorks), but as it's based on Eclipse it's probably very similar to STM32Cube or MCUXpresso. They do have a nice debugger probe that's Segger J-Link compatible and costs only about $90, and it even includes isolation.

The fastest parts are limited to 144 MHz, however, and it's an M4, not an M7, so if you need more CPU horsepower or DP hardware floating point, you'll have to look at other vendors. I've been asking Infineon for years about their plans for faster parts and/or parts based on the M7, and I've gotten nothing but silence from them.
 

Offline samy03

  • Contributor
  • Posts: 29
  • Country: us
Re: Recommend a microcontroller
« Reply #46 on: September 11, 2019, 07:20:49 pm »
AM335x is pretty good as its used on beaglebone black and all the linux stuff is pretty similar to Raspi and is easily available.
 

Offline Bob Moore

  • Newbie
  • Posts: 2
  • Country: tw
Re: Recommend a microcontroller
« Reply #47 on: September 23, 2019, 09:38:30 am »
My 2 recommendations

The PIC (Programmable Intelligent Computers) and STM (by STMicroelectronics) microcontroller product lines.They both  have ranked among the top MCUs on the market for more than a decade. I feel both  manufacturers offer high-quality, highly diverse microcontrollers that can support different embedded applications, from IOT to Industrial to high quantity consumer applications.

Microchip (Pic 32) continues to support the lone tinkerer, in continuing to support things like the DIP package, and in hosting live webinars where you can ask questions to the company’s engineering team directly. If I had to choose one and only one I would go for STM32 though https://titoma.com/blog/stm32-pic32-manufacturing/ I feel it offers more.
 

Online Scrts

  • Frequent Contributor
  • **
  • Posts: 592
  • Country: lt
Re: Recommend a microcontroller
« Reply #48 on: October 25, 2019, 05:12:17 pm »
STM32F407 does have ethernet, but you would need a custom motherboard for the devkit with Ethernet port.
...Supporting ethernet on the STM32F yourself from scratch is lets put it mildly a long challenge  ;)

Don't do it yourself. I've used LwIP before and integration was super easy.
 

Online rstofer

  • Super Contributor
  • ***
  • Posts: 6534
  • Country: us
Re: Recommend a microcontroller
« Reply #49 on: October 26, 2019, 04:52:06 pm »
In my view, the important question is whether you need code protection.  It isn't a simple question because the obvious answer "of course I do" might be incorrect if the application itself is trivial.

If all you do is read a bunch of buttons, frame an Ethernet packet and send it down the wire, I can duplicate your project by lunch time without ever seeing your hardware.  Designing from bare metal just to get code protection from a project that performs some trivial function is a waste of effort.

In fact, from a long term software maintenance point of view, having a full blown Pi makes a lot of sense.  The end user can update the software from a web site.  Heck, it could be automated - if the Pi can see the web site, it checks for an update.  Everybody does that sort of thing.

Of course, there is the "open source" issue and I don't pretend to understand how that works.  You can bet that this will come up at some point since you will almost inevitably be using "open source" tools and libraries.  Again, I don't understand how it works.  Neither does anybody else!

Because I already have a working project and if Linux brought nothing to the dance, I would tend to use the mbed LPC1768 mounted on a daughter card holding a MagJack and any other project specific hardware but I can see the allure of one of the STM boards.  As a fact, I would use the mbed toolchain and libraries for any of the boards they support and many STM boards are included in that list.

https://os.mbed.com/platforms/

Here are the boards that support Ethernet and the LPC1768 is at the lower right:

https://os.mbed.com/platforms/?q=&Communication=Ethernet

On the other hand, with Linux I get SSH (or Telnet) which may be handy for the user.  If there is no need for a console display, keyboard or mouse, the easy way to maintain the system is with a Telnet session and this comes free with Linux.

OTOH, Linux isn't a real-time OS and I don't know whether that matters to your program.  If time critical?  Can Linux handle it?  If not, FreeRTOS is one of the mbed libraries for my favorite LPC1768.  But unless I wanted to write a bunch of code, Telnet might be out of the question.  I haven't looked at the network stack to see what is available at that level.  My application just made a TCP connection to a LaserJet.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf