RA8806
Preliminary Version 1.0
6-4-2-2 Polling Mode
Two Layers Character/Graphic LCD Controller
Under the ”Polling Mode”, users need to decide and set the de-bounce time after the touch event, as
well as the sampling time after latch by considering the real situation, thus more flexibilities for users
apply this mode.
The development procedures are explained as follows:
1. Enable Touch Panel function
2. Change mode to “Manual mode”
3. Set the switch to「Wait for Touch event」, i.e., set TPCR2[1:0] to 01b.
4. Read Touch Panel Event status from status register, check if the “Touch event” happens.
5. When touch event happens, confirm the stability of it and set the switch to 「Latch X data」,
i.e., TPCR2[1:0] set to 10b, wait for enough time to make the latch data stable and latched
to TPXR and TPZR
6. Set the switch to「Latch Y data」, i.e., TPCR2[1:0] set 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 settings for manual interrupt mode are described in the following table:
Table 6-13
Reg.
Bit_Num
Description
Reference
REG[C0h]
TPCR1
Bit 7
Enable Touch Panel function
Select operation mode to Auto-mode or
Manual-mode.
Bit 7
Bit [1:0]
Bit 3
REG[C4h]
REG[0Fh]
TPCR2
INTR
The switch of ADC controller for manual mode
Touch panel event(Only activate in TP Manual
mode)
Bit 0
Touch Panel Detect Status bit
REG[C1h]
REG[C2h]
TPXR
TPYR
Bit [7:0]
Touch Panel X Data Bit[9:2](Segment)
Bit [7:0]
Touch Panel Y Data Bit[9:2] (Common)
Bit [3:2]
Bit [1:0]
Touch Panel Y Data Bit[1:0] (Common)
Touch Panel X Data Bit[1:0] (Segment)
REG[C3h]
TPZR
Programmer can check the status of Touch Panel Event from the Bit-3 or Bit-0 of INTR, the
difference between those two bits is :
1. The Bit-3 of INTR reflects the current Touch status. When Touch event occurs, the Bit-3 is 1.
When there is no Touch event, Bit-3 will be 0 and read only.
2. The Bit-0 of INTR records the Touch status. When a Touch event occurs, the Bit-3 will be 1
and however it won’t be clear automatically, it has to clear by programmer.
It needs to be noted is that the REG[0Fh] Bit-3 is the direct output from ADC circuit, when touch
panel is touched, the bit will respond with the event. When touch event is not stable, it needs to be
de-bounced to check if it’s legal. The bit is only active at “Manual mode”. When setting RA8806 to
“Auto-mode, the touch event will be automatically checked if it’s legal or not. Only the legal touch
event will cause the interrupt.
RAiO TECHNOLOGY INC.
47/174
www.raio.com.tw