Tsev > Xov xwm > Ntsiab lus

Bridgetek BT81X (815/6) Advanced EVE Touch Screen Cav

May 09, 2019

Lub BT815 / 6 kov-npo cav txhawb ob qho sib zog thiab kev ua haujlwm kov lub cev. BT816 txhawb zog
tiv tauj kov thaum, thaum BT815 txhawb kev txhawb zog.

4.8.1 Muaj Kev Tiv Thaiv Kev Tiv Thaiv

Tus kov resistive screen muaj lub vijtsam uas kuaj saib xyuas, ADC, Axis-keyboards, thiab ADC input
multiplexer. Lub vijtsam kov lub tshuab nyeem ntawm commands ntawm daim ntawv qhia kev nco thiab ua rau
yuav tsum tswj kev teeb tsa rau cov axis-keyboards thiab inputs mux thiab ADC. Cov ntaub ntawv hauv ADC tau txais,
ua tiav thiab kho tshiab rau ntawm tus neeg sau npe rau MPU / MCU los nyeem.

image

Lub party tswj ntawm TOUCH SCREEN CAV ua lag luam hom los ntawm kev sau ntawv rau REG_TOUCH_MODE.

image

Lub Vijtsam Kuaj Cov Kws txawb ntawm X thiab Y thiab koom sau npe rau REG_TOUCH_RAW
XY Qhov ntau ntawm cov kev ntseeg no yog 0-1023. Yog tias lub vijtsam tsis txhob muab ntaus, ob qho tib si lub npe sau
65535 (FFFFh).
Cov kev nqis peev no yog hloov mus rau hauv kev tshuaj ntsuam xyuas uas siv cov hauv matrix hauv cov npe
REG_TOUCH_TRANSFORM_A-F. Cov kev pabcuam tom qab-hloov tau muaj nyob hauv kev tso npe
REG_TOUCH_SCREEN_XY. Yog tias lub vijtsam tsis nias tsis tau, ob lub npe sau -32768 (8000h).
Qhov tseem ceeb rau REG TOUCH TRANSFORM AF tej zaum yuav raug siv ua ib qho kev ntsuas hauv kev tshuaj ntsuam.
Yog hais tias qhov screen tau chwv, qhov screen coordinates yuav ntsia hauv daim ntawv lub cim tsis tas, xa tawm
kawg 8-ntsis tag tus nqi, hauv REG KOV TAG. Vim tias daim looks yuav siv ntau tus ncej, thiab kov
cov hauj lwm hloov qhov tsis tu ncua, qhov tseem ceeb (x; y) siv rau tag saib kuj muaj nyob rau hauv
REG_TOUCH_TAG_XY.
Vijtsam tha xim muaj nyob rau hauv REG_TOUCH_RZ. Tus nqi yog qhov tseem ceeb ntawm qhov kov
hu rau, tus nqis qis dua ntawd qhia ntau dua. Tus sau npe tuaj rau 32767 thaum kov tsis tau
kuaj tau. Lub REG_TOUCH_THRESHOLD tuaj yeem teem caij los txais kev kov tsuas yog thaum qhov chaw quab yuam yog
tshaj.

4.8.2 Kev Kov Tiv Thaiv Kaw Tseg

Lub Capacitive Touch Screen Cav (CTSE) ntawm BT815 sib txuas lus nrog rau sab nraud capacitive
kov vaj huam sib luag module (CTPM) los ntawm kev sib tham nrog I 2 C. Lub CTPM yuav qhia nws txoj kab kev sib txuas lus thaum muaj
ib qho kev kuaj pom. Thaum nrhiav tau CTP_INT_N kab tawm, cov BT815 / 6 yuav nyeem cov ntaub ntawv kov los ntawm
I 2 C. Txog rau 5 tshab tuaj yeem raug tshaj tawm thiab muab khaws cia rau hauv BT815 cov npe sau npe.
Cov BT815 CTSE txhawb nqa Focaltech thiab Goodix kov controllers, nrog rau cov tswv yim sib txuas (saib
ntu 4.8.7). Rau ib daim ntawv teev kev txhawb CTPM thov xa mus rau AN_336 FT8xx - Xaiv tus Zaub LCD .
Tus BT815 siv qhov chaw tus nqi I2C nyob rau hauv REG_TOUCH_CONFIG kev sau npe los hloov Focaltech los yog
Goodix kov controllers. Rau Focaltech IC I2C chaw nyob yuav tsum tau muab tso raws li 0x38-0x3F (Piv txwv:
REG_TOUCH_CONFIG = 0x0380), thaum lub sij hawm rau Goodix IC I2C qhov chaw nyob yuav tsum tau muab tso raws li 0x5D (piv txwv:
REG_TOUCH_CONFIG = 0x05D0).

