void LCD_Clear(void)
{
uint8_t SFRPAGE_TEMP=0;
SFRPAGE_TEMP=SFRPAGE;
LCD_Busy_Flag_Wait();
/* Enabling weak pullups and output drivers on Port 0,1,2 and 3 are activated*/
/* Setting Port 1(0-3) [DB7-DB6-DB5-DB4] to Push-Pull output mode to enable output direction communication only
Setting Port 1(4-6) [RS-RW-E] to Push-Pull output mode to enable output direction communication only*/
LCD_DATA_MODE |= DATA_MODE_MASK_PUSHPULL;
/************** command ********************/
LCD_CTRL &= ~RW_MASK; //RW=0
LCD_CTRL &= ~RS_MASK; //RS=0
LCD_CTRL &= ~E_MASK; //E=0
LCD_DATA &= 0xF0; //DB4=DB5=DB6=DB7=0
/************** Dummy instruction **********/
// LCD_CTRL &= ~RW_MASK; //RW=0
/******************E-Cycle*****************/
E_Cycle();
/******************************************/
LCD_DATA |= 0x01; //DB4=1
/******************E-Cycle*****************/
E_Cycle();
/******************************************/
SFRPAGE=SFRPAGE_TEMP;
}
This is an example the 5 instructions before the dummy instruction are not converted to assembley but if I rempve the comment from the dummy instruction they will be converted normally but they may have impact on other instructions in the file. The problem as yo said is due to optimization issue of the compiler but I w'd like to know the different options of the optimization
Thank you so much