![MEN 04M036N01 Скачать руководство пользователя страница 29](http://html1.mh-extra.com/html/men/04m036n01/04m036n01_user-manual_1770465029.webp)
Functional Description
MEN Mikro Elektronik GmbH
29
5.4.2
Reading Data (without Interrupt)
Because of the continuous sampling clock the A/D converter is converting all the
time and the data are stored temporarily in the buffer. It is always possible to access
the buffer data. In order not to read older values several times, however, the
IRQ
bit
is set to 1. After that, the bit must be polled. When it goes to 0, a measuring cycle
has been completed. The buffer can be read now. A measuring cycle determines the
order by which the data were written into the buffer. It is completed before data
element 0 of the next measuring cycle is read.
Figure 3.
Reading data
5.4.3
Reading Data (with Interrupt)
The procedure is the same as described in chapter 5.4.2, but you have to keep in
mind that the
IRQ
bit determines the state of the
/IRQ
line of the M-Module, which
goes to 1 only when the
IRQ
bit is set. The interrupt should be enabled on the base
board only after the
IRQ
bit has been set to 1. Otherwise, an interrupt is triggered at
once.
Table 11.
Data format (bipolar operation)
Table 12.
Data format (unipolar operation)
V
in
,gain 1
V
in
,gain 2
V
in
,gain 4
V
in
,gain 8
V
in
,gain 16
Output Code
10V
5V
2.5V
1.25V
625mV
0x7FFF
5V
2.5V
1.25V
625mV
312.5mV
0x4000
0V
0V
0V
0V
0V
0x0
-5V
-2.5V
-1.25V
-625mV
-312.5mV
0xC000
-10V
-5V
-2.5V
-1.25V
-625mV
0x8000
V
in
,gain 1
V
in
,gain 2
V
in
,gain 4
V
in
,gain 8
V
in
,gain 16
Output Code
10V
5V
2.5V
1.25V
625mV
0xFFFF
5V
2.5V
1.25V
625mV
312.5mV
0x8000
0V
0V
0V
0V
0V
0x0
Buffer Address
IRQ
CPU sets IRQ
CPU
EF0123456789ABCDEF01234567
CPU
reads
status
reads
buffer