looking for help selecting micro controller for project

Thread Starter

aviphysics

Joined Sep 18, 2013
5
Hi All,

I am starting a new project. I have previously done several one off PIC18 projects in ASM for custom industrial control applications. This project will be my first that is intended to be mass manufactured for consumers.

The device will include some basic calculator type functions (+ - *). The core function does not strictly require very large numbers, but I think the consumer would be disappointing if it only represented numbers up to 256. I also think the user would appreciate it if the device could be put into a 4 function calculator mode that can handle decimal numbers. Currently I am thinking that numbers will be handled in arrays of decimals.

Interface features will include...
- 25 capacitive buttons made from 5x5 array (The reason for capacitive touch is to keep cost of production low, simplify enclosure design, to make cleaning the device easier, and hopefully increase long term reliability. I am open to other button options.)
- 2 line hd44780 type display to display input and results
- The ability to connect to a computer as an HID keyboard to push output to a word pad or spreadsheet (Being able to do this without an external osc would be a bonus)
- A single bit digital line in (input will be provided from another on board device.)
- port for in circuit debugging/programming.

In terms of Microchip products, I believe these requirements will push me up to the PIC18f45K50 which is in the same price bracket as a PIC32MX2 and PIC24FJ32GB004. Of these I feel like the PIC24 is the front runner. I would also like to consider non-PIC alternatives, though I don't feel so interested in Arduino.

My primary concerns are ease of development, battery life, and cost of the final product. I would really like battery life to measured in years (assuming the device is used several hours a week) though perhaps that is too optimistic (though I have never had to change the batteries on my HP 32SII). Being programmable without extra hardware would be a bonus but not strictly necessary.

The platform itself I would like to recycle for future applications, so whatever microprocessor I pick needs to be one that will be around for a while.

Any suggestion or advice would be appreciated.
 

MrChips

Joined Oct 2, 2009
30,710
Reading through your post I would assume that you lack experience in embedded microcontroller design and application.

The limitation of numbers to 256 has nothing to do with the design.
The question you probably meant to ask is whether you should use an 8, 16, 32 or 64-bit processor. All processors, regardless of word size can perform calculations to any level of precision.

Using the Arduino platform is out of the question. Arduino is not a processor. It is a platform for experimenters. It is not suitable for commercial applications.

Before one can select a microcontroller, one has to see the entire application fully laid out in front of them. Full specifications of the end product comes first. The choice of the mcu is secondary.
 

Thread Starter

aviphysics

Joined Sep 18, 2013
5
Yes, you can do arbitrarily large computations on pretty much any microcontroller but if the chip you are using has a large enough word size for the numbers you are handling, it becomes trivial to do the calculations and they can be done faster.

Yes, Arduino is a platform not a particular architecture, but it is still possible to make derivative products based on that platform. I have one sitting on my desk that works quite nicely.

At any rate, if my experience seems limited, it is probably because I have always done everything with PIC18. My questions is if there are other microcontrollers that I should consider. The specifications I laid out were plenty for me to be able to pick out a product from the PIC line (PIC24FJ32GB004). My question is whether another microcontroller/platform would offer significantly greater ease of development (e.g. better C compiler, better cap touch, better power consumption, USB w/o external osc, easier to implement communication with LCD, easier to implement as USB HID device, require fewer supporting components, cheaper to implement, updatable w/o external programmer etc.)

You say I need more specifications laid out, but not which ones. I pretty much have the full product drawn up, I just tried to list the most general requirements. What product specifications do you need that I didn't list? I don't really want to describe my product idea in any greater detail than necessary. It seems like the basic specification I listed should be enough to at least recommend some PIC alternatives.

Edit: to be more clear, I am not asking someone to pic a microcontroller for me, just asking for some recommendations of controllers to look at.
 

MrChips

Joined Oct 2, 2009
30,710
Well from your response, seems to me that you have enough knowledge to come to your own conclusion.

Sorry that I butted in. That is as much advice I can give you.
 

Thread Starter

aviphysics

