Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 25, 2024, 01:41:05 13:41


Login with username, password and session length


Pages: [1]
Print
Author Topic: S6D1121 and ILI9328 mikroC  (Read 3995 times)
0 Members and 1 Guest are viewing this topic.
mpavlica
Newbie
*
Offline Offline

Posts: 25

Thank You
-Given: 31
-Receive: 3


« 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...
Logged
forter
Active Member
***
Offline Offline

Posts: 136

Thank You
-Given: 995
-Receive: 26


« Reply #1 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/
Logged
Xwing
Active Member
***
Offline Offline

Posts: 208

Thank You
-Given: 576
-Receive: 1529



« Reply #2 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.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC