Manu
Joined: 09 Jul 2013 Posts: 1
|
display data write problems NT7506 |
Posted: Tue Jul 09, 2013 6:47 am |
|
|
Hi,
I have problems with a Batron graphic display. Maybe someone could help me!!!
This is the model BTHQ128128E-FWTF-06-LEDWhite-COG. It is based on NT7506 controller.
I think the initialization is ok. I can send a command, I can read the status byte, but I can´t print any pixel!!
I have tested if the data I send are placed in RAM area of the display. The answer is yes. I read the same data that I have write before. The problem is that nothing prints in the display.
This is the init code:
Code: |
void LCD_Init (void)
{
//BACKLIGHT OFF
output_bit (LCD_PIN_BACKLIGHT,L);
//RESETB SEQUENCE:
SET_TRIS_DB (0x00FF);
output_bit (LCD_PIN_RESETB,L);
delay_ms (20);
output_bit (LCD_PIN_RESETB,H);
delay_us (10);
//INIT CSB AND E
output_bit (LCD_PIN_CSB,H);
output_bit (LCD_PIN_E,L);
LCD_Write_Comand (LCD_RESET);
LCD_Write_Comand (LCD_ICON_OFF);
//SET POWER SAVE:
LCD_Write_Comand (LCD_SET_POWER_SAVE_NORMAL);
//USER APPLICATION SETUP:
LCD_Write_Comand (LCD_DUTY_1_BYTE);
LCD_Write_Comand (LCD_DUTY_2_BYTE_128);
LCD_Write_Comand (LCD_ADC_SELECT_NORMAL);
LCD_Write_Comand (LCD_SHL_SELECT_NORMAL);
LCD_Write_Comand (LCD_OSCILATOR_ON);
LCD_Write_Comand (LCD_COM0_1_BYTE);
LCD_Write_Comand (LCD_COM0_2_BYTE_COM0);
//USER LCD POWER SETUP:
LCD_Write_Comand (LCD_DCDC_5_BOOSTING);
LCD_Write_Comand (LCD_REGULATOR_R_6_5); //
LCD_Write_Comand (LCD_ELECT_VOLUMN_BYTE_1); //
LCD_Write_Comand (LCD_ELECT_VOLUMN_BYTE_2_EV0|60); //
LCD_Write_Comand (LCD_BIAS_1_9); //
LCD_Write_Comand (LCD_DATA_DIR_BYTE_1);
LCD_Write_Comand (0);
LCD_Write_Comand (LCD_FRC_4_PWM_15);
//GRAY SCALE REGISTER
LCD_Write_Comand (LCD_GRAY_SCALE_MODE_1_2_FRAME_WHITE);
LCD_Write_Comand (0x00);
LCD_Write_Comand (LCD_GRAY_SCALE_MODE_3_4_FRAME_WHITE);
LCD_Write_Comand (0x00);
LCD_Write_Comand (LCD_GRAY_SCALE_MODE_1_2_FRAME_L_GRAY);
LCD_Write_Comand (0x05);
LCD_Write_Comand (LCD_GRAY_SCALE_MODE_3_4_FRAME_L_GRAY);
LCD_Write_Comand (0x05);
LCD_Write_Comand (LCD_GRAY_SCALE_MODE_1_2_FRAME_D_GRAY);
LCD_Write_Comand (0x0A);
LCD_Write_Comand (LCD_GRAY_SCALE_MODE_3_4_FRAME_D_GRAY);
LCD_Write_Comand (0x0A);
LCD_Write_Comand (LCD_GRAY_SCALE_MODE_1_2_BLACK);
LCD_Write_Comand (0x0F);
LCD_Write_Comand (LCD_GRAY_SCALE_MODE_3_4_BLACK);
LCD_Write_Comand (0x0F);
//POWER CIRCUIT FUNCTIONS:
LCD_Write_Comand (LCD_POWER_CONTROL|VC_ON);
delay_ms (10);
LCD_Write_Comand (LCD_POWER_CONTROL|VC_ON|VR_ON);
delay_ms (10);
LCD_Write_Comand (LCD_POWER_CONTROL|VC_ON|VR_ON|VF_ON);
delay_ms (10);
//REVERSE DISPLAY:
LCD_Write_Comand (LCD_REVERSE_DISP|OFF);
LCD_Write_Comand (LCD_DISPLAY_ON);
LCD_Write_Comand (LCD_SET_INIT_DISPL_LINE_BYTE_1);
LCD_Write_Comand (0x00); //LINE 0
//RELEASE POWER SAVE:
LCD_Write_Comand (LCD_RELEASE_POWER_SAVE);
delay_ms (20);
//BACKLIGHT ON
output_bit (LCD_PIN_BACKLIGHT,H);
//LCD_Write_Comand (0xA5); //Entire display ON (inversión the puntos)
//LCD_Write_Comand (0xA4); //Entire display OFF (inversión the puntos)
LCD_Timing_Read (LCD_RS_STATUS); //CHECK
//WRITE FOR TESTING:
LCD_Write_Comand (LCD_DISPLAY_OFF);
LCD_Timing_Read (LCD_RS_STATUS); //CHECK
LCD_SetPageAddress (2);
LCD_SetColumnAddress (10);
LCD_Write_Data (0x0F);
LCD_Write_Data (0x02);
LCD_Write_Data (0x0B);
LCD_Write_Data (0x0C);
LCD_Write_Data (0x0D);
LCD_Write_Comand (LCD_DISPLAY_ON);
LCD_Timing_Read (LCD_RS_STATUS); //CHEK
LCD_Write_Comand (LCD_DISPLAY_OFF);
//READING FOR TESTING
LCD_SetColumnAddress (10);
LCD_Read_Data (); //DUMMY READ
LCD_Read_Data ();
LCD_Read_Data ();
LCD_Read_Data ();
LCD_Read_Data ();
LCD_Read_Data ();
} |
Thanks in advance!! |
|