Selecting microcontroller

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

Reply to
eziggurat
Loading thread data ...

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
 Click to see the full signature
Reply to
Tim Wescott

In article , Tim Wescott writes

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 ;-)

Reply to
Bob

formatting link
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?

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

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

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

Reply to
Jim Granville

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
 Click to see the full signature
Reply to
Tim Wescott

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

Donald

Reply to
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:

Reply to
eziggurat

Thank you for your wonderful your advice:)

D> > Hi,

Reply to
eziggurat

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.

D> > Hi,

Reply to
scilent-project

scilent-project scrobe on the papyrus:

You are more likely to find a C compiler rather than c++ for your chosen microcontroller.

No they don't. A compiled C program will run on a microcontroller without needing an O/S. However if you insist on using one, then look at Salvo or uCosII.

--
John B
Reply to
John B

Where did you get such an idea? An OS is just a convenience, and one for which you have to pay in some form. These include money, overhead, space, etc.

--
 "A man who is right every time is not likely to do very much."
                           -- Francis Crick, co-discover of DNA
 Click to see the full signature
Reply to
CBFalconer

Scilent-project,

A compiler for embedded usually includes a file called crt0.s (c runtime) which handles initialization and calls the main() function. It's true you will have no OS services but frequently this is not required. Things like printf can work with an attached c library which hacks a block allocator function (see the last chapter of K&R for an idea), you can also have libraries which provide file support, etc etc.

-SGS

scilent-project wrote:

Reply to
Kadir Solid Gold Suleyman

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.