Ec-3033 (Esda) - CS End April 2024
Ec-3033 (Esda) - CS End April 2024
Q1a What are the three main components of the Embedded System?
1. Requirements
2. Specification
3. Architecture
4. Components
5. System Integration
1. 8-Bit Microcontroller
2. 128 Bytes of RAM
3. 4 Kb of On-Chip ROM
4. Two Timers
5. One Serial Port
6. 4 I/O Ports
7. 6 Interrupt Sources:
Q1d.
Q1e. what is the purpose of watchdog timer in a PIC microcontroller and how is
it used?
The purpose of a watchdog timer in a PIC microcontroller is to monitor the operation
of the microcontroller and reset it if it becomes unresponsive or enters into an
unexpected state.The watchdog timer is typically used to enhance the reliability of the
system by ensuring that the microcontroller continues to operate correctly, even in the
presence of software bugs, glitches, or unexpected conditions.
Q1f.
T = 1/39062.5 = 25.6 µs
Q1g. Name the four signals in SPI bus and specify their roles
The four signals in the Serial Peripheral Interface (SPI) bus are:
Q1h. How many instruction sets does arm have and state their names.
ARM supports Three instruction sets :
ARM (32-bit)
Thumb (16-bit)
Jazzle(8-bit)
Q1i.
R1=0X9A
Preemptive Scheduling:
In preemptive scheduling, the operating system can interrupt a currently running task
to allocate the CPU to another task with higher priority.Tasks are assigned priorities,
and the scheduler selects the task with the highest priority that is ready to run.The
currently running task can be preempted (paused) if a higher-priority task becomes
ready to run.
This instruction moves the immediate value 25h (hexadecimal) into register A.
This instruction moves the contents of the memory location 30h into register A.
If R0 contains 50h, this instruction moves the contents of the memory location 50h
into register A.
Q3a. Draw and explain PORT pin operation for two cases of PIC 18 series
microcontroller. Assume: First case when PIC microcontroller places Logic 0 on
data bus.
STANDARD MODE :
Maximum Data Rate : 100 kbits/s
7-bit Addressing
The Maximum No of Slave 112
FAST MODE :
Maximum Data Rate : 400 kb/s
SCL & SDA Lines : High impedance
HIGH SPEED MODE:
Maximum Data rate : 1.7 Mb/s
3.4 Mb/s
36 times faster than Standard mode
A pipe is a connection from the host controller to a Logical Entity, found on a device
and named “an Endpoint”.
Q4b.
In CAN terminology,
A Logical 1 on the bus is called “recessive” and Logical 0 is “dominant” When all
nodes are transmitting 1’s, the bus is said to be in recessive state,
When a node transmits a “0”, the bus is in the dominant state. Data are sent on the
network in Packets known as Data Frames.
4. Frame Check
Ex : CAN messsage have a fixed format
if a CAN Controller detects an invalid value in one the fileds ( CRC Delimter,
ACK Delimeter) Frame Check error
5. Acknowledgment Check
Message with Dominant “ 0s” level : ACK field
Message with Recessive “1s” : if transmitter can’t detect a dominant level
in the ACK slot, an Acknowledgement error is signalled.
6.Cyclic Redundancy Check (CRC) :
Each Message features 15-bit Cyclic Redundancy Check Sum if any other
node that detects a different CRC message, CRC error
R4 AND 0x25
After execution CPSR registers gets update the flags and Result won’t store in any
register.
Q6a. List out different task state and explain with a state diagram.
Dormant
• If a task remains Unexecuted for a long time or not scheduled for processing
for a long time it is termed as “Dormant”.
.
READY
If any other task with higher priority is getting executed by that time the other task
which is created will have to “WAIT” until the higher priority task execution is
complete.
This state of the task which can be executed but waiting for other one to complete is
called “READY State”.
Running :
When a task is getting executed i.e is being given the processor time, it is referred to
be as running state
Blocked :
When a Task is being executed but at the some point in time it requires some external
I/P, it goes blocked.
It is optimal for scheduling periodic tasks with deterministic execution times when the
system load is less than 100%. RMS guarantees schedulability if the sum of the CPU
utilization of all tasks is less than or equal to the number of processors (for
multiprocessor systems).
RMS does not consider deadlines explicitly, which can lead to task missing deadlines
if overloaded or if tasks have variable execution times.
Earliest Deadline First (EDF):
EDF dynamically adjusts task priorities as deadlines approach, ensuring that tasks with
impending deadlines are scheduled first.
EDF is optimal for scheduling periodic and aperiodic tasks with arbitrary execution
times, as it minimizes the number of missed deadlines under certain conditions. Unlike
RMS, EDF explicitly considers task deadlines, ensuring that tasks meet their deadlines
as long as the system is schedulable.
EDF may suffer from priority inversion and may require additional mechanisms (e.g.,
priority inheritance) to mitigate these issues in practice.
EDF is more flexible than RMS but may incur higher scheduling overhead due to
frequent priority changes.
6(b)
P1 P1 P2
0 10 20 25 30 40 50 55 60 70 75
p1=50 p2=75 p1 p1
P1 P2 P1 P2 P1 P2 P1
0 10 20 25 30 40 50 55 60 70 80 90 100 110 120 125130135 140 150
P1 has earliest deadline, so its initial priority is higher than that of process p2.
P2 begins running at the end of the cpu burst time for p1=25.
P2 Higher priority than p1 because its next deadline at time p2=75
At second deadline p1 at 100 p2 is preempted because p1 has an earlier deadline.
At 125 p2 resumes the execution and completes at 135
1= 25 p2=75 t2=30