RA8806
Preliminary Version 1.0
Two Layers Character/Graphic LCD Controller
6-4-2 Manual Mode
The “ Manual Mode” means that the operation process from “Touch event checking function” to
“input Latch X data Y data”, the whole operation and setting process ( includes TPCR2[1:0]) and
receiving data from XY coordinates are manual operated by programmer. The advantage of using
Manual Mode is it allows programmer more flexible applications. In the condition that is over the
range of RA8806 register setting, the user can still use the software method to control the TP
function in a correct way.
Touch Event can be detected from “Interrupt Mode” or “Polling Mode” that depend on the system
configuration. The difference between the “Interrupt Mode” and “Polling Mode” are explained as
following.
6-4-2-1 External Interrupt Mode
Under the “Interrupt Mode” the touch event detecting way is almost the same as “ Auto Mode”. The
major processes are list as follows:
1. Enable Touch Panel function.
2. Change mode to “Manual mode”.
3. Set the switch to 「Wait for touch event 」, Set TPCR2[1:0] to 01b.
4. When interrupt asserts, check if TP interrupt.
5. If yes, change the switch to 「Latch X data」, Set TPCR2[1:0] to 10b, wait for enough time
to make the latch data stable and latched to TPXR and TPZR.
6. Change the switch to「Latch Y data」, Set TPCR2[1:0] to 11b, wait for enough time to
make the latch data stable and latched to TPYR and TPZR.
7. Read X, Y data from TPXR, TPYR and TPZR, and clear the interrupt status.
The registers for Interrupt Mode are explained as below:
Table 6-12
Reg.
Bit_Num
Bit 7
Description
Reference
TPCR1
Enable Touch Panel function
REG[C0h]
Bit 7
TP Manual mode enable
TPCR2
INTR
REG[C4h]
REG[0Fh]
Bit [1:0]
Bit 4
Mode selection for TP manual mode
Touch Panel Interrupt Mask
Bit 0
Touch Panel Detect Status bit
TPXR
TPYR
Bit [7:0]
Bit [7:0]
Bit [3:2]
Bit [1:0]
Touch Panel X Data Bit[9:2](Segment)
Touch Panel X Data Bit[9:2](Common)
Touch Panel Y Data Bit[1:0] (Common)
Touch Panel Y Data Bit[1:0] (Segment)
REG[C1h]
REG[C2h]
TPZR
REG[C3h]
RAiO TECHNOLOGY INC.
44/174
www.raio.com.tw