Is assembly language a universal uC programming tool ?

Thread Starter

LETITROLL

Joined Oct 9, 2013
218
Hello everyone here .

While reading on multiple micro-controllers datasheets but mainly in PICs family , i see that the majority of their manuals use assembly as a main programming language to explain the usage.

Can this language be used to program all kinds of micro-controllers ?
Is it some sort of micro-controller standard industrial programming language aimed for a strong performance ?
Is it more reliable than other languages like C and Pascal for instance ??

Am asking this because i would like to know witch road to follow in this specific field .
 

MrChips

Joined Oct 2, 2009
30,720
There is no standard.

Every microcontroller (mcu) manufacturer creates their own mcu architecture and assembly (asm) language.

Knowledge of one mcu asm language transfers well to another mcu. If your goal is to get a project up and running you don't need to know asm. C is the preferred programming language.

If you want to be an expert at embedded systems design, learn asm first.
 

Thread Starter

LETITROLL

Joined Oct 9, 2013
218
There is no standard.

Every microcontroller (mcu) manufacturer creates their own mcu architecture and assembly (asm) language.

Knowledge of one mcu asm language transfers well to another mcu. If your goal is to get a project up and running you don't need to know asm. C is the preferred programming language.

If you want to be an expert at embedded systems design, learn asm first.
Am starting to think about going on the ASM road , its just seems more professional .

Is this a god book btw ?
 

MrChips

Joined Oct 2, 2009
30,720
It is well known that I do not like Microchip PIC ASM.

My choices would be Atmel AVR, Freescale HC11 or HC12 or 6805 derivatives, or TI MSP430.
 

MaxHeadRoom

Joined Jul 18, 2013
28,622
If you decide to go the Assy/Picmicro route there is a really good tutorial by Nigel Goodwin http://www.winpicprog.co.uk/pic_tutorial.htm
Also http://www.gooligum.com.au/
There is a lot of projects out there for the 16f series, but if pursuing assy, I would recommend gravitating over to the 18F series, the instruction set is improved.
There is a really good book by Han-Way Huang (Minn Univ) covering both Assy and some C for the 18F, it is out there in PDF or I got a brand new copy with an unsealed CD from AbeBooks clearing house for a few $'s.
If you need the PDF book, PM an email.
Max.
 

Art

Joined Sep 10, 2007
806
A higher level language like C or BASIC can help you learn assembler so long as you can find
a tool to disassemble the file produced by a compiler.
That way you can make small changes in the higher level languages and see what it does with assembler.
From there you can start to see what it doesn't get right and optimise from there.

Most if not all compilers should allow the free use of assembler inline too,
so you don't have to discard an entire high level language program just because you'd
prefer to do a little of it in assembler.
 

ErnieM

Joined Apr 24, 2011
8,377
Am starting to think about going on the ASM road , its just seems more professional .
Assembly is used by a very small minority of programmers in very special areas.

I know assembly, I use it in only a very small minority of programs for very special reasons.
Is this a god book btw ?
God doesn't write books. I've never read it. If you post a link (or even write the title) I'll take a peek.
 

Papabravo

Joined Feb 24, 2006
21,160
Am starting to think about going on the ASM road , its just seems more professional .
...
I think you will get a significant argument on this score. You can write good code in any language, but assembly language makes it incredibly easy to write truly awful code. In a professional environment you have to think about reliability, documentation, and maintenance. These three things and may others are very difficult to manage with code written in assembly language.
 

Thread Starter

LETITROLL

Joined Oct 9, 2013
218
If you decide to go the Assy/Picmicro route there is a really good tutorial by Nigel Goodwin http://www.winpicprog.co.uk/pic_tutorial.htm
Also http://www.gooligum.com.au/
There is a lot of projects out there for the 16f series, but if pursuing assy, I would recommend gravitating over to the 18F series, the instruction set is improved.
There is a really good book by Han-Way Huang (Minn Univ) covering both Assy and some C for the 18F, it is out there in PDF or I got a brand new copy with an unsealed CD from AbeBooks clearing house for a few $'s.
If you need the PDF book, PM an email.
Max.
Thanks max for the book suggestion , i sent you an email BTW .

As for witch microcontroller i ll be using its not just PICs but also other brands like Intel or Samsung,winbond,tochiba , witch don't use C language i guess ??
 
Last edited:

t06afre

Joined May 11, 2009
5,934
I think you will get a significant argument on this score. You can write good code in any language, but assembly language makes it incredibly easy to write truly awful code. In a professional environment you have to think about reliability, documentation, and maintenance. These three things and may others are very difficult to manage with code written in assembly language.
Not to mention time to market. It does not make sense to have person coding weeks in asembler then coding in C will bring a solution in one week.
 

Fibonacci

Joined May 23, 2014
25
Hello everyone here .

While reading on multiple micro-controllers datasheets but mainly in PICs family , i see that the majority of their manuals use assembly as a main programming language to explain the usage.

Can this language be used to program all kinds of micro-controllers ?
Is it some sort of micro-controller standard industrial programming language aimed for a strong performance ?
Is it more reliable than other languages like C and Pascal for instance ??

Am asking this because i would like to know witch road to follow in this specific field .
I agree with other members. I taught for 30 years 6809 first and then 8051 family using assembly language. However things had changed from 10 years ago, toward use of high level languages for microcontroller programming, like C. It depends the application, all microcontrollers are good, but you must learn using friendly platforms like Arduino IDE, programming in a language based in Wiring, (C, but easiest). If you need more processing tools, the giant INTEL introduced Galileo board in this year, a powerful IDE, hardware and software full compatible with Arduino. Last semester, here at ITESM campus Juarez, in México, I taught 8051 Microcontroller assembly language and C ,as in the last 15 years, but when my students implemented final proyects, everybody used Arduino IDE. Proyects like robotic arm, 8X8X8 LED cube, vumeter, intelligent alarm, pulsemeter, etc. Something is happening.
 

MaxHeadRoom

Joined Jul 18, 2013
28,622
If you go to the Microchip forum site et-al, there are still many programmers that program in assembly, many like me who were introduced to it with the Intel 8085 etc.
The subject has been done to death, and of course you are always going to hear negativity from those that are more comfortable in C etc.
It simply comes down to personal preference.
Max.
 

Thread Starter

LETITROLL

Joined Oct 9, 2013
218
If you go to the Microchip forum site et-al, there are still many programmers that program in assembly, many like me who were introduced to it with the Intel 8085 etc.
The subject has been done to death, and of course you are always going to hear negativity from those that are more comfortable in C etc.
It simply comes down to personal preference.
Max.
Actually am leaning more towards the ASM mainly because it should give a deep look inside the MCU composition , and then makes it more controllable in every part of the architecture .

I don't know if this is the right sentence , but programming in ASM is like building a car without robots involved .:)
 

t06afre

Joined May 11, 2009
5,934
I would say, if this is just for learning or hobbyist work. It will not matter much what you use. Just use the approach you like best, and have fun
 

ScottWang

Joined Aug 23, 2012
7,397
Which language is better for the uC?
I think it depends on what you want to be, a professional programmer or a hobbyist or just a part time player.

The asm language can be reach to the very deep for every kinds of hardware, and you can get the speed more fast, and just using less space of the eeprom memory, it also easy to get a wrong code, but it can be reduce when you got more experience.

As the 8051 also has the BASIC version, that is more easier to study, but it will also spend more space of eeprom memory and lower speed.

You can also using the C as the main program and call the asm as a C function, when you writing the asm subroutine as a C function then you writing the asm will be similar as C.
 

Thread Starter

LETITROLL

Joined Oct 9, 2013
218
Which language is better for the uC?
I think it depends on what you want to be, a professional programmer or a hobbyist or just a part time player.

The asm language can be reach to the very deep for every kinds of hardware, and you can get the speed more fast, and just using less space of the eeprom memory, it also easy to get a wrong code, but it can be reduce when you got more experience.

As the 8051 also has the BASIC version, that is more easier to study, but it will also spend more space of eeprom memory and lower speed.

You can also using the C as the main program and call the asm as a C function, when you writing the asm subroutine as a C function then you writing the asm will be similar as C.
Indeed am hoping to be a professional embedded systems programmer and also designer .
 
Top