1

Programming Issues

1.Set up Tick Timer:

Step

Register and Address

Action and Reference

 

 

 

1

Prescaler Control register

If not already initialized by the debugger, initialize as

 

$FFF4004C

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

For periodic interrupts, set the Compare Register value =

 

Compare register

Period (s). For example, if you want an interrupt every

 

$FFF40050

millisecond, set the register value to 1000 ($3E8). Refer

 

 

to the Tick Timer 1 Compare Register description in

 

 

Chapter 2.

 

 

 

3

Tick Timer 1

Write a zero to clear the register.

 

Counter register

 

 

$FFF40054

 

 

 

 

4

Tick Timer 1

Write $07 to this register (set bits 0, 1, and 2). This

 

Control register

enables the Tick Timer 1 counter to increment, resets the

 

$FFF40060 (8 bits)

count to zero on compare, and clears the overflow

 

 

counter.

 

 

 

2.Set up local bus interrupter:

Step

Register and Address

Action and Reference

 

 

 

5

Vector Base register

If not already initialized by the debugger, set Interrupt

 

$FFF40088 (8 of 32 bits)

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

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

 

(bits 0-7)

 

 

$FFF40078 (8 of 32 bits)

 

 

 

 

7

Local Bus Interrupter

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

 

Enable register

 

 

$FFF4006C (8 of 32 bits)

 

 

 

 

8

I/O Control Register 1

Write a 1 to bit 23 to enable interrupts from the

 

$FFF40088 (8 of 32 bits)

VMEchip2. A 0 masks all interrupts from the VMEchip2.

 

 

 

1-48

Computer Group Literature Center Web Site

Page 74
Image 74
Motorola MVME1X7P manual To the Tick Timer 1 Compare Register description