Which microcontroller should I buy?

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
DuaneDegn
 
Posts: 141
Joined: Thu Aug 02, 2012 1:39 pm

Re: Which microcontroller should I buy?

Post by DuaneDegn »

Microcontrollers are generally single-task devices. The more stuff you want to connect to one, the harder it gets to make all the pieces work together. Getting multiple displays to work together is especially hard.
I'm a big fan of Parallax's Propeller microcontroller. Adding new code to control extra devices generally doesn't conflict with previously written code since the various device drivers are compartmentalized into individual cogs.

Here's a link to my "Fun with Spin" playlist.

https://www.youtube.com/playlist?list=P ... QS2MrCywpX

There isn't as much code available for the Propeller as there is for the Arduino but there is code to use Nordic's nRF24L01+ modules.

I don't know if there's Propeller code to run Adafruit's cool little touchscreens but I just ordered one a few days ago myself and I plan to write a driver if one isn't already available.

I'm sure I'm biased but I think there's something immensely fun about writing code which executes in parallel.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Which microcontroller should I buy?

Post by adafruit_support_mike »

The Propeller architecture has a lot of advantages, and working with it can be a lot of fun.

The place where parallelism gets hard is dealing with shared information. As long as cores operate independently, or exactly one core has write access to a value and all others are limited to read-only access, keeping things under control is easy. Trying to manage concurrent read-write access from two or more cores, or worse yet, trying to mirror data across multiple cores is a real challenge.

User avatar
DuaneDegn
 
Posts: 141
Joined: Thu Aug 02, 2012 1:39 pm

Re: Which microcontroller should I buy?

Post by DuaneDegn »

I know there were a few times when I began using the Propeller, I ran into trouble when I had two cogs which could change the same variable. I rarely have this trouble anymore. If two cogs really need to change the same variable then there is likely a flaw in the structure of the program. For example, my Mecanum Wheeled Rover 5 can be controlled from a RC remote (usually used with a helicopter) or it can be controlled over the USB port to test the various functions while on the bench. These two input devices don't directly change any of the control variables but instead the main control loop monitors these inputs and adjust the control variables appropriately.

As you suggested, I find if I'm careful about only having one cog change the value of a variable, programming in parallel becomes easier. If one needs to make sure a single cog has exclusive access to some resource, a lock could be used. There are 8 locks in the Propeller which can be used to block access to a piece of memory or other resource until the cog using the resource releases the lock. (I occasionally use locks to share an UART or I2C bus between multiple cogs.)

You're right this type of programming can be challenging but I think being able to write code which will run concurrently is a big reason I enjoy programming the Propeller so much.

IMO, it's a great microcontroller for robotics since it allows one to control multiple devices while simultaneously monitoring multiple sensors. Want to control 32 servos? No problem. Here are 22 servos doing something a little more interesting.

The Propeller is very Adafruit friendly. Both 3.3V and 5V devices work great with the Propeller (5V inputs just need a 3.3K resistor to limit the current to 500uA). It handles NeoPixels with one hand tied behind its back. I ought to (and probably will) make a YouTube playlist titled "Spinning Adafruit" or "Propelling Adafruit" to show off all the Adafruit products I've used with the Propeller (BTW the FONA and the Propeller are a great match).

Did I mention I'm a fan of the chip? I'm also a fan of Adafruit. (UPS tells me my latest Adafruit order is out for delivery. Woo hoo!)

User avatar
stevech
 
Posts: 7
Joined: Tue Oct 29, 2013 1:20 am

Re: Which microcontroller should I buy?

Post by stevech »

o_0 wrote:Hi, your website has a lot of great stuff, but before I buy a bunch of stuff I'd like to know which microcontroller I should buy. I want the main board to have a touch screen and upload data to the internet, as well as another separate board that the main board can communicate with. Also a charging pad would be ideal, or at least a battery pack. What microcontroller do you think I should use with the main board? It'll also have a few leds and pushbuttons. Also, in your opinion how should the wireless networking be achieved? Wifi, or bluetooth, or a combination? I'd probably prefer using a breadboard. Any opinions would be appreciated. Thanks for reading my post.
Raspberry Pi 2 and use Python.
Not low level board for what you say you want to do.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”