×
Every problem might not have a solution right now, but don’t forget that but every solution was once a problem.
--Your friends at LectureNotes
Close

Note for Microcontroller and Applications - MCA by Ashok Malkar

  • Microcontroller and Applications - MCA
  • Note
  • Electrical and Electronics Engineering
  • B.Tech
  • 35 Views
  • 1 Offline Downloads
  • Uploaded 2 months ago
Ashok Malkar
Ashok Malkar
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

8051 Programming • The 8051 may be programmed using a low-level or a high-level programming language. • Low-Level Programming – Assembly language programming writes statements that the microcontroller directly executes – Advantages • 8051 assemblers are free • Produces the fastest and most compact code – Disadvantages • Difficult to learn (8051 assembler has 111 instructions) • Slow to program • Not portable to other microcontrollers Embedded Systems 1 3-1 8051 Assembly Programming

Text from page-2

Assembly Language Instruction Set Source Philips 80C51 Family Programmer’s Guide and Instruction Set Embedded Systems 1 3-2 8051 Assembly Programming

Text from page-3

8051 Programming • High-Level Programming – Uses a general purpose programming language such as C – Advantages • Easier to learn • Faster to program • More portable than assembly language – Disadvantages • Code may not be as compact or as fast as assembly language • Good quality compilers are expensive Embedded Systems 1 3-3 8051 Assembly Programming

Text from page-4

8051 Programming Examples •C program example to add 2 numbers void main() { unsigned char x=5,y=6,z; z = x + y; } •Same code written using assembly language MOV ADD MOV A,#05H A,#06H R0,A Embedded Systems 1 ;result stored in R0 3-4 8051 Assembly Programming

Lecture Notes