I'm using 1/4 Duty 1/3 Bias Segment LCD Display. But unable to turn on LCD's Segment in CS+. I'm using Applilet 3 for APIs generated.
void main(void){ R_MAIN_UserInit(); /* Start user code. Do not edit comment generated here */ R_LCD_VoltageOn(); R_LCD_Start(); my_display_number(2,1); while (1U) { } /* End user code. Do not edit comment generated here */}
unsigned char *LCD_Buffer = 0xF0300;//unsigned char *LCD_Buffer;
const unsigned char Num_Display[] = {
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, Blank0x05,0x0F, 0x00,0x06, 0x03,0x0D, 0x02,0x0F, 0x06,0x06, 0x06,0x0B, 0x07,0x0B, 0x00,0x0E, 0x07,0x0F, 0x06,0x0F, 0x00, 0x00
};
const unsigned char Position[] = {
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 170x00,0x00, 0x00,0x00, 52,51, 50,49, 48,47, 0,1, 2,3, 4,5, 6,7, 8,9, 10,11, 12,13, 14,15, 16,17, 18,19, 41,42, 43,44, 45,46
void my_display_number(unsigned char position, unsigned char num){ LCD_Buffer[Position[position*2]] &= 0x08; LCD_Buffer[Position[position*2]] |= Num_Display[num*2]; LCD_Buffer[Position[(position*2)+1]] = Num_Display[(num*2)+1]; }
Have you enabled the correct segment output pins on Code Generator ?
Regards
Yes. I've selected required segment connected as per my segmented lcd
Hello,
As there is no sample code for LCD controller, please go through section 16 which describes all settings and configurations of LCD.
https://www.renesas.com/us/en/document/mat/rl78l13-users-manual-hardware?r=479566
For example power connections in 1/3 bias mode: