Advice needed: Choice of microcontroller

This will take a minute to describe so bear with me.

I am working on a project with several other retired EE and software types. It involves an array of sensors which are managed by a micro. The micro sends data over wifi to a host (PC or Mac). The host makes sense of it and displays stuff to a user.

Several years ago we started with the Arduino. The absolute best thing about it was that it was what I would term a “self contained system”. You bought the hardware and installed the software, and it “just worked”. The manual of specialized language statements for the Arduino hardware was well documented and worked according to that documentation. There were ways to get “out of the playpen” but we never needed to. The Arduino system (HW plus SW) filled the bill.

True, there were some issues. The lack of a debugger was a pain. Printf statements can take you only so far but we got used to it. Our project needed wifi but in the early stages of the project, wifi was not critical. I assume wifi could have been added with little problem.

The thing that killed the Arduino was that it was simply not fast enough to poll our external sensors, which are the essence of the project. 16MHz was borderline.

So then we hopped over to the PIC24E “Starter kit for USB” two years ago. (40 MHz plus interna; Input Capture registers solved things.) Although we thought it was going to be somehow a “self contained system”, it wasn’t. It was terribly complicated to use. The wifi software “stack” simply did not work and required months of work to debug MicroChip’s code. Another continuing annoyance is the debugger which regularly does not stop where you put a breakpoint. And finally, cost. The starter kit board plus the “IO Expansion Board” on which the starter kit mounts plus the wifi chip PICtail in total is like $400 or so.

So here’s my question.

Can anyone suggest a microchip system that has the following characteristics?

  1. Has a working Integrated Development Environment. Probably this is a rather bare bones IDE like that for the Arduino.

  2. Has a working debugger where when you ask to stop at line X, it actually stops at line X.

  3. Wifi hardware is available.

  4. The wifi software is clean and works without the need for massive work to make it work.

  5. Cycle time of the cpu is 50 MHz minimum. “More is better.”

  6. Total cost is less than a couple hundred dollars. “Less is better.”

  7. Has at least a dozen general purpose digital IO pins. (5v or 3.3v, don’t care.)

  8. Total system is what I call “self contained”. To get started I don’t immediately have to start finding and loading XYZ modules and drivers from somewhere else. Documentation does not contain phrases like, “If that doesn’t work, then try the ABC module.” A hobby person could use this system.

Thanks,

–jim hahn

feel free to post here and/or use PM. “hahn_02493” at yahoo dot com

Jim:

The Arduino is based on the Atmel Mega CPU family. You don’t have to use the Arduino IDE; you can use regular Atmel debug tools. I have the JTAG-ICE-2 and it works quite nicely, although I rarely have a need for such intrusive debugging.

If you avoid the overhead of the Arduino library calls and write your own, you may find that the onboard CPU is more than fast enough. If it’s still not fast enough, then I’d take a look at the Beaglebone black. It’s a small Linux computer with two additional onboard real time processors that can be programmed separately. It comes out the box with plenty of I/O.

Thanks. I did not know about this debugger.

Do you know if this JTAG-ICE-2 works with the existing Arduino boards? Do they have the JTAG connector?

I also did not know about the overall Atmel debug tools. I assume that a) the JTAG-ICE-2 debugger is a part of these tools. And b) that the Atmel tools support a text editor, compiler/linker, and download capabilities to the chip.

Since the concept of software breakpoints is so simple (I looked at the JTAG-ICE-2 manual), any idea why a base debugger using this concept of breakpoints was not put into the Arduino IDE? Who in their right mind would NOT want a debugger with breakpoints?

–jim

Two clarifications on my “requirements”.

  1. The cost in dollars being less than a couple hundred dollars was for the final target system which I would deploy. If the development hardware/software cost more, even lots more, that’s probably ok. To make that clear, if the final microcontroller board cost $100 but a development system (like the ICE debugger) cost $1000 that’s probably ok.

  2. Be nice if the IDE ran on a Mac or a PC architecture.

–jim

jim_hahn:
Thanks. I did not know about this debugger.

Do you know if this JTAG-ICE-2 works with the existing Arduino boards? Do they have the JTAG connector?

I also did not know about the overall Atmel debug tools. I assume that a) the JTAG-ICE-2 debugger is a part of these tools. And b) that the Atmel tools support a text editor, compiler/linker, and download capabilities to the chip.

Since the concept of software breakpoints is so simple (I looked at the JTAG-ICE-2 manual), any idea why a base debugger using this concept of breakpoints was not put into the Arduino IDE? Who in their right mind would NOT want a debugger with breakpoints?

–jim

Arduino was deliberately developed for artists and other non-technical users so it hides a lot of complexity away at the expense of performance.

Atmel Studio 6 and above is based on the Microsoft Visual Studio IDE, so if you’re familiar with that, skills will transfer. Atmel studio out of the box supports g++ (and gdb I think, but I haven’t used it) and can be configured for pretty much whatever compiler/linker/upload toolchain you want.

TBH, most of the time my debugging uses printf’s. I like the Arduino libraries because they make it easy to get a simple project up faster (although I have had to fix the occasional bug in them) than starting from scratch with an empty editor and a compiler.

Dear OP

Microchip PIC… they always avoid the mainstream to entrap customers. No ARM product.

AVR 8 bit. Nice for LED blinkers.

Use the Photon board. It’s a great value. Has gotten past critical mass in startups.

https://docs.particle.io/guide/getting- … rt/photon/

It’s good. Does not use the horrid WiFi from T.I., nor the kludge MCU that is the ESP8266.

Most professional developers these ARM days use SWD (single wire debugging). STM32Fxxx has the $20 ST-Link. JTAG is dead.

stevech:
JTAG is dead.

That’s an interesting statement. The few times I’ve used my JTAGICE for anything more than just programming, I only remember using the debugWire connections. I can’t remember ever connecting to a JTAG target.

I used JTAG (J-Link) for a year or so. ARM 7.

JTAG takes so many port bits that it’s impossible (almost) to avoid conflicts with JTAG’s need for GPIO bits and your app also needing those bits.

SWD is a godsend.

Arduino is unlikely to ever encourage SWD in their mickey-mouse IDE. So it’s crash-and-flash.