EmbeddedRelated.com
Forums

Selecting microcontroller

Started by Unknown June 8, 2006
Hi,

I want to port an exisitng C++ code from windows into a microcontroller
to carry out real-time processing. I guess the problems are the
processing speed and size of code. I guess I can resolve the code size
by using external memory to store the code but processing speed might
be an issue. What other factors would I have to consider when selecting
a microcontroller for my project? I would have other device connected
to the microcontroller; an ADC, network chip. Should I consider a CPLD
for the real-time processing and microcontroller as a controller.

The cost is a main factor for my project. I would like to get the cost
down to $100 dollars. I am also considering the Maxim Tini chip as it
has a built-in ethernet. Any guidance will be very useful.

Cheers
Paul

eziggurat@gmail.com wrote:

> Hi, > > I want to port an exisitng C++ code from windows into a microcontroller > to carry out real-time processing. I guess the problems are the > processing speed and size of code. I guess I can resolve the code size > by using external memory to store the code but processing speed might > be an issue. What other factors would I have to consider when selecting > a microcontroller for my project? I would have other device connected > to the microcontroller; an ADC, network chip. Should I consider a CPLD > for the real-time processing and microcontroller as a controller. > > The cost is a main factor for my project. I would like to get the cost > down to $100 dollars. I am also considering the Maxim Tini chip as it > has a built-in ethernet. Any guidance will be very useful. > > Cheers > Paul >
Since you haven't said what you're doing, how fast 'real time' is in this case, how big your code actually is or what part of Windows it depends on to work your questions are a bit hard to answer. I _can_ say that unless your real time task is very simple a CPLD probably won't cut it -- but if it does fit on a CPLD that may just be the right way to go. Generally when I select a processor I look at how much code must execute in how much time, then I choose a general processor type (8-bit, 16-bit, 32-bit, perhaps DSP depending on the code). Unfortunately this requires some experience to get right the first time, but overkill is rarely a bad thing for prototypes. Once I have a general idea of the core I need I look at the peripherals and memory I need. Then I go out and check all the processor manufacturers to see how close I can get to what I need with what's available, looking to reduce or eliminate the complement of external chips in the system. This study then induces a long period of requirements juggling, out of which comes a processor decision. At this point (if I haven't already done so) I try to get my hands on an eval board and benchmark some code to make sure I've estimated speeds correctly. Then I go build stuff. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
In article <Yuidne1KZ9QH3RXZnZ2dneKdnZydnZ2d@web-ster.com>, Tim Wescott
<tim@seemywebsite.com> writes
>Generally when I select a processor I look at how much code must execute >in how much time, then I choose a general processor type (8-bit, 16-bit, >32-bit, perhaps DSP depending on the code). Unfortunately this requires >some experience to get right the first time, but overkill is rarely a >bad thing for prototypes. > >Once I have a general idea of the core I need I look at the peripherals >and memory I need. Then I go out and check all the processor >manufacturers to see how close I can get to what I need with what's >available, looking to reduce or eliminate the complement of external >chips in the system. > >This study then induces a long period of requirements juggling, out of >which comes a processor decision. At this point (if I haven't already >done so) I try to get my hands on an eval board and benchmark some code >to make sure I've estimated speeds correctly. > >Then I go build stuff.
Then you find two months later that the manufacturer has discontinued the part, or bottled it and just shoved the MOQ up to 10000 and the lead-time to 36 weeks ;-)
eziggurat@gmail.com wrote:
> Hi, > > I want to port an exisitng C++ code from windows into a > microcontroller to carry out real-time processing. I guess the > problems are the processing speed and size of code. I guess I can > resolve the code size by using external memory to store the code but > processing speed might be an issue. What other factors would I have > to consider when selecting a microcontroller for my project? I would > have other device connected to the microcontroller; an ADC, network > chip. Should I consider a CPLD for the real-time processing and > microcontroller as a controller.
www.iotech.dk will provide you an ARM9 + Spartan 3 FPGA for about $100 in a nice module format. If your code is using the Windows API, you maybe want to look into using Windows CE?
> > The cost is a main factor for my project. I would like to get the cost > down to $100 dollars. I am also considering the Maxim Tini chip as it > has a built-in ethernet. Any guidance will be very useful. > > Cheers > Paul
-- Best Regards, Ulf Samuelsson ulf@a-t-m-e-l.com This message is intended to be my own personal view and it may or may not be shared by my employer Atmel Nordic AB
eziggurat@gmail.com wrote:

> Hi, > > I want to port an exisitng C++ code from windows into a microcontroller > to carry out real-time processing. I guess the problems are the > processing speed and size of code. I guess I can resolve the code size > by using external memory to store the code but processing speed might > be an issue. What other factors would I have to consider when selecting > a microcontroller for my project? I would have other device connected > to the microcontroller; an ADC, network chip. Should I consider a CPLD > for the real-time processing and microcontroller as a controller.
Use a CPLD when a) Your uC of choice lacks the peripheral details or b) You need distributed IO expansion, or fast-protection reactions etc
> The cost is a main factor for my project. I would like to get the cost > down to $100 dollars. I am also considering the Maxim Tini chip as it > has a built-in ethernet. Any guidance will be very useful.
You need to check your Code/Data footprint, but the Tini is a valid choice, if your application fits. Others in the sub $100 Ethernet-Module business, are RabbitSemiconductor, and Zilog. -jg
Bob wrote:

