Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MicroControllers!

Status
Not open for further replies.

Nanya

New Member
Hi guys,

Do different chips e.g. Atmel and PIC have to be programmmed in different ways even when you are using the same prog.language? for example, if you ahve a C code written for a particular operation, can it be used to program both Atmel chips and PICs?

Nanya
 
Generally speaking, the answer is no. For one thing, when programming a microcontroller, you have at least a certain amount of hardware-specific functions in your code, and since Atmels and PICs are different hardware, those parts wouldn't be compatible. You might be able to cross-compile certain general-purpose (non-hardware-specific) functions/sections of code, but trying to cross-compile an entire program would not work.

For that matter, even different compilers written for the SAME chip aren't entirely compatible - there are a whole bunch of C compilers for the PIC, and to transfer code between them you almost always have to do at least a little (sometimes a lot) of modification.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top