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.

How to become a good Microcontroller programmer

Status
Not open for further replies.

khatus

Member level 3
Joined
Oct 7, 2017
Messages
56
Helped
1
Reputation
2
Reaction score
0
Trophy points
6
Activity points
441
I am currently learning PIC Microcontroller. But I think there are some flaws in my learning method. I can't practice enough due to lack of good books. Someone will tell me how to become a good Microcontroller programmer. Please name some good book where there will be a lot of exercise to practice?
 

You're not going to become good at anything from just reading books, other becoming good at reading. There is no "practice" in reading, you need to actually APPLY what you've read about.

MPLAB is free. You can write programs and simulate them, and you don't have to spend a cent (or a farthing or a rupee, or whatever monetary unit you use). Microchip has plenty of tutorials.
 

Hi,

What is a "good" programmer?
The one who makes the most money with least effort?
Define it, then we can discuss about it....

Klaus
 

There is an old joke about a stranger in New York who asks a local "How do I get to Carnegie Hall?" and the reply is "Practice, man, Practice."
Start by getting something like the "Explorer" board from Microchip (especially one that can take a variety of plug-in MCU so you can start small and then grow). Then program it to 'flash a LED' - I know that sounds insulting but it can be hard to get the IDE working, the chip programmed, the CONFIG settings right, the oscillator running at the required frequency and the LED flashing at the proper rate. However that gets you over the steepest part of the learning curve.
Then think of some simple application and get that working. For example, how to use a UART or timer etc.
Then something a bit more complicated - perhaps start using interrupts.
"Rince and repeat" (as they say)
It really helps to have a clear idea of what you want to achieve at each step, and make gthe steps small enough so that you can easily see what goes wrong each time.
Susan
 

Hello!

Everything has been said but... one more thing!
There are many boards which will allow you to start. But... I would avoid Arduino.
Don't get me wrong, I'm not saying Arduino is bad, but unfortunately it hides a lot
of the hardware behind the dedicated IDE.
Pros: there are high chances that as a beginner, Arduino allows you to make more
reliable code because everything has already been developed for you, has been tested
and re-tested over the years.
Cons: you will not learn how to access registers, and if you want to be a "good" programmer,
you have to know what it's about.
So buy a PIC board and use MPLab, or a TI MSP430 board and use CCS, or a STE board
and use STE Cube IDE, etc. You name it, all manufacturers have their own free IDE.

Have fun!

Dora.
 

how to become a good Microcontroller programmer

Compilers are your best friend, particularly those with ability to perform simulation.
Experimenting will show the lacks on your theoretical-based learning.
 

I am currently learning PIC Microcontroller. But I think there are some flaws in my learning method. I can't practice enough due to lack of good books. Someone will tell me how to become a good Microcontroller programmer. Please name some good book where there will be a lot of exercise to practice?
I started with a 8 bit PIC as the data sheets are relatively simple and there are only few registers to really get to know, 16F84 is a great little learning tool without all the perhiperals but you can get a feel for timers, interrupts, GPIO (drive LEDs as outputs and switches as inputs), A/D conversion and general setup of the chip. There are loads of little boards available to learn with too that don't break the bank and theres nothing more satisfying that making a LED dance around.

Once you've cracked this device try picking one of larger device such as the 16f877 which has UARTs etc also and is also very popular which you can then start using your knowledge to communicate with a computer.

You then have the tools to go to more complex devices.
 

I am currently learning PIC Microcontroller. But I think there are some flaws in my learning method. I can't practice enough due to lack of good books. Someone will tell me how to become a good Microcontroller programmer. Please name some good book where there will be a lot of exercise to practice?
I understand your difficulties. It is true that microcontrollers have become quite complex and going through the manual is very difficult. That there are no good books because the subject is changing so rapidly. But before I can make some concrete suggestions, I need to figure out how much you already know.

If you are familiar with a modern programming language (say C or C++) then you already have some idea. But learning a programming language takes time and you can learn to print out "Hello World!" in a day or week but to master the mess of pointers may take months or years.

If you also understand what happens during compiling, linking and loading that you have already got somewhere. You need not be expert, but you must have a good idea. Then you will know the meaning of the different options and how to use them. Say one of the open source compilers, SDCC. The number of options is bewildering. But you need to know and understand what option does what.

For practice, get a PIC practice board- the one sold by microchip is excellent (I have not used it). Focus on setup first. You must know how to setup and what do they do.

And come back again and again for specific problems. Once you can read the manuals (every PIC has a monster sized manual) you will get some confidence. You will also see that other related ideas slowly getting clearer; that is called progress.
 
One more thing to keep in mind - Programing is not what you read in the book; Programing it is already in your head. The book teach you how to put it on the paper.
I was engineer in a plant and i sent maintenance peoples to a 4 days training at Omron to learn the basic of PLC (programmable logic controller) programing.
One month after i assigned to one of them the task to program an automatic exit door system for warehouse. He complained to me that they did not learned to program, they were trained how to use the interface to write or alter code. I explained to him that the programing it is his head, and Omron did teach them how to put it on the paper/computer/IDE.
You must have the program on your head before starting.
Sorry, but this is the game.
 

Study how to do efficient and proper structured programs, and avoid bad programming habits (such as generating spaghetti code).
Just learning the code is not sufficient to be a good programmer.

Learn how to annotate your programs copiously, so that when someone else looks at the program, they can readily understand what it does.
A program that is difficult to understand is not good coding.
 

    igeorge

    Points: 2
    Helpful Answer Positive Rating
@ [B]crutschow[/B]
You are perfectly right.
I used to make on a paper the whole program as a flowchart, then convert it in code.
In what concern about annotate the program and put explanation note almost every where , you could not be more than 1000 right.
In the beginning i said is my code so i know what i did here.
But 6 month later i had hard time to follow the logic.
Some time even a variable name gave harsh time.
I learned the hard way.
Put comment a variable declaration, routine and subroutines, function and in the code itself, a if function or while, or any important line of code.
Now, even after a year or two it is a breeze to understand the code, change, debug, or modify.
 

To perhaps clarify, avoiding "spaghetti code" means using few (or no) GOTO statements.
Structured programs use IF-THEN-ELSE, FOR-NEXT, or WHILE statements, with subroutines to clarify the functional flow of the program.
 

    igeorge

    Points: 2
    Helpful Answer Positive Rating
I am currently learning PIC Microcontroller. But I think there are some flaws in my learning method. I can't practice enough due to lack of good books. Someone will tell me how to become a good Microcontroller programmer. Please name some good book where there will be a lot of exercise to practice?
Before diving into uC check if any jobs available in your area/country. Most of small uC jobs has moved to Asia, in US job market requirement is large FPGA/SoCs (mostly military, citizenship and clearance required). All uC skills are hard linked to the hardware silicon, so your knowledge of PICs has no value with ST or TI lines. Honestly, if you are thinking where to invest you time most efficiently, study a high-level language (Java, Go,...) and enjoy double salary, worldwide job opportunities and early retirement option.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top