CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

display data write problems NT7506

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Manu



Joined: 09 Jul 2013
Posts: 1

View user's profile Send private message

display data write problems NT7506
PostPosted: Tue Jul 09, 2013 6:47 am     Reply with quote

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!!
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Tue Jul 09, 2013 3:49 pm     Reply with quote

1- how do you-or I- know it is not a hardware/wiring problem??

2- on first glance - there is a LOT of code missing-
TOO much essential function() - not visible
and not ANY of the "LCD_xxxx" commands is shown.

3-IMHO -
way too much info held back to bother to analyze
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group