EEE 5th Semester - Embedded C Programming - EE3017 - Important Questions with Answer - Unit 3 - 8051 Programming In C
EEE 5th Semester - Embedded C Programming - EE3017 - Important Questions with Answer - Unit 3 - 8051 Programming In C
4th Semester
3rd Semester
- MA3151 MA3251
1st Semester
2nd Semester
Power System
Operation and Control
Control Systems - - EE3602 Open Elective 2
EE3503 Project Work /
Open Elective-1
Open Elective 3 Intership
Elective 1 Elective-4
Open Elective 4
Elective 2 Elective-5
Elective 7
Elective 3 Elective-6
Management Elective
All EEE Engg Subjects - [ B.E., M.E., ] (Click on Subjects to enter)
Circuit Theory Digital Logic Circuits Electromagnetic Theory
Environmental Science and Linear Integrated Circuits Discrete Time Systems and
Engineering and Applications Signal Processing
Electronic Devices and Electrical Machines I Electrical Machines II
Circuits
Power Plant Engineering Special Electrical Machines Transmission and Distribution
Power System Analysis Control Systems Power Electronics
Power System Operation Measurements and Design of Electrical Machines
and Control Instrumentation
Communication Engineering Solid State Drives Embedded Systems
Power Quality High Voltage Engineering Protection and Switchgear
Flexible AC Transmission Microprocessors and Electric Energy Generation,
Systems Microcontrollers Utilization and Conservation
Professional Ethics in Physics for Electronics Basic Civil and Mechanical
Engineering Engineering Engineering
Transforms and Partial Environmental Science and Problem Solving and Python
Differential Equations Engineering Programming
Engineering Physics Engineering Chemistry Numerical Methods
Engineering Graphics Technical English Object Oriented Programming
Principles of Management Total Quality Management
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
Unit – III
Prepared by,
EE33017_ECP
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
UNIT 3
TWO MARKS
32 + 0 + 0 + 4 + 2 + 1 = 39
The 8051 is an 8-bit processor .ƒ The CPU can work on only 8 bits of data at a time .The 8051
had ƒ 128 bytes of RAM ,ƒ 4K bytes of on-chip ROM, ƒ Two timers, ƒ One serial port, ƒ Four
I/O ports, each 8 bits wide 6 interrupt sources
EE33017_ECP
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
PSW register Bits D4 and D3 of the PSW are used to select the desired register bank ¾ Use the
bit-addressable instructions SETB and CLR to access PSW.4 and PSW.3
The register used to access the stack is called the SP (stack pointer) register .The stack pointer in
the 8051 is only 8 bit wide, which means that it can take value of 00 to FFH
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
i) The storing of a CPU register in the stack is called a PUSH . SP is pointing to the last used
location of the stack. As we push data onto the stack, the SP is incremented by one
ii) Loading the contents of the stack back into a CPU register is called a POP. With every pop,
the top byte of the stack is copied to the register specified by the instruction and the stack pointer
is decremented once
10. Examining the stack, show the contents of the register and SP after execution of the
following instructions. All value are in hex.
JB Jump if bit = 1
JNC Jump if CY = 0
JC Jump if CY = 1
JNZ Jump if A ≠ 0 J
EE33017_ECP
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
CPU executing an instruction takes a certain number of clock cycles . These are referred as to as
machine cycles
14. What are the Two factors can affect the accuracy of the delay ¾.
Crystal frequency - The duration of the clock period of the machine cycle is a function of this
crystal frequency .
8051 design ƒ-The original machine cycle duration was set at 12 clocks ƒ Advance
PART B
2. Explain Time delay using for loop and Special functions in 8051.
3. Write an 8051 C program to read the P1.0 and P1.1 bits and issue an ASCII character to P0
according to the following table.
P1.1 P1.0
0 0 send ‘0’ to P0
0 1 send ‘1’ to P0
1 0 send ‘2’ to P0
EE33017_ECP
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi
1 1 send ‘3’ to P0
4. Write an 8051 C program to convert packed BCD 0x29 to ASCII and display the bytes on P1
and P2.
5. Write an 8051 C program to calculate the checksum byte for the data 25H, 62H, 3FH, and
52H.
6. Write an 8051 C program to convert 11111101 (FD hex) to decimal and display the digits on
P0, P1 and P2.
7. Write a C program to send out the value 44H serially one bit at a time via P1.0. The LSB
should go out first.
8. Write a C program to send out the value 44H serially one bit at a time via P1.0. The MSB
should go out first.
EE33017_ECP
https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
Click on Subject/Paper under Semester to enter.
Probability and Environmental Sciences
Professional English complex function - and Sustainability -
Professional English - - II - HS3252 MA3303 GE3451
I - HS3152
Statistics and Electromagnetic Transmission and
Matrices and Calculus Numerical Methods - Theory - EE3301 Distribution - EE3401
4th Semester
3rd Semester
- MA3151 MA3251
1st Semester
2nd Semester
Power System
Operation and Control
Control Systems - - EE3602 Open Elective 2
EE3503 Project Work /
Open Elective-1
Open Elective 3 Intership
Elective 1 Elective-4
Open Elective 4
Elective 2 Elective-5
Elective 7
Elective 3 Elective-6
Management Elective
All EEE Engg Subjects - [ B.E., M.E., ] (Click on Subjects to enter)
Circuit Theory Digital Logic Circuits Electromagnetic Theory
Environmental Science and Linear Integrated Circuits Discrete Time Systems and
Engineering and Applications Signal Processing
Electronic Devices and Electrical Machines I Electrical Machines II
Circuits
Power Plant Engineering Special Electrical Machines Transmission and Distribution
Power System Analysis Control Systems Power Electronics
Power System Operation Measurements and Design of Electrical Machines
and Control Instrumentation
Communication Engineering Solid State Drives Embedded Systems
Power Quality High Voltage Engineering Protection and Switchgear
Flexible AC Transmission Microprocessors and Electric Energy Generation,
Systems Microcontrollers Utilization and Conservation
Professional Ethics in Physics for Electronics Basic Civil and Mechanical
Engineering Engineering Engineering
Transforms and Partial Environmental Science and Problem Solving and Python
Differential Equations Engineering Programming
Engineering Physics Engineering Chemistry Numerical Methods
Engineering Graphics Technical English Object Oriented Programming
Principles of Management Total Quality Management