Looking for a Touchscreen controller driver written in C18 for PIC

Status
Not open for further replies.
The original library was written for PIC32, using C32. Since you are using C18 there will be some changes need to be made.

Can you copy and paste the errors maybe?
 
Please post your init and reading functions.

Hang up during init function could be due to a wrong SPI setting : clock too fast or wrong CPOL setting.

I've also experienced these issues last weeks, do you have a logic analyser, it helps a lot to debug SPI problems.

Edit : one more trick, if you use other SPI devices in your project, these could have different SPI settings.

You should save the SPI settings in use before applying new ones and restore them afterwards.
This has to be done for each SPI function ( init and reading ) you're going to use.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…