English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

4 answers

You need to clarify what you mean by "program" a microprocessor.
You can:
A) Run a program on a microprocessor. Then yes, you can write programs that run on a computer in C/C++.
B) Write code that modifies how a microprocessor functions when running other code. This is called microcode. Usually this is extremely complicated and uses a different code format so you can't do it with C/C++. Might work for Transmeta chips though, although still really complicated.
C) You could simulate a microprocessor by writing an emulator, which then runs on a real computer. This can be done in C/C++.
D) If you want to actually create a microprocessor from scratch, you need something like Verilog, which is vaguely like C but for designing digital circuits (down to the transistor level). You can experiment on a FPGA (a cheap, reprogrammable CPU that's kind of slow), or using some kind of digital logic simulator.

2007-01-09 19:00:36 · answer #1 · answered by ey 2 · 3 0

Yes, that is the basis of computer programming languages. Think of it this way, any programming language has a command set that consists of math functions, file handling, creating graphics, the list go's on. What the microprocessor is doing is following the instructions that the program is tell it to do. If you have a project that requires some special manipulation of the processors built in features, and that is pretty unlikely that C++ can't do it, the language that is normally used is called assembly. It is very cumbersome and strictly structured. It actually takes more lines of code than a C++ program because there are no built in library functions that C++ has. The difference though is assembly is compiled as binary. Did that help?

2007-01-09 19:21:53 · answer #2 · answered by THE ONE 6 · 1 0

C, C++, and Java etc are called as Higher level languages - and they are maily to help programmers in specifying the task to be done in an unambiguous manner. Microprocessor as such does not know anything about C/C++ etc. Microprocessor can only understand binary machine instructions. A program written in any programming language has to be "compiled" into machine code for that to be executed by the Microprocessor. Assembly Language is the nearest to the machine instructions, but technically that too can't be understood by the Microprocessor as is (this too needs compilation into machine code). Perhaps what you are looking for is Assembly Language.

2007-01-10 06:19:04 · answer #3 · answered by jay 2 · 0 0

Yes you can program a Micro processor (ie if you are using an IC) using C or C++.

After writing the program code in C/C++, cross compile the code to a mico processor code and then burn the chip.

cross compilers are available in market. Or you can get it cross compiled outside.

Hope that verifies

Thank You

2007-01-09 19:11:48 · answer #4 · answered by Anonymous · 0 0

We can code programs for microcontrollers using C or Java...C++ is not advised due to its overheads...C can be compiled into binary and Java due to its bytecode.

We use special hardware programmers to burn(transfer)this program into the memory of the microcontroller.

2007-01-09 19:56:55 · answer #5 · answered by Naveen Kumar M 2 · 2 0

.

Assembly language would be the best to program Micro processors.

**********
Vasu M
**********

2007-01-10 17:52:25 · answer #6 · answered by V@su Maniram 3 · 0 0

fedest.com, questions and answers