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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…