beautypg.com

Measurement Computing CIO-PDMAxx User Manual

Page 15

background image

5.1.4 8254 COUNTER LOAD & READ REGISTERS

COUNTER 0
BASE ADDRESS + 4

304h, 772

10

D0

D1

D2

D3

D4

D5

D6

D7

0

1

2

3

4

5

6

7

COUNTER 1
BASE ADDRESS + 5

305h, 773

10

D0

D1

D2

D3

D4

D5

D6

D7

0

1

2

3

4

5

6

7

COUNTER 2
BASE ADDRESS + 6

306h, 774

10

D0

D1

D2

D3

D4

D5

D6

D7

0

1

2

3

4

5

6

7

The data in the counter read register, and the action taken on the data in a counter load
register, is wholly dependent upon the control code written to the control register.

The counters have 16-bits, each with an 8-bit window, the read / load register. Data is
shifted in and out of the 16-bit counters through these 8-bit windows according to the
control byte.

You will need an 8254 data sheet if you want to program the 8254 directly in
assembly language or in BASIC or some other high level language.

5.1.5 COUNTER CONTROL REGISTER

BASE ADDRESS + 7

307h, 775

10

BCD

M0

M1

M2

RL0

RL1

SC0

SC1

0

1

2

3

4

5

6

7

WRITE ONLY

SC1 to SC0 are the counter select bits. They are binary coded between 0 and 2.

SC1

SC0

Counter

0

0

0

0

1

1

1

0

2

11