Datasheet

Memory
MC68HC908QYA/QTA Family Data Sheet, Rev. 3
28 Freescale Semiconductor
2.5 Random-Access Memory (RAM)
This MCU includes static RAM. The locations in RAM below $0100 can be accessed using the more
efficient direct addressing mode, and any single bit in this area can be accessed with the bit manipulation
instructions (BCLR, BSET, BRCLR, and BRSET). Locating the most frequently accessed program
variables in this area of RAM is preferred.
The RAM retains data when the MCU is in low-power wait or stop mode. At power-on, the contents of
RAM are uninitialized. RAM data is unaffected by any reset provided that the supply voltage does not drop
below the minimum value for RAM retention.
For compatibility with older M68HC05 MCUs, the HC08 resets the stack pointer to $00FF. In the devices
that have RAM above $00FF, it is usually best to reinitialize the stack pointer to the top of the RAM so the
direct page RAM can be used for frequently accessed RAM variables and bit-addressable program
variables. Include the following 2-instruction sequence in your reset initialization routine (where RamLast
is equated to the highest address of the RAM).
LDHX #RamLast+1 ;point one past RAM
TXS ;SP<-(H:X-1)
Table 2-1. Vector Addresses
Vector Priority Vector Address Vector
Lowest
Highest
IF22-
IF16
$FFD0,1-
$FFDC,D
Not used
IF15 $FFDE,F ADC conversion complete vector
IF14 $FFE0,1 Keyboard vector
IF13 Not used
IF12 Not used
IF11 Not used
IF10 Not used
IF9 Not used
IF8 Not used
IF7 Not used
IF6 Not used
IF5 $FFF2,3 TIM overflow vector
IF4 $FFF4,5 TIM channel 1 vector
IF3 $FFF6,7 TIM channel 0 vector
IF2 Not used
IF1 $FFFA,B IRQ
vector
$FFFC,D SWI vector
$FFFE,F Reset vector