What is programmer in micro controller?

Thread Starter

Rizu

Joined Nov 1, 2012
11
Hi, I know that my question is going to be a very stupid question but to me its very important. The question is what is programmer or burner in a micro controller. All I know about micro controller is that it is a single chip computer that can control circuitry. Then what is a programmer or burner? A guy told me that burner is a cable type thing that is used to connect micro controller to a pc so that programs from pc can be loaded to a micro controller. Is that correct? My knowledge about this system is actually zero but I want to work on this thing.
With regards
Rizu
 

MrChips

Joined Oct 2, 2009
30,806
The answer given is close enough.

A microcontroller (mcu) requires non-volatile memory in order to save the program required to run the application. The memory is non-volatile so that when power is removed and turned back on, the program is not lost and is still in the memory.

The code memory can either be sitting inside the mcu or it can be on an external memory chip. A separate program (called the boot loader or binary loader) is required to somehow go through the process of getting the program off a cable from your PC and into the code memory. This is considered the programming or "burning" process.

Hence the programmer or burner can be as simple as a cable from the host PC to the target mcu or it can be a board with a separate controller chip that does the burning process. This all depends on the programming requirements of the target mcu and what type of connections it already has internal to the mcu.

Most programmers today connect to the host PC using a USB cable. Hence invariably, the programmer contains another mcu chip that handles the USB interface and the download/burning process to the target mcu.
 
Last edited:

Thread Starter

Rizu

Joined Nov 1, 2012
11
Many many thanks MrChips
Could I clarify some more of my doubts please? Is there any universal programmer which can program any micro controller? And what micro controller should I use first to start with? Thanks again........
 

MrChips

Joined Oct 2, 2009
30,806
No. There is no universal programmer. Every mcu uses its particular programming method.
There are hundreds of thousands of mcu available. You don't choose the mcu first.
You outline the application first.

It's like asking, what shoes should I go out and buy?
 
Last edited:

takao21203

Joined Apr 28, 2012
3,702
Many many thanks MrChips
Could I clarify some more of my doubts please? Is there any universal programmer which can program any micro controller? And what micro controller should I use first to start with? Thanks again........
There is. Binary: 101010101111101010101111010

No seriously. Each brand has a so-called instruction set.
Normally Microcontrollers have a specific type number, some even have real names.

Often it start with the family, and after that, certain numbers as extension.
Different for each brand.

STM8 is good to start or PIC 16f54.
Arduino or a PIC32 board if you can handle larger documents to read and understand.

STM8 boards cost you $10 to $15.

A PIC 16f54 is only 50 pages technical documentation to read.
Much less of that is indeed needed to understand how it works.

If you understand the simple 16f54, you have it easier with more complicated chips.

PIC32 boards would cost you some money.

There are also $25 range PIC24 mini boards now, this is a 16bit chip.

Really depends how much you want to invest for a start, and how much you want or can read.

If the technical manuals are too difficult, try embedded BASIC there are various brands and ready-made PCBs.

If you mean if there is a so-called FLASH writer which works for any chip or most chips, clearly no. Each brand has a different way to program chips. Since a few years, they all use USB and/or JTAG.

It is a bit confusing since the controllers don't use USB directly. They use a serial protocol specific to the brand. The programmer modules or FLASH writers however all use USB now.

So make clear:

-How much you want to invest for a start- anything between $20 and $500
-How much documentation you want to read- some 10 or 20 pages, some 100 pages, or really almost nothing.
-Would you want to solder components and maintain a parts inventory, or rather prefer only to have a prefab board?
-Do you just want to learn the basic of microcontrollers, or do you want to use graphics displays, SD cards, sensors and things like that from the start?

You can download many brochures from Microchip, Atmel, ST Electronics etc., and examine the chips + the offered development products. All PDF.
 

MrChips

Joined Oct 2, 2009
30,806
Examine these two questions:

1) I want to learn to drive, what would be the first car I should buy?

2) I want to learn how to repair cars, what car should I first learn to repair?

As you can imagine the answer to both questions would not be the same and it raises a lot more questions before one could even begin.
 

Thread Starter

Rizu

Joined Nov 1, 2012
11
Thanks again MrChips

You outline the application first
...........could you suggest me what programming language should I learn to program applications. I have some basic knowledge of C. Will C do or I have to learn Pbasic or C++ or something else?
 

MrChips

Joined Oct 2, 2009
30,806
Like I hinted, you have to provide a lot more information.
How old are you? What is your experience and background?
What do you want to learn and hope to accomplish?
How far do you hope to go with this?