image

Tus tswj tuav lub hom phiaj ntawm CTSE lag luam hom los ntawm kev sau ntawv rau REG_CTOUCH_MODE.

image

Tus BT815 CTSE txhawb hom kev zoo sib xws thiab hom kev ncua. Los ntawm vim lub CTSE sau rau hauv
compatibility hom nyob qhov twg lub kaw lus kov ib qho kev sib tshuam zoo sib xws rau kev kov tsis taus
cav. Nyob rau hauv hom ntev, lub npe ntawm cov npe hu ua raug hloov kho, thiab ob txheej ntawm cov npe yog
raug. Cov khoos phib tawj no muaj ntau txoj kev nrhiav kom tau (txog 5 nphav).

4.8.3 Kev Xiam Hloov

Lub CTSE nyeem tus X thiab Y ib qho ntawm CTPM thiab sau npe mus rau REG_CTOUCH_RAW_XY. Yog tias
qhov kev tshuaj ntsuam kov tsis yog raug ntaus, ob qho tib si sau npe 65535 (FFFFh).

Cov kev nqis peev no yog hloov mus rau hauv kev tshuaj ntsuam xyuas uas siv cov hauv matrix hauv cov npe
REG_CTOUCH_TRANSFORM_A-F. Cov kev pabcuam tom qab-hloov tau muaj nyob hauv kev tso npe
REG_CTOUCH_SCREEN_XY. Yog tias lub vijtsam tsis nias tsis tau, ob lub npe sau -32768 (8000h).
Qhov tseem ceeb rau REG_CTOUCH_TRANSFORM_A-F yuav raug muab siv ua ib qho kev ntsuam xyuas on-screen calibration.
Yog hais tias qhov screen tau chwv, qhov screen coordinates yuav ntsia hauv daim ntawv lub cim tsis tas, xa tawm
kawg 8-ntsis tag nqi, hauv REG_TOUCH_TAG. Vim tias daim looks yuav siv ntau tus ncej, thiab kov
cov hauj lwm hloov qhov tsis tu ncua, qhov tseem ceeb (x; y) siv rau tag saib kuj muaj nyob rau hauv
REG_TOUCH_TAG_XY.

4.8.4 Extended Mode

Qhov chaw REG_CTOUCH_EXTENDED rau 1b'0 enables ncua kev hom. Nyob rau hauv kev ncua ntev txheej txheej tshiab
cov ntawv sau npe muaj nyob rau hauv, pub siv tes taw thiab txog tsib nphav kom nyeem. Muaj ob tug
cov chav kawm ntawm cov npe: tswj kev sau npe thiab kev sau npe. Kev tswj cov ntawv sau tau sau los ntawm MCU.
Xee npe cov npe sau tau los ntawm MCU thiab BT815 / 6 qhov kev kho vajtse tag.
Lub tsib kov coordinates tau ntim hauv REG_CTOUCH_TOUCH0_XY, REG_CTOUCH_TOUCH1_XY,
REG_CTOUCH_TOUCH2_XY, REG_CTOUCH_TOUCH3_XY, REG_CTOUCH4_X thiab REG_CTOUCH4_Y.
Cov kev tswj tuav hauv cov ntawv sau npe yog kos npe 16-qhov tseem ceeb, muaj li ntawm -32768 mus rau 32767. Lub
tsis muaj kev tiv thaiv yog qhia los ntawm x = y = -32768. Cov chaw no twb hloov mus rau hauv kev tshuaj ntsuam
coordinates raws li raw cov ntaub ntawv tau nyeem los ntawm CTPM, siv hauv daim ntawv teev npe hauv cov npe
REG_CTOUCH_TRANSFORM_A-F. Yuav kom tau cov nyom (x, y) tswj nyeem los ntawm CTPM, tus neeg siv teev
REG_CTOUCH_TRANSFORM_A-F cov npe sau rau lub cim matrix.
Lub BT815 / 6 lossis lub tshuab tiav yog tsim los ntawm kev kho vajtse, nyob qhov twg txog 5 cim npe yuav tsum ntsia.


