Hello

Welcome lekule blog

Hi, I`m Sostenes, Electrical Technician and PLC`S Programmer.
Everyday I`m exploring the world of Electrical to find better solution for Automation.
together in the world. #lekule86
Join us on

Which Tools are Used in Program the Microcontroller?

Normally we are designing a circuit and connecting to different other components like motors, LCDs, LEDS, even more by giving a power supply which is used by that circuit. What the microcontroller does when it is programmed with that circuit?
The microcontroller families understands a program which is written in assembly level language or C language which has to be compiled into a machine level language which is known as binary language ( i.e. zeros & ones). The file which has been programmed is stored on a computer hard disk or memory of the microcontroller. The assembler is used to translate the assembly program into machine code. To write the program in assembly language the programmer must have knowledge on the CPU or hardware. The low level languages are used in cross development. The hexadecimal system was used as more efficient way to represent binary numbers, while using binary language the CPU works very fast.
Today, we can use many different programming languages such as C, JAVA, ORACLE and others. These languages are called high level languages; to write the program in high level language the programmer doesn’t need any knowledge on hardware which is used for high level application development. The compiler plays a vital role in translating the high-level program to machine level as the high level languages are used in native development.
Here are some tools which are used in programming of the microcontrollers:
  • Keil uVison
  • Code Editor
  • Assembler
  • C compiler
  • Burner/Programmer
Keil Uvison:
The Keil Uvison is free software which solves many of the pain points for embedded developer. This software is integrated development environment (IDE) which integrated a text editor to write programs, a compiler and it will convert source code into hex file.
Keil uVsion Software
Keil uVsion Software
Guide to Start working with Keil Uvison:
          1. Click on the Keil Vision Icon on Desktop.
The following steps involve in this process:
Figure 1
Figure 1
2.  Click on the Project menu from the title bar
                   Then Click on New Project
Figure 2
Figure 2
3.  Save the Project by typing suitable project name with no extension in your   own folder sited in either C:\ or D:\

Figure 3
Figure 3
4. Then Click on save button above.
               Select the component for u r project. i.e. Atmel……
Click on the + Symbols as for your requirement. Example here selected Atmel.
Figure 4
Figure 4
5. Select AT89C51 as shown below
Figure 5
Figure 5
6. Then Click on “OK”
              The Following steps involve in the above process:
Figure 6
Figure 6

7. Then Click either YES or NO………mostly “NO”.
Now your project is ready to USE.
Now double click on the Target1, you would get another option “Source group 1” as shown in next page.
Figure 7
Figure 7
8. Click on the file option from menu bar and select “new”
Figure 8
Figure 8
9. The next screen will be as shown in text page
Figure 9
Figure 9
10. Now start writing program in either in “EMBEDDED C” or “ASM”.
For a program to be written in Assembly language, we must save it with an extension “. Asm” and for “EMBEDDED C” based program we have to save it with extension “.C”
Figure 10
Figure 10
11. Now right click on Source group 1 and click on “Add files to Group Source”
Figure 11
Figure 11
 12. Now select as per your file extension given while saving the file.
                 Click only one time on option “ADD”.
Now Press function key F7 to compile. Any error will appear if so happen.
If the file contains no error, then press Control+F5 simultaneously.
Code Editor or Text Editor:
The code editor is used to write the program. The uVision editors include all standard features like color syntax highlighting and quickly identify the errors. The editor is available while debugging. The natural debugging environment helps you quickly in identifying and correcting the errors in your program. After writing the program in code editor save that file in .asm or .C format depending on which assembler you have chosen.
Keil Uvison Editor
Keil Uvison Editor
Assembler:
The assembler is used to convert the source code (low level language) into machine level (binary format).
Compiler:
The compiler is used to convert the source code (high level language) into machine level (binary format).
The assembler converts the instructions into machine code:
Image

Assembly Language to Machine Level Conversion Diagram

➢    The first file is created with an editor such as DOS edit or other.
➢    The assembler will produce an objective file and a list of file. The extension for the object file is “.obj” while the extension for the list file is “.lst”.
➢    The assembler requires a third step is know as linking. The link program takes one or more objects files and produces an objective file with the extension “.abs”.
➢    The “.abs” file is fed into a program called OH (objective to hex converter) which creates a file with extension “hex” that is ready to burn in to microcontroller ROM.

Burner/Programmer:

The Programming or burning a microcontroller means “to transfer the program from compiler to the memory of the microcontroller”. The program for the microcontroller is generally written in C or assembly language, finally the compiler generates a hex file which contains the machine language instructions like zeros and ones that understandable by the microcontrollers. It is the content of the microcontroller which is transferred to the microcontroller, once a program is transferred to the memory of the microcontroller it works according to the program.
Programmer/Burner
Programmer/Burner

How to Program a Microcontroller:

Microcontroller is an integrated chip in which we store the code which is written in an assemble language. So to dump this coded program into a microcontroller IC we need a device which is known as burner or programmer. A programmer is a hardware device with software which reads the content of the hex file which is stored on a pc or laptops. It’s read the hex file data serial or USB cable and transfer the data to the memory of the microcontroller.


The programmers and compilers are different for different microcontroller which is for different companies like the 8051 microcontroller “flash magic” is used to program the microcontroller and AT89C51 microcontroller “programmer” used to program the microcontroller. This is way how we are programming code in a microcontroller with a burner or programmer.

Share this:

ABOUTME

Hi all. This is deepak from Bthemez. We're providing content for Bold site and we’ve been in internet, social media and affiliate for too long time and its my profession. We are web designer & developer living India! What can I say, we are the best..

Post a Comment
My photo

Hi, I`m Sostenes, Electrical Technician and PLC`S Programmer.
Everyday I`m exploring the world of Electrical to find better solution for Automation. I believe everyday can become a Electrician with the right learning materials.
My goal with BLOG is to help you learn Electrical.