Do you want to get from A to B in the shortest time possible, or the lowest cost possible?
Do you want to be able to repair your car in your garage or if it breaks down on the road?
Do you want to become a car designer or automobile engineer?
 

Thread Starter

Rizu

Joined Nov 1, 2012
11
To tell the truth, I am just a freshmen at EEE. I am just acquainted with DC circuit and now doing our course on AC circuit.
I started a book on micro controller which dealt with some easy projects (like turning of LED lights or pushbutton switch etc.) using BasicStump 2 micro controller and I found interested in it. So I intended to do some practice on what I read there.
I know I am not that mature or eligible enough to use micro controller, but I just want to practice with it so that I can be just acquainted with this kind of stuff.

Besides I hope to go for some robotics lessons and I heard that knowhow in micro controller is kind of crucial for that. So I want to start a bit early.
And a true fact is that Basicstump 2 microcontroller is not that available in the locality where I live. Most common MCU I get here are PIC or ATMEGA etc. So I have to choose between these as the price of programmer is pretty high. So I came to this group with a view to get some wise suggestion. Thanks........
 

Thread Starter

Rizu

Joined Nov 1, 2012
11
Thanks takao21203
The most common Micro controllers I have in my locality are ATmega or PIC. STM8 or Audrino will be, I think,will be tough to find here. So I think I should go for PICs then.

Thanks again
 

takao21203

Joined Apr 28, 2012
3,702
Thanks takao21203
The most common Micro controllers I have in my locality are ATmega or PIC. STM8 or Audrino will be, I think,will be tough to find here. So I think I should go for PICs then.

Thanks again
I could build a simple USB programmer for 5 dollars. It is of course a challenge for a beginner.

But, take a look at the 16f5x programming specification PDF.

It is not all that long or too much complicated. There you see one example how a PIC is "programmed".

You could borrow a programmer module, and design a very simple PIC circuit- to program other PICs. Use 8x 1.5V batteries if neccessary, and RS232.

It should be possible in about two weeks from zero to build this, even if there is a learning curve. You sound like someone able to do it.

Really engineers improve a lot if they try and start with a project that is just a bit beyond their knowledge.

Get the two datasheets- 16f5x baseline, and 16F5x programming specification, and take at least a coarse reading through them.
 

Attachments

Last edited:

takao21203

Joined Apr 28, 2012
3,702
Like I hinted, you have to provide a lot more information.
How old are you? What is your experience and background?
What do you want to learn and hope to accomplish?
How far do you hope to go with this?

Do you want to get from A to B in the shortest time possible, or the lowest cost possible?
Do you want to be able to repair your car in your garage or if it breaks down on the road?
Do you want to become a car designer or automobile engineer?
Useful view from the point of automotive. The discussion seems to be on the right track.
 

MrChips

Joined Oct 2, 2009
30,806
Now that we know a bit more about your age, where you're at and where you are possibly headed, there are three directions you can take, all at the same time. A lot also depends on your budget and what is available in your country.

Path #1 - Learn ASM. Get a TI MSP430 LaunchPad, Atmel AVR starter kit or a PICKit 2 or 3. I did not intend to omit other very viable manufacturers - Freescale, STM, Silicon Labs, etc. You can gain a lot of insight into the world of computers if you learn ASM first.

Path #2 - Get an Arduino and start programming. Flash LEDs. Move motors. Build a line-following robot. Have fun.

Path #3 - Get a Raspberry-Pi, learn everything you can about it and the world will be at your doorstep.
 

takao21203

Joined Apr 28, 2012
3,702
OP wrote the stuff isn't available locally.

India I guess from the place name.

Why use assembler? You can do 99% in C + use inline if you absolutely wanted to. There is not much to learn really.

Looking at the disassembly, researching what the code does using the instruction set.

You'll see very clear when you single step in MPLAB SIM.

I could buy a STM8 here costs about 10 Euro and resell only adding postage. If they don't ship to India? Element14?

STM8 discovery is a full chip FLASH writer. All you need is two slide switches and a few wires.

Best value I saw so far if you consider STM8 chips.

If you used assembler for some years, you would not really want to learn all the details again for a new chip. Staying away from it...

Yes if you can not get a BasicStump, you'll have to learn C.

I'd even go so far as to buy a STM8, and modify it into a PIC programmer. A true challenge for a beginner but doable for the simple baseline. You will learn a lot by doing this.

Don't waste time with blinking LEDs and things like that. Build a really useful application, and use C language for that.
 
Top