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.

beginner in uC - C or Assemly?

Status
Not open for further replies.

tzviel

Junior Member level 2
Joined
Apr 6, 2005
Messages
23
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,543
I am just beginning to work with uC.

I want to learn slowly starting with simple programs,so I need a simple uC to start with - is the 8051 is good to start with?

Another question: I know some C but almost nothing in Assembly -can I program all the uC in C or for some I have to use Assembly?

Tzviel
 

As you are saying that you are the beginer .You should start with assembly programming .This will give you very good command over microcontrollers.
Then go for C cross compiler .

But in usual practice proffessionals use assembly and C both combined

Best ok luck
 

I know C so I think it will be easyer for me to start with that.

can I combine C and ASM. in the same program?

I will prbably use the 8051 -do you have schematics for the programmer?
which software to use for writing the program,compiling it and burn?

Thanks for your help
 

Try to use 8051 derivatives which can be programmed directly from PCs serial port.
Here is a link to Microcontroller Tool Kit. You can download it for free and there is a schematic on how to connect microcontroller to PC and a list of microcontrollers which can be programmed this way.
**broken link removed**

As far as C is concerned, you can always insert an assembly code to C:

#asm

yourcodehere

#endasm

so yo can start in C, but knowladge of assembly will be very usefull.

Regards,
IanP
 

Yes 8051 is a very widely fabricated controller and is almost easyliy avilable also you can get lots of development tools on this controller i.e Board Schematic , and cross compilers

About Programing :
well my advice is that better start with C as a programing rather then Assembly which is almost not
required, Once you get used to writing in C later on you can learn to write small code in assembly also

if you try assembly you will get lost in the Sea on Nemonics and will soon find the entire project unintresting and quit

Lots of beginer book on 8051/Pic avilable and Ke*l compiler avilabe go ahead and wellcome to the World of Developers

I hope I am making it clear

dEVEN
 

Today 32-bit ARM microcontrollers are approaching the cost of 8-bits. So I highly recommend to start with 32-bit. You can look to Philips, Atmel now Texas Instruments and Freescale too started to supply 32-bit ARM.
As for programming language the best is to use C including small assembler code for the most time critical parts, like interruption handlers.

Varuzhan
 

thank you for your answeres.

It is getting clear,and I think I should start working and get some experience.

I am going to build the programmer circuit, but I still don't know which software I can use to burn the chip.

regards

tzviel
 

hello
you can use c and assembly for microcontrollers
c is more easy and fast but assembly is more complete, its better to start with assembly if you want to understans that what happend in micro registers and hardwars.
good luck
 

C maybe fit to understand for beginner. and the KEIL IDE can help you debug and develop.
 

i recommend you to begin with assembly,becuase you deal directly with hardware choose a simple micro then begin with it, understand the hardware then upgrade to a micro with extra hardware modules.
when you started to do more bigger code then upgrade to basic or C, you will see the difference and how the assembly worked with you good.

if you need any help with pic i'll be there... :wink:
 

hello
if you want to understand uc you must start with assembly , in assembly you can understand any thing about hardware.
assembly is more difficult for making project but its more complete and you can write your program in assembly with more small size of hex program.
good luck
 

i agree with navid t...though assembly seems dull and colorless, but if you are already through courses like computer architecure or micro processors, you wont take more than a day or so probably to start cruising in assembly. to tell u my own experience, i took hardly 30 mins to figure out how to deal in assembly when i was writing the code for my first ever project on a microcontroller (8051). then once u have got grip over assembly, u can easily shift to C anytime without much trouble. the advantage u will have in this approach will be that u will be able to appreciate why code written in assembly could be faster and smaller in size than that in C and can use this understanding in optimizing ur programs written in C by inserting assembly code and routine where appropriate.

however if u dont know nething about the working of processor or about computer architecture, learning assembly will be a real drudgery and time consuming exercise for you. in that case i would recommend u to start directly in C.
 

It's fine taking 8051 as a starting point. I think by knowing assembly, you are not only can save the ultimate compiled code, but sometimes you need to write assembly in order to run certain procedure in shortest time more efficiently.
 

I have russian book in pdf "MC it is easy". It describe how program real hard in Assembly.
For beinner, but only in russian
 

In my opinion I prefere for you to start with PIC16F84A ... it is simple and have lot of Microcontroller Basics you need in this stage .. and try to start with assembly language not any other one ...
 

hai

my opinion is to start with pic microcontrollers is the best for beginners
first you start with assembly then go for c
starting with 8051 is not suitable is my opinion
 

Hello
My opinion-try to start with PIC (e.g. 16f676 -very versatile, cheap & ADConverter) and assembler.Easy to try a new program, easy to simulate before in MPLab or PICSimulator.
Best wishes
 

Hi

Long time ago I have started programming 8051 with assembly language but there was no C language compliler avaliable only PLM

Today I do all my programming in C language and jump to assembly from time to time

My advice to you is to learn assembly language because it's importent to learn the controller basic.
AND write all your program in C language
All the best

Bobi
 

I think you should start with assembly language and proceed to C once you've mastered assembly language. Usually programmers and engineers alike would avoid mixing both types of codes in the program because it might look messy and sometimes confusing. I started with 8051 a few years ago, but I think PICmicro provides a wider range of selection to start off with especially those in the 16 series. Almost every hardware fucntionality is included in the chip and the data sheet itself by PICmicro is already enough for you to write basic and intermediate programs. All the best.
 

assembly first .. cuz it's closer to the ISA ..
then C ..
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top