0
\$\begingroup\$

I am new to embedded development, so please bear with me.

I have to interface a TFT display(ILI9341) with PIC18F452, it does not have any controller chip, I want to run a simulation with Proteus before getting the hands dirty with hardware. I am using mikroC PRO for coding PIC controller and trying to use the inbuilt library provided by mikroC for TFT (https://download.mikroe.com/documents/compilers/mikroc/pic/help/tft_library.htm) but I am not able to use the library and the hardware connections at end of the page does not help in how to connect pins to microcontroller.

So I want to ask:

1)Is mikroC good enough for interfacing a touchscreen and taking input from the user or should I use MPLAB-X.

2)How can I connect the pins to PIC controller, I have read the datasheet but I am not able to figure out should I use SPI or 8-bit bus interface and where the pins should be connected.

\$\endgroup\$
1

1 Answer 1

0
\$\begingroup\$

and the hardware connections at end of the page does not help in how to connect pins to microcontroller.

Why do you say that the schematic at the end of the page doesn't help? It is very clear in my opinion. It shows that the library supports an 8-bit parallel connection between the driver chip and the PIC.

2)How can I connect the pins to PIC controller, I have read the datasheet but I am not able to figure out should I use SPI or 8-bit bus interface and where the pins should be connected.

If you want to use the libaray you are saying, then you have to connect the ILI9341 using an 8-bit parallel interface, meaning there will be an 8-bit data bus and some control signals.

You need to go to Chapter 7.6.3. of the datasheet of ILI9341. There it is very clear how to do this.

\$\endgroup\$
6
  • \$\begingroup\$ thank you for the answer, when I said that the connections at the end of the page does not help, I mean that they does not help in understanding how to connect ILI9341, but the connections are for different module, also can you tell me what would be better to use MPLAB-X or mikroC for developing on TFT. \$\endgroup\$
    – bha159
    Commented Jun 24, 2017 at 16:58
  • \$\begingroup\$ Well, what do you have in mind when asking this question? Both use C as programming language. So it is totally irrelevant which of them you will use... \$\endgroup\$
    – nickagian
    Commented Jun 24, 2017 at 18:01
  • \$\begingroup\$ @nickagain I mean which has more flexibility to code for different types of modules as ILI9341 is not listed in mikroC library page, instead, ILI9340 is listed, so will I be able to use those functions with ILI9341 or should I start with MPLAB and code from scratch or MPLAB has some libraries that I can use. If you can give me some sources you know that will be great, since googling is not giving any reliable and easy sources for beginners. \$\endgroup\$
    – bha159
    Commented Jun 24, 2017 at 19:23
  • \$\begingroup\$ There is no such thing as precompiled libraries specific for MPLAB. What you need to do is find somewhere online a C library to drive the ILI9341 (I mean the actual C code, not precompiled) and use it in the MPLAB environment for compilation. The alternative is of course to write your own code. \$\endgroup\$
    – nickagian
    Commented Jun 24, 2017 at 19:51
  • \$\begingroup\$ @nickagain I have this module imgur.com/a/3a72d ,the pins given in this module are different from that given in ILI9341, it does not have IM0, IM1, IM2,IM3 so how should I interface it with PIC. \$\endgroup\$
    – bha159
    Commented Jun 26, 2017 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.