Professional Documents
Culture Documents
• Applications of C • Applications of
Program: Embedded C Program:
USABILIT
Y AND • Logical programs • DVD
Applicati
on • System software • TV
programs
• Digital camera
C Language:
of desktop-based applications.
operating system.
.
C Language:
• The main features of C language include low-level access to memory, a simple set of
keywords, and clean style, these features make C language suitable for system
Language is :
• Comment: These are simple readable text, written in code to make it more
which files to look in to find the symbols that are not present in the program.
• Global Declaration: The part of the code where global variables are defined.
• Local Declaration: The part of the code where local variables are defined.
• Main function: Every C program has a main function which drives the whole
code. It basically has two parts the declaration part and the execution part.
• the declaration part is where all the variables are declared,
• the execution part defines the whole structure of execution in the program.
platforms.
❖ Machine language
❖ Assembly language
• A programming language that uses symbolic names to represent operations, registers and
memory locations.
• Either directly, or
❖ Computers only deal with binary data, hence the instructions must be in binary
❖ The set of all instructions (in binary form) makes up the computer's machine
Operands
MOV AL, 34h
Operands are manipulated by the opcode. In this example, the operands are
the register named AL and the value 34 hex.
Translating Languages
English: D is assigned the sum of A times B plus 10.
High-Level Language: D = A * B + 10
A statement in a high-level language is translated
typically into several machine-level instructions
Intel Assembly Language:
mov eax, A Intel Machine Language:
mul B A1 00404000
addeax, 10 F7 25 00404004
mov D, 83 C0 0A
eax A3 00404008
❖Some representative types of applications:
Keyword
s
• There are certain words that are reserved for doing specific tasks. These
Explanation: If we assign p2.1 as ‘a’ variable, then we can use ‘a’ instead of p2.1 anywhere
Ex: bit c;
Explanation: It is a bit sequence setting in a small data area that is used by a program to
remember something.
Keyword
s
SFR: This data type is used for accessing a SFR register by another name. Al
The SFR stands for ‘Special Function Register’. Microcontroller 8051 has 256 bytes of
. memory.
RAM
This RAM is divided into two parts: the first part of 128 bytes is used for data storage, and
All peripheral devices like I/O ports, timers and counters are stored in the SFR register,