2 basic timer1 operation, 1 basic timer1 counter one, 2 basic timer1 counter two – Texas Instruments MSP430x4xx User Manual

Page 204: 3 16-bit counter mode

Advertising
background image

Basic Timer1 Introduction

11-4

Basic Timer1

11.2 Basic Timer1 Operation

The Basic Timer1 module can be configured as two 8-bit timers or one 16-bit
timer with the BTCTL register. The BTCTL register is an 8-bit, read/write
register. Any read or write access must use byte instructions. The Basic
Timer1 controls the LCD frame frequency with BTCNT1.

11.2.1 Basic Timer1 Counter One

The Basic Timer1 counter one, BTCNT1, is an 8-bit timer/counter directly
accessible by software. BTCNT1 is incremented with ACLK and provides the
frame frequency for the LCD controller. BTCNT1 can be stopped by setting the
BTHOLD and BTDIV bits.

11.2.2 Basic Timer1 Counter Two

The Basic Timer1 counter two, BTCNT2, is an 8-bit timer/counter directly
accessible by software. BTCNT2 can be sourced from ACLK or SMCLK, or
ACLK/256 when cascaded with BTCNT1. The BTCNT2 clock source is
selected with the BTSSEL and BTDIV bits. BTCNT2 can be stopped to reduce
power consumption by setting the HOLD bit.

BTCNT2 sources the Basic Timer1 interrupt, BTIFG. The interrupt interval is
selected with the BTIPx bits

Note:

Reading or Writing BTCNT1 and BTCNT2

When the CPU clock and counter clock are asynchronous any read from
BTCNT1 or BTCNT2 may be unpredictable. Any write to BTCNT1 or
BTCNT2 take effect immediately.

11.2.3 16-bit Counter Mode

The 16-bit timer/counter mode is selected when control the BTDIV bit is set.
In this mode, BTCNT1 is cascaded with BTCNT2. The clock source of
BTCNT1 is ACLK, and the clock source of BTCNT2 is ACLK/256.

Advertising