Joined Sep 18, 2013
5
Well from your response, seems to me that you have enough knowledge to come to your own conclusion.

Sorry that I butted in. That is as much advice I can give you.
I am not very good at reading people and even worse at reading them though internet posts, but it seems like you are just posting to harass me for some perceived lack of knowledge or purely trolling. So far, all you have done is criticize my posts without contributing any really helpful advice. Not exactly the nicest way to welcome a new member to a forum.
 

Brownout

Joined Jan 10, 2012
2,390
Welcome to the forum. Aside from the requirement to connect as a HID device, most any uC with sufficient I/O will do for what you have stated. Sorry, I can't help with the HID things.
 

Thread Starter

aviphysics

Joined Sep 18, 2013
5
Welcome to the forum. Aside from the requirement to connect as a HID device, most any uC with sufficient I/O will do for what you have stated. Sorry, I can't help with the HID things.
That was kind of my impression. I wasn't really sure if there were any that had substantially lower power consumption or were easier to work with than the PICs.
 

donpetru

Joined Nov 14, 2008
185
You should specify exactly what app you want to build with that MCU. So, get an answer as concrete you must come with additional information.
 

Brownout

Joined Jan 10, 2012
2,390
You need 22 i/o's for your switches and LCD display - 11 for the LCD, 10 for the switch matrix and 1 for the discreet. Of course, you can also use 4-bit writes for the LCD, knocking your i/o requirements down to 18. You can save another pin by always enabling the display, and yet another by strapping the r/w pin to be always write, if you don't anticipate needing to read from the display. Some i/o's will need to be reserved for ICD, depending on which uC you choose. The user's guide will identify those pins for you.
 

ErnieM

Joined Apr 24, 2011
8,377
- The ability to connect to a computer as an HID keyboard to push output to a word pad or spreadsheet (Being able to do this without an external osc would be a bonus)
ORLY? So your app will know when Wordpad has focus so it can type in the data?

That is seriously an extremely poor choice.

AFAIK Microchip has some very recent devices that meet the USB with their internal oscillator. What parts these are I do not know.
 

Thread Starter

aviphysics

Joined Sep 18, 2013
5
You need 22 i/o's for your switches and LCD display - 11 for the LCD, 10 for the switch matrix and 1 for the discreet. Of course, you can also use 4-bit writes for the LCD, knocking your i/o requirements down to 18. You can save another pin by always enabling the display, and yet another by strapping the r/w pin to be always write, if you don't anticipate needing to read from the display. Some i/o's will need to be reserved for ICD, depending on which uC you choose. The user's guide will identify those pins for you.
Software wise, I think pretty much any controller will be plenty fast enough. I think I will write the program mainly in C, with a little assembly here and there.

I worked out the pins I needed and couldn't get what I want to fit on the 28 pin PICs I looked at. Part of this was due to overlap in how a couple of pins are assigned. My math is basically the same as yours for total i/o pins.

I looked through the Atmel line. The only controllers with enough hardware qtouch pins were twice as expensive as the PIC24 option, (which is already 50 cents more than the PIC18 I would otherwise use.) That basically rules them out, unless someone can tell me that the Atmel software touch sensing is really good.

ErnieM said:
ORLY? So your app will know when Wordpad has focus so it can type in the data?

That is seriously an extremely poor choice.

AFAIK Microchip has some very recent devices that meet the USB with their internal oscillator. What parts these are I do not know.
The other option is to write my own driver, which doesn't make sense due to the fact that I have no experience with that, it would need longterm support, the device would only work with OS that I wrote software for, and I am not making enough of these for it to be worth the effort.

USB HID has the advantage of being compatible with virtually every OS. The cost is that the user will have to tell the device when they want it to output data. An alternative would be to compile data on the device and make it available as a USB MSD, but I would rather the data be generated in real time.

I eventually discovered that the PIC24...GX0... parts support USB off the internal oscillator, so that is looking like a good candidate. This is clearly stated in the datasheets, but it is not advertised AFAICT. Still going to keep PIC18 in mind, due to price.
 
Top