Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Tools
Old 25th April 2008, 09:36 AM   #1
Question What is a Compiler?

Hi all I need some information’s regarding “C”

To program in C what are the requirements?

Theirs something called compilers what are those? They are so many compilers. Why not use only one compiler?

In MPLAB MPASM is built in to assemble the ASM code. But are their any compilers built in to compile C code in MPLAB?
Suraj143 is offline  
Old 25th April 2008, 09:41 AM   #2
Default

Yes. You can use C compiler to compile C codes into asm, then from asm assemble to hex.
Compiler
__________________
bananasiong
bananasiong is offline  
Old 25th April 2008, 09:46 AM   #3
Default

Some C compilers even put out the HEX file directly
__________________
The best is yet to come

Good enough - its perfect !!

2 Gig of free online backup space

cq cq de LA3BNA
Kryten is offline  
Old 25th April 2008, 10:14 AM   #4
Default

Ok now what I understood is a compiler means "It is a program that translate source code to an object code (output code)"

My question is why there is so many compilers? Why not use only one compiler?
Suraj143 is offline  
Old 25th April 2008, 10:21 AM   #5
Default

Quote:
Originally Posted by Suraj143
My question is why there is so many compilers? Why not use only one compiler?
Why are there so many cars, why not just make one type?.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 25th April 2008, 10:24 AM   #6
Default

Why isn't everyone using PICkit 2? Why are there so many programming software / programmer out there? Why are there so many electronics forums?
Get what I mean?

*EDIT: Ohh.. Nigel is faster
__________________
bananasiong
bananasiong is offline  
Old 25th April 2008, 10:31 AM   #7
Default

Hi very funny

When doing in assembly language we didn't find any assemblers.MPLAB comes with MPASM & all did with it.

But when it comes to "C" many people asking what compiler using?

Thats what I mean.
Suraj143 is offline  
Old 25th April 2008, 10:35 AM   #8
Default

Quote:
Originally Posted by Suraj143
Hi very funny

When doing in assembly language we didn't find any assemblers.MPLAB comes with MPASM & all did with it.

But when it comes to "C" many people asking what compiler using?

Thats what I mean.
hi suraj,
IIRC, MPLAB also have a free 'C' compiler and its well supported with libraries etc.
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/
ericgibbs is offline  
Old 25th April 2008, 10:37 AM   #9
Default

A car of course you can drive it to a place.But the final output is the place that you go.

It means can I use any compiler to compile a C code?

Then what about other computer software engineers? They also writing computer port drivers in C can we use their compilers also?

Last edited by Suraj143; 25th April 2008 at 10:40 AM.
Suraj143 is offline  
Old 25th April 2008, 10:38 AM   #10
Default

Quote:
Originally Posted by ericgibbs
hi suraj,
IIRC, MPLAB also have a free 'C' compiler and its well supported with libraries etc.
Hi Eric I dont know what is IIRC?
Suraj143 is offline  
Old 25th April 2008, 10:48 AM   #11
Default

Quote:
Originally Posted by Suraj143
Hi Eric I dont know what is IIRC?
Its a lazy way of saying 'If I Recall Correctly'

On Google search there's a full set of these abbreviations.

example:

http://www.acronymfinder.com/af-quer...iirc&Find=Find

more:
http://www.computerhope.com/jargon/i/iiuc.htm
__________________
Eric " Good enough is Perfect "
I will NOT answer PM's requesting technical help, please use the Forum
PIC tutorials: Nigel's www.winpicprog.co.uk/ Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 25th April 2008 at 10:51 AM.
ericgibbs is offline  
Old 25th April 2008, 10:52 AM   #12
Default

I see now only I got that, thats in short form I thought some sort of software.

Thanks for that
Suraj143 is offline  
Old 25th April 2008, 10:55 AM   #13
Default

Quote:
Originally Posted by Suraj143
A car of course you can drive it to a place.But the final output is the place that you go.

It means can I use any compiler to compile a C code?

Then what about other computer software engineers? They also writing computer port drivers in C can we use their compilers also?
You need to use a compiler that produces machine code for the processor in question.

Also MPASM isn't the only assembler for PIC's (it should be - why produce a different one?), Parallax did one years ago using a strange kind of 'macro' language, and TASM is a shareware assembler that can assemble PIC code (but the source needs to be different).
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 25th April 2008, 11:04 AM   #14
Default

Quote:
Originally Posted by Nigel Goodwin
You need to use a compiler that produces machine code for the processor in question.

Also MPASM isn't the only assembler for PIC's (it should be - why produce a different one?), Parallax did one years ago using a strange kind of 'macro' language, and TASM is a shareware assembler that can assemble PIC code (but the source needs to be different).
Oh I see then the Microchip decided to include the best assembler to their MPLAB that is MPASM.

Likewise C compilers also easy easy inserting to the MPLAB ex:HitecC,CCS etc...
Suraj143 is offline  
Old 25th April 2008, 11:05 AM   #15
Default

FWIW
The compilers we to generate code for our micro controllers are know as cross compilers.

Wikipedia:
A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is run.
__________________
Please post questions to the forums. PM's are for personal communication.

BCHS/3v0's Tutorials
Junebug USB PIC programmer kit., USB Bit Whacker,
The 15 Minute Printed Circuit Board! (+drill time)
3v0 is offline  
Reply

Tags
compiler

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
Regarding the CCS Compiler 3v0 Micro Controllers 5 24th March 2007 10:22 PM
C compiler leonel Micro Controllers 10 20th December 2006 02:46 AM
Help, CCS PIC-C Compiler... Kenton Micro Controllers 17 3rd April 2006 12:48 AM
Atmel AVR free compiler and support free forum mramos1 AVR 3 24th October 2005 09:00 AM
Compiler Question demestav Micro Controllers 0 27th September 2005 10:47 AM



All times are GMT. The time now is 02:10 AM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker