ADwin-Gold
USB / ENET, manual version 3.8, October 2005
31
CO1 Counter Add-On
ADwin
8.4.3 Hardware addresses (
CO1
-add-on)
A process can be executed very quickly if you access directly the control and
data register (see chapter 5.3 and
ADbasic
manual). The hardware addresses
of the CO1 add-on can be found in the following table (see command index
table in chapter 8.2).
Fig. 25 – Hardware addresses of the
CO1
counter add-on
Address
[HEX]
Function
Bit
Commentary
31:04 3 2 1 0
20400204 Read out Latch A: Counter 1
x
x x x x
x : Contents of the latch
20400208 Read out Latch B: Counter 1
x
x x x x
20400214 Read out Latch A: Counter 2
x
x x x x
20400218 Read out Latch B: Counter 2
x
x x x x
20400224 Read out Latch A: Counter 3
x
x x x x
20400238 Read out Latch B: Counter 3
x
x x x x
20400234 Read out Latch A: Counter 4
x
x x x x
20400238 Read out Latch B: Counter 4
x
x x x x
20400300 Enable counter
-
x x x x
x = 0 : Disable counter
x = 1 : Enable counter
20400304
Set counter inputs to TTL or
differential mode
(in pairs only)
-
-
- y x
x: counter inputs 1+2
y: counter inputs 3+4
x,y = 0: TTL (single-ended)
x,y = 1: differential
20400310 Clear counter
-
x x x x
x = 0 : No influence
x = 1 : Clear counter
20400320 Latch counter
-
x x x x
x = 0 : No influence
x = 1 : Latch counter
20400330 Input: CLR or LATCH
-
x x x x
x = 0 : CLR input
x = 1 : LATCH input
20400340
Impulse/event counter or
impulse/pause duration mea-
surement
-
x x x x
x = 0 : External clock input
x = 1 : Int. ref. clock(20/5MHz)
20400350
4 edge evaluation/CLK+DIR
or 20/5MHz reference clock
-
x x x x
CNT_MODE = 0:
x = 0 : 4-Fl.; x = 1 : CLK+DIR
CNT_MODE = 1:
x = 0 : 20MHz; x = 1 : 5MHz
20400370 Counter: Error register
a
a. You have to reset this register manually!
several bits
Error bits, see
CNT_GETSTATUS