Question: Assume the processor consumes 3 2 mA during normal operation, 8 mA at the idle mode, and 3 0 uA at the sleep mode. Consider

Assume the processor consumes 32mA during normal operation, 8mA at the idle mode, and
30uA at the sleep mode. Consider the following code:
main (){
_SWDTEN =1; // Enable watchdog timer
while (1){
asm(pwrsav#0); // idle mode
task1();
}
Assumptions :
(1) The Watchdog Timer (WDT) prescaler N1(WDTPRE) divides by 32 and postscaler N2
(WDTPOST) divides by 100.
(2) The time taken by the function task1() is 10 us.
(a)[2] Compute the WDT timeout
WDT timeout =1/32768* N1* N2=(32*100)/32768=0.09765625 s
(b)[3] Compute the approximate percentage of time in which the processor is in the sleep
mode and normal mode
Normal mode time percentage =100*10us /(10us +09765625)=0.01%
Sleep mode time percentage =100*1s /(10us +09765625)=99.99%
(c)[3] Compute the average current consumption.
Average current =30uA *0.9999+32mA *0.01=33.2 uA

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!