Post Go back to editing

ADV7623 scale text

We use the ADV7623 for superimpose textdata on the hd-video (1080p) . Runs perfect, but the
text is very small, so we tried to scale it with TBOX_V_SCALE and TBOX_H_SCALE, without success.
If we want to increase the text size, have we to change the font data??

Another problem occured: when we tried to show a sentence with more than 16 characters, we need to use

more "words". But how can we get the information where the first "word" ends to continue with the next one?

Thanks for your help!
Klaus

Parents
  • Hello Poornima

    I created the FLASH_ROM_CHAR data with the ADI_Character OSD tool. 
    OSD Initialization is:

    //#############OSD MAP ######################
    HAL_I2CWriteByte(0x48 , 0x07 , 0x13) ;
    HAL_I2CWriteByte(0x48 , 0x00 , 0xb0) ; //Enables OSD
    HAL_I2CWriteByte(0x48 , 0x01 , 0xfc) ; // chroma/luma bandwidth limiting
    HAL_I2CWriteByte(0x48 , 0x04 , 0x00) ; //vertical offset adjust of OSD
    HAL_I2CWriteByte(0x48 , 0x05 , 0x05) ; // -"-
    HAL_I2CWriteByte(0x48 , 0x06 , 0x82) ; //OSD colorspace reduced RGB limited
    //HAL_I2CWriteByte(0x48 , 0x07 , 0x73) ; // Text zoom 2xvert 2x hor
    HAL_I2CWriteByte(0x48 , 0x10 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x11 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x12 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x13 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x14 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x15 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x16 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x17 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x20 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x30 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x80 , 0x01) ; // enable OSD TBOX
    HAL_I2CWriteByte(0x48 , 0x90 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xa0 , 0x40) ; //highlight en
    HAL_I2CWriteByte(0x48 , 0x60 , 0x80) ; //SPI en; SPI_slave
    HAL_I2CWriteByte(0x48 , 0x70 , 0x88) ;
    HAL_I2CWriteByte(0x48 , 0x81 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x82 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x83 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x84 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x85 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x86 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x91 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x92 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xa1 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xa2 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xb1 , 0xff) ; //TBOX G
    HAL_I2CWriteByte(0x48 , 0xb2 , 0x00) ; //TBOX B
    HAL_I2CWriteByte(0x48 , 0xb3 , 0x00) ; //TBOX R
    HAL_I2CWriteByte(0x48 , 0xb7 , 0x00) ; //TBOX highlight G
    HAL_I2CWriteByte(0x48 , 0xb8 , 0xf0) ; //TBOX highlight B
    HAL_I2CWriteByte(0x48 , 0xb9 , 0xff) ; //TBOX highlight R HAL_I2CWriteByte(0x48 , 0xc0 , 0x0f) ;
    HAL_I2CWriteByte(0x48 , 0xc1 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xc2 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xd0 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xd1 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xd2 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xd8 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xd9 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xda , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xe0 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xe1 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xe2 , 0xff) ;

    OSDPushToSpi (FLASH_ROM_STRING_UNKOWN_PACK_0_OSD_0); //write String RAM
    OSDPushToSpi (FLASH_ROM_TBOX_PNTR_UNKOWN_OSD_START_OSD_0); //write String Pointer RAM
    OSDPushToSpi (FLASH_ROM_CHAR_L_UNKOWN_PACK_0_OSD_0); // Write Char RAM L
    OSDPushToSpi (FLASH_ROM_CHAR_M_UNKOWN_PACK_0_OSD_0); // Write Char RAM M
    OSDPushToSpi (FLASH_ROM_CHAR_R_UNKOWN_PACK_0_OSD_0); // Write Char RAM R


    Inserting data are made like this in a routine:

    sprintf(wegl2," m%c.%c%c%c%c%c", tmp[5],tmp[4],tmp[3],tmp[2],tmp[1],tmp[0]); // format measurement data
    sprintf(Tx,"%c%c%c%c%s",0x12,0x00,0x09,0x06,wegl2); // length = 0x12; 0x09 -> Write to String RAM; Use TB6 ---> String RAM
    // Paramter 0 / 1 Datalenght(string + Pointer)
    // Parameter 2 / SPPI command
    OSDPushToSpi(Tx);
    sprintf(Tx,"%c%c%c%c%c%c%c%c",0x06,0x00,0x05,0x06, 0xf0,(UCHAR)(WegLaenge2),((UCHAR)(WegLaenge2) >> 1),0xc0); //-->Tbox instruction RAM
    OSDPushToSpi(Tx);
    HAL_I2CWriteByte(0x48 , 0x80 , 0x40) ; // OSD-MAP(0x48), Reg:OSD TEXT BOX ENABLE_1; enable TB 6,
    HAL_I2CWriteByte(0x48 , 0xa0 , 0x40) ;

    Displaying the OSD data runs perfect, only the character size should be larger.

    Kind regards
    Klaus

