<aside> <img src="/icons/map-pin_gray.svg" alt="/icons/map-pin_gray.svg" width="40px" /> Relevant Notes/Resources:
1 Introduction to the HCS12 Microcontroller
$\vdots$
14 Internal Memory Configuration and External Expansion
</aside>
These m/c questions are from F2020 exams.
The program starting address is fetched form the stack pointer
The program starting address is fetched from a fixed memory location
Refer to 1.6.2 of the textbook. The HCS12 microcontroller from Freescale fetches the program starting address from memory locations at
0xFFFE
and0xFFFF
into PC and then start program execution from there.
The program starting address is fetched form an interrupt service routine
dc.b $16
?
1 Byte
Refer to
DB
(define byte),DC.B
(define constant byte), andFCB
(form constant byte).. The following directivedc.b
is used to define the value of a byte that will be placed at a given location.
16 Bytes
32 Bytes
movb #$FC, $1020
the Negative Bit (N) in the CCR register will be:
set
cleared
not affected
Refer to Instruction Set. Just search for the
movb
instruction and check the condition code column.
SCI
Refer to 9 Serial Communication Interface. Somewhat of trick question — “Asynchronously” for SCI, “synchronously” for SPI, and “half-duplex” for IIC.
SPI
IIC
jmp label
instruction is executed, the following operations follow:
The Program Counter PC is recovered from the stack.
The Program Counter PC is overridden by the jump target.
Refer to Instruction Set. Find the
jmp
instruction and check the operation.
The return address and all of the CPU registers are saved in the stack
This mode uses 1 byte to specify the address.
Refer to 1 Introduction to the HCS12 Microcontroller or Instruction Set. The first page explains the different address mode notations.
This mode uses 2 bytes to specify the address.
This mode uses sum of index register and an offset to specify the effective address.
2K Bytes
1024 Bytes
Refer to 14 Internal Memory Configuration and External Expansion. $2^{10} = 1024$, not a hundred percent sure about this one.
512 Bytes
Some random questions I’ve picked in F2020 and F2021 exams.
$0800
in the address area. Determine the last address (in Hex) of the EEPROM. Write this last address (in Hex) in the box below (use Upper case for A, B, C, D, E, F):$0FFF
The contents of memory locations at addresses $2401
, $2402
and $2403
, are respectively $04
, $06
, and $38
. What is the content of Accumulator A (in Hex) after execution of the following instructions?
ldx #$2403
ldaa 1,-x
adda 1,-x
$06 + $04 = $0A
#32