Question

The following program is used to write data to a printer using the SPP protocol showed below.

void PutChar(unsigned char c)
{
while ((PTJ & 0x02) !=0 );

PTH = c;

PTJ = PTJ & ~0x01;
NOP;
//....
NOP;
PTJ = PTJ | 0x01;
}


DB-Do STRB# ACK# BUSY 8 min, min. 5 min.min. »

How many NOP statements must be used to insure the STRB# line is low for the minimum amount of time if n = 0.5 ?s and the processor takes 5clock tick(s) per instruction with a clock of 10.0 MHz?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

We can see that we have to make it low for 0.5 sec and each clock cycle is 1/10*10^6=100 ns

where ns is nano secs

Then each instruction takes 5*100=500 ns

And Hence 0.5=500ns*n where n is the number of nop instructions

Hence we have 0.5/5 10 =10^6 instructions

Or 10^6 NOP statements

Add a comment
Know the answer?
Add Answer to:
The following program is used to write data to a printer using the SPP protocol showed...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT