Motorola MVME1X7P User Manual

Page 74

Advertising
background image

1-48

Computer Group Literature Center Web Site

Programming Issues

1

1.

Set up Tick Timer:

2.

Set up local bus interrupter:

Step

Register and Address

Action and Reference

1

Prescaler Control register
$FFF4004C

If not already initialized by the debugger, initialize as
follows: Prescaler register = 256–Bclock (MHz). This
gives a 1 MHz clock to the tick timers. Bclock is the bus
clock rate, such as 25MHz.
256–25 = $E7.

2

Tick Timer 1
Compare register
$FFF40050

For periodic interrupts, set the Compare Register value =
Period (s). For example, if you want an interrupt every
millisecond, set the register value to 1000 ($3E8). Refer
to the

Tick Timer 1 Compare Register

description in

Chapter 2.

3

Tick Timer 1
Counter register
$FFF40054

Write a zero to clear the register.

4

Tick Timer 1
Control register
$FFF40060 (8 bits)

Write $07 to this register (set bits 0, 1, and 2). This
enables the Tick Timer 1 counter to increment, resets the
count to zero on compare, and clears the overflow
counter.

Step

Register and Address

Action and Reference

5

Vector Base register
$FFF40088 (8 of 32 bits)

If not already initialized by the debugger, set Interrupt
Base register 0 by writing to bits 28-31. Refer to the

Vector Base Register

description and to Table 2-4, Local

Bus Interrupter Summary, in Chapter 2.

6

Interrupt Level register 1
(bits 0-7)
$FFF40078 (8 of 32 bits)

Write desired level of Tick Timer 1 interrupt to bits 0-2.

7

Local Bus Interrupter
Enable register
$FFF4006C (8 of 32 bits)

Set bit 24 (ETIC1) to 1 to enable Tick Timer 1 interrupts.

8

I/O Control Register 1
$FFF40088 (8 of 32 bits)

Write a 1 to bit 23 to enable interrupts from the
VMEchip2. A 0 masks all interrupts from the VMEchip2.

Advertising