Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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?
 
Can you step through the program and find out where it hangs?
 
Last edited:
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.

Latest threads

New Articles From Microcontroller Tips

Back
Top