Hallo,
habe ein Display 7" mit einem Touch Controller TSC2046 und bekomme es nicht zum laufen. Mein letztes hatte den XPT2046.
Hier meinen Code:
'Inerupt Touch Controller:
Const Use_touch = 1 'use Touch = 1Dim Touch_flag as bit
On Int4 Touch_int
Config Int4 = RISING
Enable Int4
Enable Interrupts
'Pins Touch Controler
Clock Alias PortH.3 TSC2046 Clock Pin
Cst Alias PortE.3 'TSC2046CS Pin
Din Alias Portg.5 'TSC2046 Dout Pin
'bussy porth.4
Dout Alias PortE.5 'TSC2046 Din Pin
' d irq port e.4
Config Din = Input
Config Clock = Output
Config Cst = Output
Config Dout = Output
Cst = 1
Dim Touchx As Word
Dim Touchy As Word
Dim X_dout As Byte '&B10010101
X_dout = &HD0 '&B10010101
Dim Y_dout As Byte 'H90 = B10010000
Y_dout = &H90 'HD0 = B11010000
Dim Ende As Byte
Bräuchte Hilfe
Gruß Jörg
habe ein Display 7" mit einem Touch Controller TSC2046 und bekomme es nicht zum laufen. Mein letztes hatte den XPT2046.
Hier meinen Code:
'Inerupt Touch Controller:
Const Use_touch = 1 'use Touch = 1Dim Touch_flag as bit
On Int4 Touch_int
Config Int4 = RISING
Enable Int4
Enable Interrupts
'Pins Touch Controler
Clock Alias PortH.3 TSC2046 Clock Pin
Cst Alias PortE.3 'TSC2046CS Pin
Din Alias Portg.5 'TSC2046 Dout Pin
'bussy porth.4
Dout Alias PortE.5 'TSC2046 Din Pin
' d irq port e.4
Config Din = Input
Config Clock = Output
Config Cst = Output
Config Dout = Output
Cst = 1
Dim Touchx As Word
Dim Touchy As Word
Dim X_dout As Byte '&B10010101
X_dout = &HD0 '&B10010101
Dim Y_dout As Byte 'H90 = B10010000
Y_dout = &H90 'HD0 = B11010000
Dim Ende As Byte
Bräuchte Hilfe
Gruß Jörg
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von JOJO150272 ()