Reply
  • Hello Poornima

    I created the FLASH_ROM_CHAR data with the ADI_Character OSD tool. 
    OSD Initialization is:

    //#############OSD MAP ######################
    HAL_I2CWriteByte(0x48 , 0x07 , 0x13) ;
    HAL_I2CWriteByte(0x48 , 0x00 , 0xb0) ; //Enables OSD
    HAL_I2CWriteByte(0x48 , 0x01 , 0xfc) ; // chroma/luma bandwidth limiting
    HAL_I2CWriteByte(0x48 , 0x04 , 0x00) ; //vertical offset adjust of OSD
    HAL_I2CWriteByte(0x48 , 0x05 , 0x05) ; // -"-
    HAL_I2CWriteByte(0x48 , 0x06 , 0x82) ; //OSD colorspace reduced RGB limited
    //HAL_I2CWriteByte(0x48 , 0x07 , 0x73) ; // Text zoom 2xvert 2x hor
    HAL_I2CWriteByte(0x48 , 0x10 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x11 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x12 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x13 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x14 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x15 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x16 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x17 , 0x00) ; // OSD FBOX
    HAL_I2CWriteByte(0x48 , 0x20 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x30 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x80 , 0x01) ; // enable OSD TBOX
    HAL_I2CWriteByte(0x48 , 0x90 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xa0 , 0x40) ; //highlight en
    HAL_I2CWriteByte(0x48 , 0x60 , 0x80) ; //SPI en; SPI_slave
    HAL_I2CWriteByte(0x48 , 0x70 , 0x88) ;
    HAL_I2CWriteByte(0x48 , 0x81 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x82 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x83 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x84 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x85 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x86 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x91 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0x92 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xa1 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xa2 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xb1 , 0xff) ; //TBOX G
    HAL_I2CWriteByte(0x48 , 0xb2 , 0x00) ; //TBOX B
    HAL_I2CWriteByte(0x48 , 0xb3 , 0x00) ; //TBOX R
    HAL_I2CWriteByte(0x48 , 0xb7 , 0x00) ; //TBOX highlight G
    HAL_I2CWriteByte(0x48 , 0xb8 , 0xf0) ; //TBOX highlight B
    HAL_I2CWriteByte(0x48 , 0xb9 , 0xff) ; //TBOX highlight R HAL_I2CWriteByte(0x48 , 0xc0 , 0x0f) ;
    HAL_I2CWriteByte(0x48 , 0xc1 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xc2 , 0x00) ;
    HAL_I2CWriteByte(0x48 , 0xd0 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xd1 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xd2 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xd8 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xd9 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xda , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xe0 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xe1 , 0xff) ;
    HAL_I2CWriteByte(0x48 , 0xe2 , 0xff) ;

    OSDPushToSpi (FLASH_ROM_STRING_UNKOWN_PACK_0_OSD_0); //write String RAM
    OSDPushToSpi (FLASH_ROM_TBOX_PNTR_UNKOWN_OSD_START_OSD_0); //write String Pointer RAM
    OSDPushToSpi (FLASH_ROM_CHAR_L_UNKOWN_PACK_0_OSD_0); // Write Char RAM L
    OSDPushToSpi (FLASH_ROM_CHAR_M_UNKOWN_PACK_0_OSD_0); // Write Char RAM M
    OSDPushToSpi (FLASH_ROM_CHAR_R_UNKOWN_PACK_0_OSD_0); // Write Char RAM R


    Inserting data are made like this in a routine:

    sprintf(wegl2," m%c.%c%c%c%c%c", tmp[5],tmp[4],tmp[3],tmp[2],tmp[1],tmp[0]); // format measurement data
    sprintf(Tx,"%c%c%c%c%s",0x12,0x00,0x09,0x06,wegl2); // length = 0x12; 0x09 -> Write to String RAM; Use TB6 ---> String RAM
    // Paramter 0 / 1 Datalenght(string + Pointer)
    // Parameter 2 / SPPI command
    OSDPushToSpi(Tx);
    sprintf(Tx,"%c%c%c%c%c%c%c%c",0x06,0x00,0x05,0x06, 0xf0,(UCHAR)(WegLaenge2),((UCHAR)(WegLaenge2) >> 1),0xc0); //-->Tbox instruction RAM
    OSDPushToSpi(Tx);
    HAL_I2CWriteByte(0x48 , 0x80 , 0x40) ; // OSD-MAP(0x48), Reg:OSD TEXT BOX ENABLE_1; enable TB 6,
    HAL_I2CWriteByte(0x48 , 0xa0 , 0x40) ;

    Displaying the OSD data runs perfect, only the character size should be larger.

    Kind regards
    Klaus

Children
No Data