Sonsivri

Electronics => Pic C Languages => Topic started by: mpavlica on March 24, 2015, 04:52:46 16:52



Title: S6D1121 and ILI9328 mikroC
Post by: mpavlica on March 24, 2015, 04:52:46 16:52
Hello

I am posting a library (which is still "work in progress") for TFT controllers in subject.
I wrote it in mikroC for PIC18F8722, communication is in 8bit mode.
It has been tested, but please forgive me, some comments are in Serbian and some functions are still not finished, but still enough for start.
Also, if you do a

Code:
     TFT_Reset();
     OcitanID = TFT_readID(0x00);


    switch (OcitanID){
    case 0x1121: S6D1121_Init(); break;
    case 0x9328: ILI9328_Init(); break;
    }



    TFT_Address_set (0,0,239,319);
    TFT_TFTTest();
It will first read ID of a TFT and then init TFT according to read ID.
Also, this should be included

Code:

typedef const struct _font_char_info {
   unsigned char Charwidth;
   unsigned int Offset;
}FONT_CHAR_INFO;
////////////////////////////////////////////////////////////////////////////////

typedef const struct _font_info {
   unsigned int CharacterHeight;
   char StartCharacter;
   char EndCharacter;
   signed char SpaceWidthPixels;
   const FONT_CHAR_INFO  *Descriptors;
   const char  *Bitmaps;
}FONT_INFO;



I used TheDot Factory for font creation

DONT FORGET:
I used LF - 3.3V version of PIC CHIP! This displays should be supplied with 3.3V!! (supply can be 5V because there is a regulator on board, but data bus....)
Included - two photos to demonstrate how TFT works...
I am open for suggestions, comments, improvements...


Title: Re: S6D1121 and ILI9328 mikroC
Post by: forter on March 25, 2015, 05:46:49 05:46
Hi!
I have connected this display to ATmega128 powered with 5V directly - and it works without any problem the whole year.
But may be better to use small resistor 100 ohm/


Title: Re: S6D1121 and ILI9328 mikroC
Post by: Xwing on March 25, 2015, 06:52:39 06:52
Not a good idea to operate at 5V of gpio not 5V tolerant, , the best solution is to use the level shifter, for example HCF4050.