I really have no experience with the CC3200 so I can't really help you with writing that's code specific for it. But I found that Newhaven display has some pretty good example code for several tft drivers and they are pretty easy to understand:
**broken link removed**
Here's their sample code for the ILI9341, I'm pretty sure you can modify this for your CC3200:
https://www.newhavendisplay.com/app_notes/2-4TFT_ILI9341.txt
Like I mentioned, it's pretty much a matter of sending a series of commands to initialize the display.
I think the basic things you need to remember to keep things simple for now are:
-RD pin should be set high. You don't really need the read strobe to initialize the display (or write data to the screen buffer).
-CS should be low to ensure the chip controller is selected.
So that leaves you with the RS pin, Data port, and the WR pin. These pins are mainly used to (a) write commands and (b) write parameter values.
You'll find in Newhaven's example code that the initialization function mainly uses two other functions:
-TFT_24S_Write_Command
-TFT_24S_Write_Data
I'll try to describe the two:
Code:
void TFT_24S_Write_[B]Command[/B](unsigned int command)
{
GPIO_ResetBits(GPIOC, CS1); //set chip select low. this line can be removed if the CS pin is already kept low
GPIO_ResetBits(GPIOC, RS); // set the [B]RS[/B] pin [B]low[/B]. This means we are sending a [B]command[/B].
GPIO_SetBits(GPIOC, nRD); // set the RD pin high. this line can be removed if the RD pin is already kept high
GPIO_ResetBits(GPIOC, nWR); // set the [B]WR[/B] pin [B]low[/B] to prepare for writing
GPIO_Write(GPIOB, command);// place the 'command' to the data port
GPIO_SetBits(GPIOC, nWR); // toggle the [B]WR[/B] pin [B]high[/B] to complete the write.
TFT_delay(10);
}
void TFT_24S_Write_[B]Data[/B](unsigned int data1)
{
GPIO_Write(GPIOB, data1); //present the data port
GPIO_SetBits(GPIOC, RS); // set [B]RS[/B] pin [B]high[/B]. This means we are sending a [B]parameter value[/B].
GPIO_ResetBits(GPIOC, nWR); //set the [B]WR[/B] pin [B]low[/B] to prepare for writing
GPIO_SetBits(GPIOC, nWR); // toggle the [B]WR[/B] pin [B]high[/B] to complete the write.
}
the transition of the WR pin from low to high causes a write to the ILI9341 of whatever is on the data port and the RS pin determines if it is a command or a parameter value. You'll notice that the only difference between the two functions is really only the RS pin:
-RS = 0 to send a Command or select a register to be written
-RS = 1 to send a parameter for the command or a value to write to the register
Let's take a look at a small part of the init sequence in the newhaven sample code:
Code:
TFT_24S_Write_Command(0x00CB);//Power Control A
TFT_24S_Write_Data(0x0039);//always 0x39
TFT_24S_Write_Data(0x002C);//always 0x2C
TFT_24S_Write_Data(0x0000);//always 0x00
TFT_24S_Write_Data(0x0034);//Vcore = 1.6V
TFT_24S_Write_Data(0x0002);//DDVDH = 5.6V
If you look at the data sheet for the ILI9341, you'll see that the Power Control A Register is 0x00CB.
This register has 5 parameters.
So to configure this register:
-You use TFT_24S_Write_
Command(0x00CB) to say we are writing to Power Control A register
-Followed by 5 TFT_24S_Write_
Data() instructions to set the parameters for Power Control A.
So I think you just have to follow the initialization sequence in the sample code to initialize your LCD.