
S1C88409 TECHNICAL MANUAL
EPSON
165
CHAPTER 5: PERIPHERAL CIRCUITS AND OPERATION (Touch Panel Controller)
5.17.5 Touch panel controller control flow
Figure 5.17.5.1 shows the control flow for the touch
panel controller
Initial setting
Turn the pen-down check on (PDC = 1).
Enable the pen-down interrupt.
Disable the pen-down interrupt.
Turn the pen-down check off (PDC = 0).
Start clock input to the A/D converter,
and touch panel controller.
Turn clock input to the A/D converter,
and touch panel controller off.
Start coordinate detection by
the touch panel controller (RST = 1).
Enable the data update interrupt.
Disable the data update interrupt.
Turn the touch panel controller off (RST = 0).
Read the coordinate data, and perform
drawing process etc.
Pen-down
interrupt
YES
NO
Data update
interrupt
YES
NO
End
NO
Fig. 5.17.5.1 Touch panel controller control flow
Initial setting
Set the following registers.
Setting other circuits
OSCC: Write "1" to turn the OSC3 oscillation
circuit on.
PSAD: Select an A/D converter operating clock.
PSTP:
Select a touch panel controller operating
clock.
VRC:
Write "1" to enable the AVREF control by
the touch panel controller.
IOC30–IOC37, P30D–P37D:
Configure the terminal for switching the
AVREF voltage of the A/D converter on
and off. Any I/O port frpm P30 to P37
which is not used for inputting analog
signals can be used for this control. Set the
I/O port in the output mode and write "1"
to the data register.
Setting touch panel controller
CONST: Select either constant speed mode or
normal mode.
AVN:
Set a number of A/D conversions for an
arithmetic mean when the controller is
used in the constant speed mode.
WAIT:
Set a waiting time for voltage stabilization.
CND:
Set a threshold value for noise judgment.
PUD:
Set a threshold value for pen-up decision.
MVH, MVMH, MVML, MVL:
Set threshold values for drawing speed
judgment when the controller is used in
the normal mode.
IVL:
Set an interval time.
Setting for interrupt
PTP:
Set a priority level of the touch
panel controller interrupt.
FTPPD, FTPDR: Write "1" to reset the touch panel
controller interrupt factor flags.
ETPPD, ETPDR: Write "1" to enable the touch
panel controller interrupt.
To avoid unnecessary interrupts during coordinate
detection, disable the A/D converter interrupt.