4.8.5 Kev Tiv Thaiv Kab Mob Short-Circuit

Rau nws kov nws nws yog ib qho tseem ceeb los tiv thaiv tus ntiv tes los ntawm kev puas tsuaj mus tas li vim muaj peev xwm luv-circuits
ntawm 4 XY kab. Thaum lub sij hawm luv luv ntawm qhov tshuaj ntsuam kov tau tshwm sim, lub BT816 tuaj yeem ntes nws thiab nres qhov
kov nrhiav haujlwm, tawm hauv 4 XY pins nyob rau hauv lub siab impedance lub xeev.
Txoj kev tiv thaiv luv luv yuav muaj peev xwm ua tau los yog tsis taus los ntawm REG_TOUCH_CONFIG.


4.8.6 Kev Cuam Tshuam Cuam Tseg

Nyob rau hauv qhov system capacitive system qee cov neeg siv yuav tsum kho cov CTPM qhov kev tsim txiaj, xws li
cov npe sau rau ntawm txoj kev xav kov. Ua li no ua raws li cov nram qab no yuav tsum tau ua tiav tom qab nti
pib dua:
- Tuav lub cav kov hauv kev pib dua (teeb tsa REG_CPURESET = 2)
- Sau qhov CTPM configure register chaw nyob thiab tus nqi rau qhov chaw nyob ntawm BT815
- Mus txog 10 qhov chaw sau npe / tus nqi ntxiv tau ntxiv
- Tso lub cav kov pib dua (teem caij REG_CPURESET = 0)
Lub CTPM muaj peev xwm ua tau rau hauv lub xeev qis zog thaum qhov kev ua haujlwm kov tsis yog daim ntawv thov.
Qhov tsawg lub hwj huam qis hauv REG_TOUCH_CONFIG yuav ua rau lub hwj huam qis ntawm CTPM. Thaum
qhov tsawg-qis me ntsis yog cleared, lub BT815 kov cav yuav xa ib qho pib dua mus rau CTPM, yog li rov ua haujlwm tau
kov nrhiav kom muaj nuj nqi.


4.8.7 Lub Vaj Haum Me Uas Yuav Tsum Tau Siv

Yog hais tias tus tswv tsev MCU tuaj yeem muab kev nkag mus rau hauv kov, nws tuaj yeem muab lawv ncaj qha mus rau BT815 siv cov tswv yim kov
hom. Los ntawm kev siv tus qauv tuav hom, ib daim ntawv thov xaiv tau xaiv ib qho kev tswj uas tsis nyob hauv
BT815 cov kev them nyiaj yug ncaj qha. Piv txwv li, Kov ntaus qiv hom yuav tso cai rau lwm tus siv
manufacturers tshaj li Focaltech thiab Goodix.
Siv lub hom tswv yim kov, tus tswv tsev MCU yuav tsum txuas nrog ncaj qha mus kov pawg. Cov plaub kov
cov kab hauv BT815 muaj peev xwm sab nraud txuas rau PCB. Tus tswv tsev MCU yog lub luag haujlwm rau kev sib txuas lus nrog tus neeg saib xyuas kev kov, khaws cov ntaub ntawv ntawm cov ntaub ntawv thaum tau tshaj tawm, thiab sau cov ntaub ntawv kov rau BT815 rau TAG kev nrhiav thiab kev tshaj tawm.

Tus tswv yim kov hom yuav nkag los ntawm qhov chaw teev 14 hauv register REG_TOUCH_CONFIG thiab rov pib dua
kov cav:
- Tuav lub cav kov hauv kev pib dua (teeb tsa REG_CPURESET = 2)
- Sau 1 mus rau seem 14 hauv REG_TOUCH_CONFIG (teev REG_TOUCH_CONFIG = 0x4000)
- Tso lub cav kov pib dua (teem caij REG_CPURESET = 0)

