Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How to program the microcontroller which is used in ats?

user-image
Question ajoutée par ahmed sayed abdel-bary mekky , مدرس طاقة شمسية وكهرباء بالتعليم الفني , وزارة التربية و التعليم المصرية
Date de publication: 2016/12/23
Ehtisham Khursheed
par Ehtisham Khursheed , Virtual Marketing & Business Development Manager , GWS Marketing Services

A micro-controller does not know what to do by itself. It’s your job to tell it what you want it to do. So, you need to write a program code on your computer. You need to compile the code with a compiler for the micro-controller you are using. And you need to upload the compiled version of your program to your micro-controller.

  1. The first step is to write your program code. This is usually done is C. But some compilers support other languages as well. 
  2. It doesn’t matter what software you use to write code. You can even use Notepad for this step. I like to use a really simple editor. But one that supports «syntax highlighting» makes the coding a bit easier. For Windows, I would recommend using Notepad++
  3. Before you can upload your program to your micro-controller, you need to compile it. This means converting the code from human-readable code to machine-readable code. Use a compiler that supports your micro-controller and compile your code into machine-code for you chip. A popular compiler is for Atmel AVR chips is avr-gcc. After compilation you will have one or more files containing machine code. Then you need to upload these files to you micro-controller.

  4. Usually it’s one program file and a file for EEPROM and/or flash that you need to upload. You need a physical connection from your computer to your micro-controller. Either you can use a dedicated programmer (such as the AVRISP) or if you have a USB programmable chip, you can program it through USB (which I think is the best alternative).

More Questions Like This