> In article <Yuidne1KZ9QH3RXZnZ2dneKdnZydnZ2d@web-ster.com>, Tim Wescott > <tim@seemywebsite.com> writes > >>Generally when I select a processor I look at how much code must execute >>in how much time, then I choose a general processor type (8-bit, 16-bit, >>32-bit, perhaps DSP depending on the code). Unfortunately this requires >>some experience to get right the first time, but overkill is rarely a >>bad thing for prototypes. >> >>Once I have a general idea of the core I need I look at the peripherals >>and memory I need. Then I go out and check all the processor >>manufacturers to see how close I can get to what I need with what's >>available, looking to reduce or eliminate the complement of external >>chips in the system. >> >>This study then induces a long period of requirements juggling, out of >>which comes a processor decision. At this point (if I haven't already >>done so) I try to get my hands on an eval board and benchmark some code >>to make sure I've estimated speeds correctly. >> >>Then I go build stuff. > > > Then you find two months later that the manufacturer has discontinued > the part, or bottled it and just shoved the MOQ up to 10000 and the > lead-time to 36 weeks ;-) >
Well, yes. But that would happen even if I screwed up the selection -- I might as well messed up just once. I forgot to mention that very often the best choice is something that you've used before, like, have tools for, and trust the supplier of. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
eziggurat@gmail.com wrote:
> Hi, > > I want to port an exisitng C++ code from windows into a microcontroller
Please re-write all you c++ code into turbo C. Run it on a PC. ( 8088 @ 4.77Mhz) If you can still run your wonderful code on this platform, will you be ready to understand microcontrollers. Good Luck
> Cheers > Paul >
Donald
I have Virtex2 Pro eval board which I can possibly convert the C++ code
(written by a thrid-party) into C and find out how much resources it
uses and determine the type of microcontroller required for my
application. If the dsp algorithm is too slow, I can translate the
algorithm into VHDL/verilog and use the PowerPC or Microblaze to act as
the controller. Hopefully I can use a Spartan chip to carry out my
application if the DSP require an FPGA.

I like to thanks everyone for replying.

Cheers
Paul


Tim Wescott wrote:
> eziggurat@gmail.com wrote: > > > Hi, > > > > I want to port an exisitng C++ code from windows into a microcontroller > > to carry out real-time processing. I guess the problems are the > > processing speed and size of code. I guess I can resolve the code size > > by using external memory to store the code but processing speed might > > be an issue. What other factors would I have to consider when selecting > > a microcontroller for my project? I would have other device connected > > to the microcontroller; an ADC, network chip. Should I consider a CPLD > > for the real-time processing and microcontroller as a controller. > > > > The cost is a main factor for my project. I would like to get the cost > > down to $100 dollars. I am also considering the Maxim Tini chip as it > > has a built-in ethernet. Any guidance will be very useful. > > > > Cheers > > Paul > > > Since you haven't said what you're doing, how fast 'real time' is in > this case, how big your code actually is or what part of Windows it > depends on to work your questions are a bit hard to answer. I _can_ say > that unless your real time task is very simple a CPLD probably won't cut > it -- but if it does fit on a CPLD that may just be the right way to go. > > Generally when I select a processor I look at how much code must execute > in how much time, then I choose a general processor type (8-bit, 16-bit, > 32-bit, perhaps DSP depending on the code). Unfortunately this requires > some experience to get right the first time, but overkill is rarely a > bad thing for prototypes. > > Once I have a general idea of the core I need I look at the peripherals > and memory I need. Then I go out and check all the processor > manufacturers to see how close I can get to what I need with what's > available, looking to reduce or eliminate the complement of external > chips in the system. > > This study then induces a long period of requirements juggling, out of > which comes a processor decision. At this point (if I haven't already > done so) I try to get my hands on an eval board and benchmark some code > to make sure I've estimated speeds correctly. > > Then I go build stuff. > > -- > > Tim Wescott > Wescott Design Services > http://www.wescottdesign.com > > Posting from Google? See http://cfaj.freeshell.org/google/ > > "Applied Control Theory for Embedded Systems" came out in April. > See details at http://www.wescottdesign.com/actfes/actfes.html
Thank you for your wonderful your advice:)


Donald wrote:
> eziggurat@gmail.com wrote: > > Hi, > > > > I want to port an exisitng C++ code from windows into a microcontroller > > Please re-write all you c++ code into turbo C. > > Run it on a PC. ( 8088 @ 4.77Mhz) > > If you can still run your wonderful code on this platform, will you be > ready to understand microcontrollers. > > Good Luck > > > Cheers > > Paul > > > > Donald
I want to port an exisitng C++ code from windows into a microcontroller


hi

I 'm a newbie to the topic and frankly I'd like to know how C++ or even
C can run on a microconroller itself since those high level languages
needs a O/S.

Cheers.

Donald wrote:
> eziggurat@gmail.com wrote: > > Hi, > > > > I want to port an exisitng C++ code from windows into a microcontroller > > Please re-write all you c++ code into turbo C. > > Run it on a PC. ( 8088 @ 4.77Mhz) > > If you can still run your wonderful code on this platform, will you be > ready to understand microcontrollers. > > Good Luck > > > Cheers > > Paul > > > > Donald