Design a circuit to detect when 3 and only 3 bits are set
out of 8 bits.(eg. o0101100)

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between embedded systems and the system in which rtos is running?

549


What is interrupt latency and how can we decrease it?

447


Differentiate between mutexes vs semaphores.

478


Have you designed ui, user interface?

438


What is the difference between a web server, web farm and web garden? How would your web application need to change for each?

453






Why would you choose java in embedded systems?

414


Infinite loops often arise in embedded systems. How does you code an infinite loop in c?

794


What happens when recursion functions are declared inline?

452


What are the advantages and disadvantages of embedded system?

528


What are the commonly found errors in embedded systems?

429


If a system goes blank, how do you debug it?

1403


Tell me can structures be passed to the functions by value?

445


Can we put breakpoint inside isr?

417


Tell me what are the functional requirements that are used in the embedded systems?

434


Explain the concept of convention over configuration, and talk about an example of convention over configuration you have seen in the wild.

407