Need Help Picking the Right Microcontroller

Hey All,

I am working on a project that I hope to bring to mass scale production so I need to get off my arduino due and focus more on circuit design and programming the right processor for large scale production. I have some experience working with microcontrollers but for the life of me I can't seem to pick one as their is so many types.


-Ideally 64 pin microcontroller
-I only need 40ish I/O ports
-2 I2c ports.
-1 Usart Port
-8 PWM ports
-Low cost
-Program wont be too complicated as it will be just be updating motors and leds based on inputs and it will be sending outputs as well. In the program I will be having the microcontroller act as a slave but be the master for other I2c devices on a seperate port. So I guess I should start with a higher memory and once the code is done scale down to the right microcontroller.

Issues: Since I am going to be designing the system from scratch there will be a lot of problems I run into so I would like to get a microcontroller that has alot of videos and guides on how to get it running. I want to steer away from a brand new system that has limited help on it. I have a pickit 3 debugger already so maybe my direction will be steered towards PIC but if another microcontroller is better and doesn't cost alot to buy the tool to program it, I wouldn't be against the idea.

What Microcontroller would you guys recommend?


Use one of these as a daughter card.

Thanks! Looks like the ATmega2561 only has one I2C port though I need 2

You can have multiple I2C devices on a port.
Please explain why you need two.


The microcontroller will be acting as a slave to another microcontroller but acting as a master for several I2c devices. This is accomplished by having two separate I2C ports.

The microcontroller will be acting as a slave to another microcontroller but acting as a master for several I2c devices. This is accomplished by having two separate I2C ports.

This is called multi master mode of second type (BTW the DUE has 2 I2C).

I don't know of anything in the AVR product line that would give you two I2C interfaces (I think the 328pb may have two, but it doesn't have enough pins for you - and you could get that on the ATTiny1634 by using the USI for one of the I2C interfaces, but that REALLY doesn't have enough pins for you).

I know the STM32 line has a lot of microcontrollers that have multiple I2C interfaces... though the arduino STM32 core is still a work in progress as I understand it. I think that feature in general is more common on more advanced (ie, 32-bit) micros.

Okay, I looks I might have to go to the PIC line as I know a lot of them have plenty I2C ports

do you require 8 PWM in addition to 40 digital IO?
for Microchip enter your requirements in
I would probably go for a PIC24FJ128GB110 mainly because it meets the requirements, I have used it in the past and have a number PCB layouts to start with

8PWM is in addition to the 40 I/O. I think I'm going with the 80 pin version of the one you suggested horace. I was reading the datasheet, but its a little confusing. To debug and program, does it use the pickit 3 or 2?

does the 80 pin part give you the 40 digital IO in addition to all the other functionality?
Unless I am dealing with tens of thousands of systems I tend to always leave some spare capacity- I find the end user usally adds requirements to the initial project specification
Most of the time I use a Pickit 3 (the Pickit 2 does not support some modern devices) but also have ICD3 and RealIce.

I believe so. It offers 68 input output pins of which I only need 48 if you include PWM so I should have plenty of wiggle room for possible future additions. Unless I am reading the datasheet entirely wrong and not all of those Input output pins cant be configured for standard Digital I/O.

I suggest you try mapping pins to devices - be careful that remappable pins marked marked RPIxx are input only so don’t allocate them to output functions such as UART Tx and PWM (which I have seen happen several times and then requires PCBs to be cut and hacked)

if you are building this for someone else try make sure that they won’t come back and ask for additional functionality, e.g. USB so it can be configured from a PC (which most projects I work on require)