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 - elektor18

Pages: [1]
1
Thank you for that spot, that was it! Wrong font size caused that problem.
Thank you again.
I will back if I find solution to load image from sd card for PIC uC.

2
Thank you for fast reply.

Code: [Select]
void APP_LoadImagePNG(void)
{
    uint16_t Reg_Cmd_Write_Offset = 0;
    uint16_t ParameterAddr = 0;
    uint32_t End_Address = 0;
    uint32_t Width = 0;
    uint32_t Height = 0;
    uint32_t StartAddress = 0;
   

       
    API_LIB_BeginCoProList();                                                   // Begin new co-processor list
  ////////////////////////////////////////////////////////////////////// 

 /////////////////////////////////////////////////////////////////////// 
    API_CMD_LOADIMAGE(StartAddress,0);                                          // Load image command. Extract data to RAM_G + 0, options = 0
    API_LIB_EndCoProList();                                                     // Finish the co-processor list
    API_LIB_WriteDataToCMD(EVE_PNG, sizeof(EVE_PNG));                           // Send data immediately after the command (since we don't select MEDIAFIFO as source in Options))
    API_LIB_AwaitCoProEmpty();                                                  // Await completion of the Load Image. Image will now be in RAM_G
   
 
    // ###### Check parameters of decompressed image ########
    API_LIB_BeginCoProList();                                                   // Begin co-pro list
    API_CMD_GETPROPS(0, 0, 0);                                                  // GetProps command with three dummy 32-bit values
    API_LIB_EndCoProList();                                                     // Finish the co-processor list
    API_LIB_AwaitCoProEmpty();                                                  // Await the command completion

    Reg_Cmd_Write_Offset = EVE_MemRead16(REG_CMD_WRITE);                        // Check current pointer value

    ParameterAddr = ((Reg_Cmd_Write_Offset - 12) & 4095);                       // Go back by 12 bytes to get end address parameter
    End_Address = EVE_MemRead32((RAM_CMD+ParameterAddr));

    ParameterAddr = ((Reg_Cmd_Write_Offset - 8) & 4095);                        // Go back by 8 bytes to get width parameter
    Width = EVE_MemRead32((RAM_CMD+ParameterAddr));   

    ParameterAddr = ((Reg_Cmd_Write_Offset - 4) & 4095);                        // Go back by 4 bytes to get height parameter
    Height = EVE_MemRead32((RAM_CMD+ParameterAddr));   
   
    // ######################################################     
   
    API_LIB_BeginCoProList();                                                   // Begin new screen
    API_CMD_DLSTART();                                                          // Tell co-processor to create new Display List
    API_CLEAR_COLOR_RGB(50, 70, 200);                                               // Specify color to clear screen to
    API_CLEAR(1,1,1);                                                           // Clear color, stencil, and tag buffer
    API_COLOR_RGB(255,255,255);                                                 // White colour will display image with original colours
   
    [b][color=red]API_CMD_GRADIENT(0, 0, 0xF11F11, 0, 160, 0x0101FF); [/color][/b]
 
    API_BITMAP_HANDLE(0);                                                       // Tell FT81x the properties of the bitmap we will display.
    API_BITMAP_SOURCE(StartAddress);                                             
    API_BITMAP_LAYOUT(RGB565, Width*2, Height);                                 // FMT, STR, H
    API_BITMAP_SIZE(BILINEAR, BORDER, BORDER, Width, Height);                   // W, H
    API_BITMAP_LAYOUT_H((Width * 2) >> 10, Height >> 9);
    API_BITMAP_SIZE_H(Width >> 9, Width >> 9);
     
    API_BEGIN(BITMAPS);     
    API_VERTEX2II(85,205,0,0);                                                   // Display image at (200,200)

    [b][color=red]API_CMD_BUTTON(20,20,60,20,14,0,"Page 1");[/color][/b] 
    API_END();
     
    API_DISPLAY();                                                              // Tell EVE that this is end of list
    API_CMD_SWAP();                                                             // Swap buffers in EVE to make this list active
    API_LIB_EndCoProList();                                                     // Finish the co-processor list burst write
    API_LIB_AwaitCoProEmpty();
       
//////////////////////////////////////////////////////////////////////////////////////////////
   
}


Only stuff in bold added.
I've just noticed, bold and colours don't work in code quote..sorry about that.

3
Hello,

I'm currently using BT816 with PIC18 (example from FTDI website) but what I found is when I upload the code it does not always display it for some reason, especially when I add some extra line with text to display...that is weird. But what I want to achieve is to display "bigger" image from SD card. Can someone help, please?

Pages: [1]