Well, to report , I built a kind messy interface board.
(for several silly reasons, couldnt find appropriate cables, blabla ,disregard that
) and finally connected the LCD to the 18F45K20. Then I took the sample code provided by the manufacturer (for another micro), analyzed it and rewrote it for the PIC. Then I tried clearing the screen and drawing a rectangle.
Good news: the rectangle got draw successfully.
Bad news: The clear screen function does not work properly. (only a part of the screen got clear)
The drawing is a bit slow (specially for the clear function)
I guess, the slowness is not really a problem since I am running the PIC at default speed which is low (1MHz) and all I need is to speed it up.
Right now I am concerned about the clear function so I am going to reread the ILI9325 datasheet to see what is wrong.
I noticed that all functions (except the clear screen) do the following: write an "index" ( a command I suppose) and then write the data (color for example). Then repeat again if necessary
The clear screen function first write an index, and then enters a for loop with each iteration writing data . Which does not work since it clears only 1/5 of the whole screen...
Also , debug does not work. First of all sometimes delay functions ruin debug, and on top of that, even if I run it in debug mode, the results are different,. The screen becomes really small and the rectangle is not draw. So I stopped using debug...
Will update my findings.