Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Given the following values, what is the 9S12 doing? LSTRB# 0 PORTA = 0xF1 PORTB

ID: 2293470 • Letter: G

Question

Given the following values, what is the 9S12 doing? LSTRB# 0 PORTA = 0xF1 PORTB = 0xE2 ECLK 0 Table 1. LSTRB, ADDR[0], and R/W Decode LSTRB ADDRI0] R/W Type of Access Mnemonic R8H R8L W8H W8L R16 RLH W16 WLH 1 8-bit read of an even address 1 8-bit read of an odd address 0 8-bit write of an even address 0 8-bit write of an odd address 1 16-bit read of an even addsess 16-bit read of an odd address (low/high data swapped) 0 16-bit write to an even address 16-bit write to an odd address (low/high data swapped) 0

Explanation / Answer

Answer :- Here we have Low Strobe Enable(nLSTRB) = 0, (Read / nWRITE) = 1 so it is a read operation, for write operation it must be zero. The ADDR[0] is same as LSB of PORTB which is 1.

Thus from table we get the operation is :- 8-bit read of an odd address.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote