![Infineon Technologies TC1796 Скачать руководство пользователя страница 1957](http://html1.mh-extra.com/html/infineon-technologies/tc1796/tc1796_user-manual_20554371957.webp)
TC1796
Peripheral Units (Vol. 2 of 2)
Analog-to-Digital Converter (ADC)
User’s Manual
25-26
V2.0, 2007-07
ADC, V2.0
The queue is automatically filled by writing valid data to the queue register QR. Valid data
means that at least the V bit is set, while “zero” is a valid option for the external
multiplexer setting, the resolution control bit field and the channel number. Valid data in
the queue register (QR.V, QR.GRPS, QR.EMUX, QR.RES and QR.CHNR data) is then
copied to the next empty queue element determined by the queue level pointer
STAT.QLP. The queue load operation causes the valid bit in the queue register to be
cleared automatically. Any software access to the queue register is denied during this
copy operation. No queue load is performed if the queue state is full (STAT.QF is set)
and the queue register contains valid data.
As shown in
, queue elements zero to five contain valid data; therefore, the
queue register’s contents are copied to queue element six.
The queue level pointer STAT.QLP indicates the number of valid queue elements. It is
incremented after a queue load operation. It is decremented after a queue based
conversion is started or after the queue participation flag is cleared. STAT.QLP is
cleared after a queue reset operation by setting the queue reset bit. Note that there are
sixteen valid queue elements in the queue if the queue level pointer is 0F
H
and the queue
full bit is set.
The queue warning limit pointer CON.QWLP can be used to generate service requests,
based on a queue element state change. The value of the queue warning limit pointer
must be programmed with a value “n” in order to focus on a state change from valid to
invalid of queue element “n”. A queue based service request can be triggered in this
case, thus requesting the next transfer of data to the queue. If the queue element
specified by (CON.QWLP)+1 becomes invalid after a conversion, the module service
request flag MSS1.MSRQR is automatically set. The service request destination node
pointer (PQR) must be configured and enabled (ENPQR) in order to trigger a service
request node assigned to the queue.
The conversion request source “Queue” consists of the queue status register QUEUE0,
a backup register, and a queue arbitration participation flag AP.QP, as shown in
. The contents of queue element number zero are represented in the queue
status register QUEUE0. Therefore, set/clear actions of the valid-bit of the queue status
register QUEUE0 are also performed on queue element zero.
If at least one queue element contains valid data, this (these) valid bit(s) cause(s) the
queue arbitration participation flag to be set. This informs the arbiter to include the
conversion request source “Queue” into arbitration. If “Queue” is the arbitration winner,
a conversion is started for the analog channel specified within the queue status register.
The settings of the external multiplexer and the resolution of the A/D Converter are also
derived from this register.
Starting a queue based conversion causes the valid bit of the queue status register
QUEUE0 to be cleared by the arbiter. The contents of all queue elements containing
valid data slides one step down. For example, queue element one contains valid data,
this data “slides down” to queue element zero. Queue based conversion requests are