Archive

Posts Tagged ‘hitech’

Building a basic Embedded System Using: PIC16F877A #2 (General Process for Programming a Microcontroller)

September 6, 2012 4 comments

z

How a controller understands Programming..??

  • We all know Controller is a device which works on a set of instructions also known as program.
  • But Controller Doesn’t understand Human Language.
  • It only understands the language of Binary i.e. 0 & 1.
  • The format of Binary File is HEX File

Programming part can be done in two ways:

  1. Compiler based Languages
  2. Assembly Languages

Compiler Based Languages

Compiler

A compiler is a tool that transforms source code written in a programming language (C, C++, Java etc) into binary data (HEX File) for Computers.

Cross Compiler

A compiler is a tool that transforms source code written in a programming language (C, C++, Java etc) into binary data (HEX File) for Microcontrollers.
Note: Output of the compiler can be executed by a computer while output of the cross compiler can be executed by a microcontroller.

Assembly Language

  • An assembly language is a low level language which is specific to any particular microcontroller. The programs are written using predefined instruction sets (which are controller-specific)
  • Assembly language programs are converted into HEX file by Assembler.

Options Available to program PIC16F877A:

Compilers:

  1. PIC C
  2. Mikro C
  3. Hi-Tech Lite
  4. PicJAL

Assemblers:

  1. MPLAB IDE

We will be using PIC C Compiler to illustrate programming in our blog.

In the next post we will discuss about burning/flashing device (PIC16F877A) with generated hex file.