FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.

Messages - pravin

Pages: [1]
1
General Discussion / Re: FT812 DISPLAY
« on: September 17, 2018, 01:10:57 PM »
Thanks for reply,

Now, I am able to read chip id from FT81x. But Back light is not turning  ON ; before it was turning  ON during making PD_PIN as a OUTPUT then set to LOW.

can you please explain what is the condition to make Back light  turn ON.

It will help me to understand the Display functionality

I have also tried an example of FTDI to display screen But fails to do that.

Please help,


My code:

void ApplicationScreen1()
{
      
   ramDisplayList=RAM_DL+0;
   FT800_SPI_SendAddressWR(ramDisplayList);            // Write first entry in Display List (first location in DL Ram)
   FT800_SPI_Write32(0x02000000);                  // Clear Color RGB   00000010 BBBBBBBB GGGGGGGG RRRRRRRR  (B/G/R = Colour values)   
   // Clear the Colour, Stencil and Tag buffers. This will set the screen to the 'clear' colour set above.
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);            // Write next entry in display list (each command is 4 bytes)
   FT800_SPI_Write32(BEGIN(BITMAPS));                  // Clear 00100110 -------- -------- -----CST  (C/S/T define which parameters to clear)
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);            
   FT800_SPI_Write32(VERTEX2II(220,110,31,'F'));
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);            
   FT800_SPI_Write32(VERTEX2II(220,110,31,'T'));
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);            
   FT800_SPI_Write32(VERTEX2II(220,110,31,'D'));
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);            
   FT800_SPI_Write32(VERTEX2II(220,110,31,'I'));
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);
   FT800_SPI_Write32(ENDP());
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);
   FT800_SPI_Write32(COLOR_RGB(160,22,22)); //SET COLOUR TO RED
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);
   FT800_SPI_Write32(POINT_SIZE(320)); //SET POINT SIZE TO 20 PIXELS IN RADIUS
   
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);
   FT800_SPI_Write32(BEGIN(FTPOINTS)); //START DRAWING POINTS
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);            
   FT800_SPI_Write32(VERTEX2II(192,133,0,0));//RED COLOUR
   
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);
   FT800_SPI_Write32(ENDP());
   ramDisplayList +=4;
   FT800_SPI_SendAddressWR(ramDisplayList);
   FT800_SPI_Write32(DISPLAY());//display image
      
   FT800_SPI_SendAddressWR(REG_DLSWAP);            // Writing to the DL_SWAP register...value 10 means render after last frame complete       
   FT800_SPI_Write32(0x00000002);                  // 00000000 00000000 00000000 000000SS  (SS bits define when render occurs)
}
 


2
General Discussion / FT812 DISPLAY
« on: September 15, 2018, 10:53:04 AM »
Hi , i bought FT812 display few days before and wants to communicate with over SPI. I am using freescale MK22FX512VLL12 controller.

 I am not able to  read chip id( 0x7c ).Always getting 0 in RX Buffer

Please help me to work this,

I am referring FT800 sample code and i have also changed REG_ADD according to FT81XX DATASHEET

My code is:

        SpiHostCommand(FT_GPU_EXTERNAL_OSC);
   Delay(1);
   SpiHostCommand(FT_GPU_ACTIVE_M);
   Delay(1);
   SpiHostCommand(FT_GPU_PLL_48M);          //  Ensure configured to 48 MHz
   Delay(1);
   SpiHostCommand(FT_GPU_CORE_RESET);     // Reset the core     
   Delay(1);
   SpiHostCommand(FT_GPU_ACTIVE_M);
        Delay(1);       
       chipid = 0x00;                                  // Read the Chip ID to check comms with the FT800 - should be 0x7C
   while(chipid != 0x7C){
      SpiSendAddresstoLcd(REG_ID); // REG_ID   302000h
      chipid = SpiReadLcd();  // Read the actual value
   }

 
void SpiHostCommand(unsigned char  HostCommand)
{
   unsigned char SentData;
   PORT_LCD_CS1B &= ~GPIO_PDOR_PDO(GPIO_PIN(LCD_CS1B));
   SentData=(HostCommand & 0x3F | 0x40 );
   SPI_Send_byteToLcd(SentData);
   SentData=0x00;
   SPI_Send_byteToLcd(SentData);
   SentData=0x00;
   SPI_Send_byteToLcd(SentData);
   PORT_LCD_CS1B |= GPIO_PDOR_PDO(GPIO_PIN(LCD_CS1B));
   
}

void SpiSendAddresstoLcd(unsigned long Memory_Address)///read data from memory address
{
   unsigned char SPI_Writebyte;
   
   PORT_LCD_CS1B &= ~GPIO_PDOR_PDO(GPIO_PIN(LCD_CS1B));
   SPI_Writebyte = ((Memory_Address & 0x00FF0000) >> 16);  // Mask off the first byte to send
   SPI_Writebyte = (SPI_Writebyte & 0x3F);                 // Since this is a read, the upper two bits are forced to 00
   SPI_Send_byteToLcd(SPI_Writebyte);                       // Call the low-level SPI routine for this MCU to send this byte
      
   SPI_Writebyte = ((Memory_Address & 0x0000FF00) >> 8);   // Mask off the next byte to be sent
   SPI_Send_byteToLcd(SPI_Writebyte);                       // Call the low-level SPI routine for this MCU to send this byte

   SPI_Writebyte = (Memory_Address & 0x000000FF);          // Mask off the next byte to be sent (least significant byte)
   SPI_Send_byteToLcd(SPI_Writebyte);                       // Call the low-level SPI routine for this MCU to send this byte
                  
       // Send dummy 00 as required in the FT800 datasheet when doing a read
   SPI_Writebyte = 0x00;                                   // Write dummy byte of 0
   SPI_Send_byteToLcd(SPI_Writebyte);                       //

}

unsigned char SpiReadLcd()
{
   unsigned char Data=0x00;
   
   Data=SPI_Receive_byteFromLcd();
   PORT_LCD_CS1B |= GPIO_PDOR_PDO(GPIO_PIN(LCD_CS1B));
   return Data;
   
}

Pages: [1]