Design a circuit to detect when 3 and only 3 bits are set
out of 8 bits.(eg. o0101100)
Answers were Sorted based on User's Feedback
Answer / gautam
Sorry thr was a bit mistake. Corrected :
MOV XAR1, #Data
MOV XAR0, #0
MOV XAR2, #0
Loop:
TBIT *XAR1, *XAR2
BF Loop1, NTC
INR *XAR0
Loop1:
INR *XAR2
MOV AL, *XAR0
CMP AL, #0x03
BF Loop3, EQ
MOV AL, *XAR2
CMP AL, #0x80
BF Loop, NEQ
Loop3:
EXIT
| Is This Answer Correct ? | 0 Yes | 3 No |
Answer / gautam
I have modified it a bit,
MOVL XAR1, #Data
MOVL XAR0, #0x00
MOVL XAR2, #0x00
Loop:
TBIT *XAR1,#XAR2
BF Loop1, NTC
INR AR0
Loop1:
INR AR2
MOV AL, *XAR0
CMP AL, @0x03
BF Action, EQ
MOV AL, *XAR2
CMP AL, @0x08
BF Loop, NEQ
Loop3:
EXIT
Action:
| Is This Answer Correct ? | 0 Yes | 5 No |
Tell me what are the qualifiers in c?
Explain what is interrupt latency? How can you reduce it?
How can to check the working of a sensor deployed in a project?
What is the function of watchdog timer in embedded system?
What happens when recursive functions are declared inline?
You have two computers, and you want to get data from one to the other. How could you do it?
Explain me what are the rules followed by mutexes?
What do you do when you get stuck with a problem you can't solve?
Have you designed ui, user interface?
What is the volatile keyword used for?
What is a 'volatile' variable?
Explain the concept of convention over configuration, and talk about an example of convention over configuration you have seen in the wild.