Labels

LEKULE TV EDITORIALS ARTICLES DC ROBOTICS DIGITAL SEMICONDUCTORS GENERATOR AC EXPERIMENTS MANUFACTURING-ENGINEERING REFERENCE FUNDAMENTAL OF ELECTRICITY ELECTRONICS ELECTRICAL ENGINEER MEASUREMENT TRANSDUCER & SENSOR VIDEO ARDUINO RENEWABLE ENERGY AUTOMOBILE TEARDOWN SYNCHRONOUS GENERATOR DIGITAL ELECTRONICS ELECTRICAL DISTRIBUTION CABLES AUTOMOTIVE MICROCONTROLLER SOLAR PROTECTION DIODE AND CIRCUITS BASIC ELECTRICAL ELECTRONICS MOTOR SWITCHES CIRCUIT BREAKERS CIRCUITS THEORY PANEL BUILDING ELECTRONICS DEVICES MIRACLES SWITCHGEAR ANALOG MOBILE DEVICES WEARABLES CAMERA TECHNOLOGY COMMUNICATION GENERATION BATTERIES FREE CIRCUITS INDUSTRIAL AUTOMATION SPECIAL MACHINES ELECTRICAL SAFETY ENERGY EFFIDIENCY-BUILDING DRONE CONTROL SYSTEM NUCLEAR ENERGY SMATRPHONE FILTER`S POWER BIOGAS BELT CONVEYOR MATERIAL HANDLING RELAY ELECTRICAL INSTRUMENTS ENERGY SOURCE PLC`S TRANSFORMER AC CIRCUITS CIRCUIT SCHEMATIC SYMBOLS DDISCRETE SEMICONDUCTOR CIRCUITS WIND POWER C.B DEVICES DC CIRCUITS DIODES AND RECTIFIERS FUSE SPECIAL TRANSFORMER THERMAL POWER PLANT CELL CHEMISTRY EARTHING SYSTEM ELECTRIC LAMP FUNDAMENTAL OF ELECTRICITY 2 BIPOLAR JUNCTION TRANSISTOR 555 TIMER CIRCUITS AUTOCAD BLUETOOTH C PROGRAMMING HOME AUTOMATION HYDRO POWER LOGIC GATES OPERATIONAL AMPLIFIER`S SOLID-STATE DEVICE THEORRY COMPUTER DEFECE & MILITARY FLUORESCENT LAMP INDUSTRIAL ROBOTICS ANDROID ELECTRICAL DRIVES GROUNDING SYSTEM CALCULUS REFERENCE DC METERING CIRCUITS DC NETWORK ANALYSIS ELECTRICAL SAFETY TIPS ELECTRICIAN SCHOOL ELECTRON TUBES FUNDAMENTAL OF ELECTRICITY 1 INDUCTION MACHINES INSULATIONS USB ALGEBRA REFERENCE HMI[Human Interface Machines] INDUCTION MOTOR KARNAUGH MAPPING USEUL EQUIATIONS AND CONVERSION FACTOR ANALOG INTEGRATED CIRCUITS BASIC CONCEPTS AND TEST EQUIPMENTS DIGITAL COMMUNICATION DIGITAL-ANALOG CONVERSION ELECTRICAL SOFTWARE GAS TURBINE ILLUMINATION OHM`S LAW POWER ELECTRONICS THYRISTOR BOOLEAN ALGEBRA DIGITAL INTEGRATED CIRCUITS FUNDAMENTAL OF ELECTRICITY 3 PHYSICS OF CONDUCTORS AND INSULATORS SPECIAL MOTOR STEAM POWER PLANTS TESTING TRANSMISION LINE C-BISCUIT CAPACITORS COMBINATION LOGIC FUNCTION COMPLEX NUMBERS CONTROL MOTION ELECTRICAL LAWS INVERTER LADDER DIAGRAM MULTIVIBRATORS RC AND L/R TIME CONSTANTS SCADA SERIES AND PARALLEL CIRCUITS USING THE SPICE CIRCUIT SIMULATION PROGRAM AMPLIFIERS AND ACTIVE DEVICES APPS & SOFTWARE BASIC CONCEPTS OF ELECTRICITY CONDUCTOR AND INSULATORS TABLES CONDUITS FITTING AND SUPPORTS ELECTRICAL INSTRUMENTATION SIGNALS ELECTRICAL TOOLS INDUCTORS LiDAR MAGNETISM AND ELECTROMAGNETISM PLYPHASE AC CIRCUITS RECLOSER SAFE LIVING WITH GAS AND LPG SAFETY CLOTHING STEPPER MOTOR SYNCHRONOUS MOTOR AC METRING CIRCUITS BECOME AN ELECTRICIAN BINARY ARITHMETIC BUSHING DIGITAL STORAGE MEMROY ELECTRICIAN JOBS HEAT ENGINES HOME THEATER INPECTIONS LIGHT SABER MOSFET NUMERATION SYSTEM POWER FACTORS REACTANCE AND IMPEDANCE INDUCTIVE RECTIFIER AND CONVERTERS RESONANCE SCIENTIFIC NOTATION AND METRIC PREFIXES SULFURIC ACID TROUBLESHOOTING TROUBLESHOOTING-THEORY & PRACTICE 12C BUS APPLE BATTERIES AND POWER SYSTEMS DC MOTOR DRIVES ELECTROMECHANICAL RELAYS ENERGY EFFICIENCY-LIGHT INDUSTRIAL SAFETY EQUIPMENTS MEGGER MXED-FREQUENCY AC SIGNALS PRINCIPLE OF DIGITAL COMPUTING QUESTIONS REACTANCE AND IMPEDANCE-CAPATIVE SEQUENTIAL CIRCUITS SERRIES-PARALLEL COMBINATION CIRCUITS SHIFT REGISTERS WIRELESS BUILDING SERVICES COMPRESSOR CRANES DIVIDER CIRCUIT AND KIRCHHOFF`S LAW ELECTRICAL DISTRIBUTION EQUIPMENTS 1 ELECTRICAL DISTRIBUTION EQUIPMENTS B ELECTRICAL TOOL KIT ELECTRICIAN JOB DESCRIPTION INDUSTRIAL DRIVES LAPTOP SCIENCE THERMOCOUPLE TRIGONOMENTRY REFERENCE UART oscilloscope BIOMASS CONTACTOR ELECTRIC ILLUMINATION ELECTRICAL SAFETY TRAINING ELECTROMECHANICAL FEATURED FILTER DESIGN HARDWARE JUNCTION FIELD-EFFECT TRANSISTORS NASA NUCLEAR POWER VALVE COLOR CODES ELECTRIC TRACTION FLEXIBLE ELECTRONICS FLUKE GEARMOTORS INTRODUCTION LASSER PID PUMP SEAL ELECTRICIAN CAREER ELECTRICITY SUPPLY AND DISTRIBUTION MUSIC NEUTRAL PERIODIC TABLES OF THE ELEMENTS POLYPHASE AC CIRCUITS PROJECTS REATORS SATELLITE STAR DELTA VIBRATION WATERPROOF