image

Hauv cov tswv yim sib txuas ntawm cov tswv lag luam, tus tswv tsev siv cov ntaub ntawv ntawm plaub lub npe:

image

Tus tswv tsev sau raw (x; y) tswj thiab IDs mus rau saum cov npe. Mus txog 5 tuav tau teem, siv
kov cov ntawv ID 0-4. Tus tswv tsev tsis muaj kev sib txuas los ntawm kev sib koom tes (0x8000; 0x8000). Thaum tus tswv tsev
sau 0xf rau tus ID register, BT815 teev ACK register rau 0, nws hloov tag nrho cov kev sib koom tes, thiab
sau cov ntsiab lus mus rau cov kev sib tham tsis tu ncua.
Pseudocode:

tos kom txog thaum REG_EHOST_TOUCH_ACK yog 1

rau txhua tus kov:

sau x coordinate mus rau REG_EHOST_TOUCH_X

sau y rau coordinate mus rau REG_EHOST_TOUCH_Y

sau daim ID rau REG_EHOST_TOUCH_ID

sau 0xf rau REG_EHOST_TOUCH_ID

Sai sai li BT815 tau hloov dua tshiab ua haujlwm, nws sau 1 rau ACK register thiab teev INT_CONV
_COMPLETE tshev chij.


Tus ID yuav tsum tau xoom ntawm kov hom sib thooj. Tus tswjfwm yuav tsum qhia tias tsis muaj leej twg kov tau txhua yam los ntawm kev sau ntawv
(0x8000; 0x8000) nrog ID 0.
Nyob rau hauv kev ncua ntev, ntau yam kev sib txuas lus tuaj yeem xa tuaj rau txhua qhov kev txiav txim. Cov cim ID tsis raug xa mus rau
yuav tsis nias. Dua, tus tswv tsev yuav tsum tau qhia tias tsis muaj kev sib sau los ntawm kev sau ntawv (0x8000; 0x8000) nrog ID 0.
Tus tswv tsev siv tau peb txoj kev los xyuas kom meej tias BT815 npaj txhij txais kov hauv kev siv:

1. xaiv lub npe ntawm ACK mus txog thaum nws yog 1

2. siv INT_CONV_COMPLETE interrupt flag

3. mov nphav dua qeeb tshaj li 1000 Hz, vim BT815 lav ua cov txheej txheem kov hauv qab 1 ms. Nco ntsoov tias daim ntawv qhia txog cov nqi ntawm cov khoom siv hluav taws xob tseem ceeb yog txog 100 Hz


Ib yam li cov tsav tsheb ncaj qha, qhov kev sib tshuam hauv hom kev ua haujlwm no tau ua haujlwm thaum REG_CTOUCH_EXTENDED yog ob qho tib si
CTOUCH_MODE_EXTENDED thiab CTOUCH_MODE_COMPATIBILITY. CTOUCH_MODE_COMPATIBILITY
yuav tsum raug siv rau txoj kev ua kom raws li, thaum uas siv cov kev pabcuam yug tsiaj ntawv. Tom qab hloov lawm
hom, lub BT815 kov cav yuav tsum pib dua.


4.8.8 Kaw Tes Tawm Hauv Zog-Xeev

Thaum lub BT815 / 6 yog nyob rau hauv tsis muaj HAIS XEEB, kev tshwm sim kov tau tseem tuaj yeem kuaj thiab qhia rau tus tswv tsev
los ntawm INT_N tus pin. Hauv lwm lo lus, muaj kev tshwm sim kov tau lub tswv yim yog tias xav tau.
Rau kev kov tsis tau, INT_N tus pin yuav tau khov tsis qis thaum qhov screen kov, tsis hais txog qhov twg
qhov chaw ntawm qhov kev sib tshuam npe. Qhov no yuav tshwm sim thaum lub BT816 nyob hauv STANDBY lossis SLEEP xeev, tab sis tsis yog
nyob hauv POWERDOWN lub xeev.
Rau kev siv capacitive, INT_N tus pin yuav ua raws li CTP_INT_N tus pin thaum BT815 nyob hauv STANDBY, SLEEP lossis
POWERDOWN lub xeev.