![](http://datasheet.mmic.net.cn/370000/-PD30101_datasheet_16680756/-PD30101_320.png)
CHAPTER 19 PIU (TOUCH PANEL INTERFACE UNIT)
287
MainBattCheck state
This is the state for measuring the voltage of the main battery. After obtaining voltage
detection data by starting the A/D converter, DMA transfer is performed to the memory t
generate DataRdyIntr. After the data transfer, the PIUSEQEN bit is activated automatically
to go to the Standby state.
SubBattCheck state
This is the state for measuring the voltage of the sub battery. After obtaining voltage
detection data by starting the A/D converter, DMA transfer is performed to the memory t
generate DataRdyIntr. After the data transfer, the PIUSEQEN bit is activated automatically
to go to the Standby state.
Command state
This is the state for operating the A/D converter by an arbitrary setting. Operation is the
same as that of the Main/SubBattCheck state except that this state enables arbitrary setting
of external circuit control signal PENCNT and command to the A/D converter, ADCMD.
Setting of PENCNT and ADCMD is performed by the PIUCMDREG.
WaitPen Touch state
This is the state for waiting the "Touch" state of the touch panel. When the PIU has detected
the "Touch" state, PenChgIntr, an internal interrupt of the PIU, occurs. In this case, if the
PadAutoScan bit is active, the shift to the PenDataScan state occurs. If TClock stops during
the WaitPen Touch state, the shift to the Suspend mode for detecting the state of the panel
is enabled.
Note
Conditions for the shift to the PenDataScan state
Because the occurrence of PenChgIntr and the detection of the condition for state
shift have different timings, the, even if the "Touch" state is set when PenChgIntr
occurs, the state shift does not occur in case where "Release" is set when the
condition for state shift is detected. The timing of the detection of the condition for
state shift is approx. 4 ADCLK after the occurrence of PenChgIntr.
PenDataScan state
This is the state for detecting coordinates on the touch panel. Four or five data for a one
coordinate (when PADSCANTYPE = 1) are sampled by operating the A/D converter. DMA
transfer to the memory occurs for each data and, after the data for one coordinate has been
sampled, DataRdyIntr is generated.
Note 1. Because the scan sequencer does not stop even if the DMA request by
PenIntr+PadStopAtPage or PenEndIntr is masked, overwrite of sampling data may
occur on the PUDDATAREG. When an overwrite has occurred, PadDataLosIntr is
generated.
2.
When PadDataLosIntr has been generated, DataRdyIntr is generated even if the
number of DMA transfers is less than the specified number and state shift occurs.
However, if the DMA mask is set, DataRdyIntr is not generated and state shift
cannot occur.