switch analog pin to digital pin? (resistive touch screen controller)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JaWa_4152831
Level 3
Level 3
10 replies posted 10 questions asked 5 replies posted

using...

Windows 10

PSoC Creator 4.2

PSOC 63

MCU: CYBLE-416045-02

I am trying to read from a 4 wire resistive touch screen. I found an app note that shows the pin configureations

https://www.cypress.com/file/134996/download

It requires 4 pins two analog and two digital

to read from both X and Y directions on the screen you need to switch the digital and analog pins (digital to analog and analog to digital)

this is my problem when I try to switch the pins and read the other dimension the readings are random ranging from 0xFF00 to 0x1000

when I use only one direction without trying to change the pin drive mode it works fine, but then  cant read touch location.

attached is my project.

What am I missing?

thank you.

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi JaWa_4152831​,

Please find the below sample code that changes between analog input to digital output at pre-defined time intervals. Please let me know if this helps.

Regards,

Bragadeesh

Regards,
Bragadeesh

View solution in original post

1 Reply
lock attach
Attachments are accessible only for community members.
BragadeeshV
Moderator
Moderator
Moderator
First question asked 1000 replies posted 750 replies posted

Hi JaWa_4152831​,

Please find the below sample code that changes between analog input to digital output at pre-defined time intervals. Please let me know if this helps.

Regards,

Bragadeesh

Regards,
Bragadeesh