(i) What is the purpose of the Stack block? (ii) What is the size of each memory
ID: 2082355 • Letter: #
Question
(i) What is the purpose of the Stack block? (ii) What is the size of each memory location in the Program Memory? (iii) What is the purpose of the 1-bit wire connection from the STATUS Reg to Addr MUX? (iv) Describe the bits of the STATUS Register as shown in Figure 2(d)(iv). (v) Write the section of code in Assembly Language needed to: configure bits 0, 1 and 2 of PORTA, and bits 0, 1, 2, 3 and 4 of PORTB as digital input bits, bits 5 of PORTB as analogue input bits, and all other bits as output bits.Explanation / Answer
i- Stack block is also used to store data but in last in first out manner. During any interrupt the interrupted data is stored in the stack.
ii- In this program memory the size of each memory location is 14 bits. As shown in figure "8k×14" means 8k memory locations of 14bit size.
ii- This connection provide information to adddr mux regarding the status of arithmetic operations of processor.
iv -- If during some processor operation carry occurs then the bit 0 is set to 1. This is called carry bit.
-- Bit 1 is called the digital carry. It is set to 1 if the carry occurs from the 4rth low order bit of the result.
-- bit 2 is called zero but. When the result is zero it is set to 1 otherwise 0.
-- bit 3 is called power down bit. When the power is up it is set to 1. After sleep instruction it is set to 0.
-- bit 4 is called time out bit. It is set to 1 after CLRWDT instruction or sleep instruction but set to 0 when WDT timeout occurs.
-- bit 5 and bit 6 are called register bank select bit. They select the registers for operations for direct addressing.
-- bit 7 also select registers but for indirect addressing.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.