Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Which language is more commonly used for programming 8051?

Status
Not open for further replies.

Rizwanishaq

Junior Member level 3
Joined
Sep 26, 2006
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
Pakistan
Activity points
1,583
which language used most for programming the 8051
c
or
assembly
 

Re: 8051

hello!!!


Assembley, in my opinion is more used, because assembley is the native language of microprocessors, so i think is assembley, you can find more software in assembley for 8051.
 

Re: 8051

C is used in most commercial applications for faster development and portability.
 

Re: 8051

I encourage you guys to use C. I've been working with 8051 and C programming for 2 years. Visit my tutorials.
 

Re: 8051

Rizwanishaq said:
which language used most for programming the 8051
c
or
assembly

CMOS said:
C is used in most commercial applications for faster development and portability.

yes CMOS is right but you have to take care of ASM also.
beacuse as per my knowledge Embedded C is the combination of
regular (Normal) C we are using and Assembly Language(ASM).

in Embedded C you will get some library file as header file
(e.g. reg51.h, which will include all the port and register declaration with some more features).

i'll suggest you the way, which i am following..
first get command on ASM then move to the Embedded C.
it will be easy to get command on Embedded C.

All the Best..!!
 

Re: 8051

To develop faster and easier i recommend to use C.

If you want to optimize the code, just you have to edit the .asm code generated by the C compiler.

Good luck!
 

Re: 8051

aupa said:
To develop faster and easier i recommend to use C.

If you want to optimize the code, just you have to edit the .asm code generated by the C compiler.

Good luck!

yes you are also right but if the user is newbie then he/she must have to learn both languages for better knowledge and get command early..
 

8051

both languages are equally imp
 

Re: 8051

shiv_emf said:
both languages are equally imp

i agree with you...:D

but still it would be better if we learn first ASM and then move to EMbedded C..

what do you say shiv..??:?:
 

Re: 8051

Ok, but to begginers in assembly language, it is not good start with a CISC architecture.
A core with reduced set of instructions maybe a better choice.

+++
 

Re: 8051

H_D_R said:
shiv_emf said:
both languages are equally imp

i agree with you...:D

but still it would be better if we learn first ASM and then move to EMbedded C..

what do you say shiv..??:?:

I too agree with u :D

Do u see any difference between Embedded C and C ?

ASM is particulary used for specific requirement. To speed up booting time n stuff.. what do u say H_D_R? :?:
 

Re: 8051

shiv_emf said:
I too agree with u :D

Do u see any difference between Embedded C and C ?

as per my knowledge of languages,
answer of this question, i had already given in the beginning of this thread. :!:

ASM is particularly used for specific requirement. To speed up booting time n stuff.. what do u say H_D_R? :?:

here i am agree with your first statement.
and about speed up booting time and stuff I don’t have that much experience.
however, i am just saying to get command on ASM, it doesn’t mean we have to work only with ASM but it will be helpful and plus point to us for coding if we have command on both.
that was my opinion and suggestion for the question, i am not insisting to anyone to follow it..... :idea:

beacuse if reader will feel that writer's suggestion is right then he/she will obviously follow anyone's suggestion not only mine.. :wink:
and if reader will feel writer is wrong somewhere then he/she will inform by reply.. :) :)

Thank you
 

Re: 8051

there is an another option

You can mix c and assembly....

Mixing c and asm correctly gives you speed and time...
(using asm in time critical loops and where c routines took large space)

Regards
Nandhu
 

Re: 8051

nandhu015 said:
there is an another option

You can mix c and assembly....

Mixing c and asm correctly gives you speed and time...
(using asm in time critical loops and where c routines took large space)

Regards
Nandhu

nandhu,

can you please tell, how it is possible to compile such code..??
i mean which compiler will support such code..??

if i am not wrong then that is call Embedded C...
Am i right...??:?:
 

8051

C is the most widely used and most easy, time saving, easily editable language for 8051. U can use a 8051 c code for a microcontroller u wrote to another 8051 mc. But, in assembly, u can't. Comparing both C is the best.
 

Re: 8051

Hai H_D_R

most of the compilers support inline asm.

for example keil

there is a document in keil help how to use inline asm.

Regards
Nandhu
 

Re: 8051

nandhu015 said:
Hai H_D_R

most of the compilers support inline asm.

for example keil

there is a document in keil help how to use inline asm.

Regards
Nandhu

thanks..
that is true
then what is the difference between Embedded C and normal C compiler..??
 

8051

assembly language is the best for programming 8051 read the instruction set for 8051 and the data sheet for 8051 and find a free examples from websites that is will help u so much.
 

Re: 8051

H_D_R said:
nandhu015 said:
Hai H_D_R

then what is the difference between Embedded C and normal C compiler..??
normal C compilers can generate only machine code after compiling
There is nothing called embedded C compilers, they are known as cross compilers. Cross compilers are used with C or cross assemblers are used with asm programs. Embedded C and cross compilers are used for embedded appilcation because cross compilers generate code for other platform ie hardware . That means that cross compilers can produce hex format after compilation which is understood by controllers this is not produced by compilers.

Added after 5 minutes:

nandhu015 said:
Hai H_D_R

most of the compilers support inline asm.

for example keil

Regards
Nandhu

Hey nandu;
If yoou tell keil is a compiler then you dont know anything in 8051 or keil. update yourself with correct knowledge to answer to querries here. How you became a full member i really wonder.
But yes you can write both C and asm in 1 program only if you have a cross assembler and cross compiler integrated as in keil
 

Re: 8051

ckshivaram said:
Hey nandu;
If yoou tell keil is a compiler then you dont know anything in 8051 or keil. update yourself with correct knowledge to answer to querries here. How you became a full member i really wonder.
But yes you can write both C and asm in 1 program only if you have a cross assembler and cross compiler integrated as in keil

KEIL is not a compiler ? Oh really? What is it then according to you ? Interpreter or assembler ? :D
Dude ... I think you got to do your homework and then come and reply. And whats with your attitude man? Why the hell do u have so much of it?
KEIL is not a cross-compiler or cross assembler. Its is a product specific for 8051 family of devices. Cross-compiler/Cross-assembler term refers to compiler/assembler which can generate code of different family of processors.
SDCC can be called as a cross compiler which can generate machine code of 8051 / PIC / Z80 etc. I hope you learnt something today.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top