Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
28 views

EEE 5th Semester - Embedded C Programming - EE3017 - Important Questions with Answer - Unit 2 - Embedded C

Uploaded by

Ajay Surya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

EEE 5th Semester - Embedded C Programming - EE3017 - Important Questions with Answer - Unit 2 - Embedded C

Uploaded by

Ajay Surya
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

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

Digital Logic Circuits - Linear Integrated


Engineering Physics - Engineering Graphics EE3302 Circuits - EE3402
PH3151 - GE3251
Measurements and
Electron Devices and Instrumentation -
Engineering Chemistry Physics for Electrical Circuits - EC3301 EE3403
- CY3151 Engg - PH3202
Microprocessor and
Electrical Machines I - Microcontroller -
Basic Civil and
EE3303 EE3404
Problem Solving and Mechanical Engg -
Python Programming - BE3255
C Programming and Electrical Machines II
GE3151
Electric Circuit Data Structures - - EE3405
Analysis - EE3251 CS3353

Power System Analysis


High Voltage
- EE3501
Engineering - EE3701
Protection and
Switchgear - EE3601
Power Electronics - Human Values and
5th Semester

EE3591 Ethics - GE3791


8th Semester
7th Semester
6th 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
Page 1 of 4
www.BrainKart.com

DEPARTMENT ELECTRICAL OF AND ELECTRONICS


ENGINEERING
B.E. Electrical and Electronics Engineering

Anna University Regulation: 2021

EE3317– Embedded C Programming


III Year / V Semester
Question Bank
Unit – II
Embedded C
Prepared by,

Mrs. J.Thilagavathy, AP/EEE

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
Page 2 of 4
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi

GRACE COLLEGE OF ENGINEERING


MULLAKKADU
EE3017 -EMBEDDED C PROGRAMMING
UNIT II
TWO MARKS
1.What is the condition for timer overflow?
In most cases, we will be concerned with 16-bit timers. Assuming the count starts at 0, then
– after 65.535 ms – our 12 MHz 8051 will reach its maximum value (65535) and the timer
will then ‘overflow’. When it overflows, a hardware flag will be set. We can easily read this
flag in software.

E
2. What are the calculations of hardware delays?
We calculate the required starting value for the timer.
We load this value into the timer.
CO
We start the timer.
The timer will be incremented, without software intervention, at a rate deter-
CE

mined by the oscillator frequency; we wait for the timer to reach its maximum
value and ‘roll over’.
The timer signals the end of the delay by changing the value of a flag variable.
RA

3. TCON special function register (SFR) bit ?


G

4. TMOD Register SFR stands for?

5. Write the formula to be loaded in TH & TL registers.


To generate a 15 ms hardware delay. We will assume that we are using a 12 MHz 8051, and
that this device requires 12 oscillator cycles to perform each timer increment: the timer is

EE3017_ECP

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
Page 3 of 4
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi

incremented at a 1 MHz rate. A 15 ms delay therefore requires the following number of timer
increments:
15ms
---------------- × 1000000 = 15000 increments.
1000ms
The timer overflows when it is incremented from its maximum count of 65535.
Thus, the initial value we need to load to produce a 15ms delay is:
65536 – 15000 = 50536 (decimal) = 0xC568
6.Why Timer 2 is not used?
Timer 2 can be used to generate delays . However, this is not an inappropriate use for this
resource (in most applications). This is because Timer 2 has features which make it
particularly well suited to the creation of an operating system, and most ‘real’ applications

E
will reserve Timer 2 for this purpose.

CO
7. Write a c program to generate delay using timer?
void DELAY_HARDWARE_50ms(void)
{
// Configure Timer 0 as a 16-bit timer
CE

TMOD &= 0xF0; // Clear all T0 bits (T1 left unchanged)


TMOD |= 0x01; // Set required T0 bits (T1 left unchanged)
RA

ET0 = 0; // No interupts
// Values for 50 ms delay
TH0 = 0x3C; // Timer 0 initial value (High Byte)
G

TL0 = 0xB0; // Timer 0 initial value (Low Byte)


TF0 = 0; // Clear overflow flag
TR0 = 1; // Start timer 0
while (TF0 == 0); // Loop until Timer 0 overflows (TF0 == 1)
TR0 = 0; // Stop Timer 0

}
8. Write few example for languages & Machine Code used?
First-Generation Language (1GL) Assembly Language.
Second-Generation Languages (2GLs) COBOL, FORTRAN

EE3017_ECP

https://play.google.com/store/apps/details?id=info.therithal.brainkart.annauniversitynotes
Page 4 of 4
www.BrainKart.com
4931_Grace College of Engineering,Thoothukudi

Third-Generation Languages (3GLs) C, Pascal, Ada 83


Fourth-Generation Languages (4GLs) C++, Java, Ada 95
9. What is Device Header?
These files will, in most cases, have been produced by your compiler manufacturer, and will
include the addresses of the special function registers (SFRs) used for port access, plus
similar
details for other on-chip components such as analog-to-digital converters.
10.What is Project header?
The ‘Project Header’ is simply a header file, included in all projects, that groups the key
information about the 8051 device you have used, along with other key parameters – such as
the oscillator frequency – in one file.

E
Part B & C
1.
2.
3.
Explain Creating loop timeouts. CO
Explain Timer 0&Timer 1 in details along with TCON and TMOD registers.
How can we create portable hardware delay?
4. Write about Project Header with neat diagram.
5. Write in detail about port header?
CE
RA
G

EE3017_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

Digital Logic Circuits - Linear Integrated


Engineering Physics - Engineering Graphics EE3302 Circuits - EE3402
PH3151 - GE3251
Measurements and
Electron Devices and Instrumentation -
Engineering Chemistry Physics for Electrical Circuits - EC3301 EE3403
- CY3151 Engg - PH3202
Microprocessor and
Electrical Machines I - Microcontroller -
Basic Civil and
EE3303 EE3404
Problem Solving and Mechanical Engg -
Python Programming - BE3255
C Programming and Electrical Machines II
GE3151
Electric Circuit Data Structures - - EE3405
Analysis - EE3251 CS3353

Power System Analysis


High Voltage
- EE3501
Engineering - EE3701
Protection and
Switchgear - EE3601
Power Electronics - Human Values and
5th Semester

EE3591 Ethics - GE3791


8th Semester
7th Semester
6th 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

You might also like