SED1565 with STR710

iamanil

New member
Hi,

I wanted a sample code for firing the SED1565 conneted to STR710 uC on the SPI bus.

Thanks,
Anil
Looking for additional LCD resources? Check out our LCD blog for the latest developments in LCD technology.
 

iamanil

New member
Hi,

Thanks for the quick link. I was able to get the display up and running. All my commands have been implemeted and the display is on. But,when i send "data" to the screen, I realize that nothing is displayed on the screen. Also, I'm not able to send Data(0) to refresh the screen. Please help me on getting around this problem.

Thanks...
 

iamanil

New member
Also,

The subroutine for the clear display is:

void clear_display( void )
{

Write_Display( CMD, 0x40);

for ( j = 0; j < NUMBER_OF_PAGES; j++ ){
Write_Display( CMD, 0x10);
Write_Display( CMD, 0x00 );
Write_Display( CMD, 0xB0 + j );

for( i = 0; i < NUMBER_OF_COLUMNS; i++ ){
Write_Display( DATA, 0x00 );
}
}


void Write_Display( u8 command, u8 dat )
{

if( command == CMD ) {
A0_LOW;
}
else{
A0_HIGH;
}

LCD_SELECT;

BSPI_WordSend(BSPI0,dat); /* Send data in Serial*/
while(!(BSPI0->CSR2&BSPI_RFF));

LCD_DESELECT;
}
 
If nothing is displayed on the screen, then how are you sure that "the display is on". I think you will need to post a list of your initialization commands. Having the backlight on is not related to the display being initialized.

I am confused as to what you mean by "I'm not able to send Data(0) to refresh the screen". The screen doesn't need to be "refreshed" in the classic sense. The content will remain static until you overwrite it with something else. If you mean that you are trying to clear the screen by writing 0's, then what are you trying to clear (since you said nothing is displayed)?

Can you explain further?

Also, what model display are you using, and have you measured the voltage at the Vout and V5 terminals?
 
Last edited:

iamanil

New member
Hi,

I'm using a SED 1565 display. Yes! I'm sending all "0" to screen for refreshing the screen. My Intializing code is as under:

void Init_Display( void )
{

A0_HIGH;

LCD_DESELECT;
Delay_us(5);
LCD_RESET;
Delay_us(5);
LCD_RESET;
Delay_us(5);
LCD_RESET;
Delay_us(5);
LCD_RUN;
Delay_us(5);
LCD_RUN;


Write_Display( CMD, RESET_DISPLAY ); //0xE2

Write_Display( CMD, RESET_DISPLAY ); //0xE2
Write_Display( CMD, LCD_BIAS_1_9 ); //0xA2
Write_Display( CMD, ADC_SELECT_NORMAL ); //0xA0
Write_Display( CMD, COMMON_OUTPUT_NORMAL ); //0xC0

Write_Display( CMD, V5_RESISTOR_RATIO ); //0x23
Write_Display( CMD, ELECTRONIC_VOLUME_SET ); //0x81
Write_Display( CMD, ELECTRONIC_VOLUME_INIT ); //0x2F



Write_Display( CMD, ( POWER_CONTROL_SET | VOLTAGE_REGULATOR | VOLTAGE_FOLLOWER | BOOSTER_CIRCUIT ) ); //0x28 | 0x02 | 0x01 | 0x04
Write_Display( CMD, DISPLAY_ON ); //0xAF
Write_Display( CMD, ALL_POINTS_ON ); //0xA5
Delay_us(300000);
Write_Display( CMD, ALL_POINTS_OFF ); //0xA4
//Write_Display( CMD,CMD_NOP);

clear_display();

} //end Init_Display()


I see the display on after it send the "DISPLAY_ON" command. The command ALL_POINTS_ON works fine because all the pixels turn dark. At the command ALL_POINTS_OFF, the display is same as the DISPLAY_ON.

But at the "clear_display" subroutine seems to not send the data to the LCD.

Also, my IAR board is running on a 3.3V Voltage supply.

Thanks
 
I'm using a SED 1565 display.
That is not a manufacturer or model number. That is the part number for the embedded LCD controller chip. For example, I am using an Optrex F-51320.

Your code looks OK, but I have not examined it closely.
Yes! I'm sending all "0" to screen for refreshing the screen.
Are you using the word "refreshing" when you actually mean "clearing or erasing"? I am confused by this.
V5_RESISTOR_RATIO ); //0x23
In my display, I need to have this value be 0x25 or 0x26 in order to get enough contrast to see pixels go on.
I see the display on after it send the "DISPLAY_ON" command. The command ALL_POINTS_ON works fine because all the pixels turn dark. At the command ALL_POINTS_OFF, the display is same as the DISPLAY_ON.
This implies that the communications is working correctly, so I don't know why you can't write data. Have you tried to write anything other than 0's? If you send alternate 0x00 and 0xFF, you should see stripes.
But at the "clear_display" subroutine seems to not send the data to the LCD.
How can you tell, if the display has nothing on it to clear?
my IAR board is running on a 3.3V Voltage supply
Thats not what I am asking. I wondered about the LCD backplane voltage, called Vout and V5. These voltages will tell if your charge pumps circuit is working correctly. If you tell the model # of the display, I can help you more easily.
 

iamanil

New member
Its a bonafide MG12864-08 display. I have changed the V5 ratio to be 0x26. No change! I beleive thet the communication is going on fine with the CMD mode but not with the DATA mode.

Yes! I mean clearing wherever i refered to refreshing.

Also, with the DISPLAY_ON command...there are broken lines and dots on the display.

with ALL_POINTS_ON, it turns all pixels dark...

with ALL_POINTS_OFF, it displays broken lines and dots again(replica screen of the screen after DISPLAY_ON)

I tried doing the 0xFF and Ox00 inverting, but it doesnt change the display(stationary broken lines and dots)

I believe that i have filled up the buffer and need to clear it beofre i send my data commands. Is there a way to refresh the RAM contents on the LCD?
 
Ahh, I see. I never would have guessed that "bonafide" was the name of a display manufacturer.

That data sheet page is a good start, but can you supply a link to any more pages? I think you must have more data, to know how to connect the charge pump capacitors on pins 1~5 and 7~11. Or are you using a ready-made demo board that is designed for this display?

So when you say there is "nothing on the display", what you mean is that random garbage is on the screen (big difference). The ALL_POINTS_ON (or OFF) commands don't alter the data memory, they just override it. The real issue is why do commands work, but writing data does not.

Are you sure the A0 (pin 18) is being set correctly (high for data write)? I see that your code looks good for this, but is it really happening on the display input pin? Can you check it with an oscilloscope, or use a voltmeter or logic probe while you single-step in debug mode?

One thing I do not understand is why this display has two pins labeled "/RD" and "/RW". These signals are not used in serial mode (according to the Epson data sheets), and this display has no parallel data bus. I would like to know what the "bona" data sheets say about this. Do you have these 2 pins connected to anything?

Do you have access to the Epson SED1565 data sheet? There is an explanation of serial mode on page 27, and more serial timing data on page 78. I can upload that if you need it.
 

iamanil

New member
That’s the only datasheet that Bonafide(www.bonafide.com.hk) has provided.

The hardware engineer who designed the board has used it for PIC processor earlier and it worked fine on it.

Now, I'm porting this to the ARM processor and I strongly believe that hardware is working alright.

Also, I have checked that the A0 is always high when "Data" subroutine is being invoked(using an oscilloscope). There is always a garbage on the display and no change when this subroutine is running.
 
Since it seems that the CMD writes are working, I would experiment with changing some of the settings after the initialization is complete, just to verify that you are able to change the behavior of the display.

For example, try changing:
ADC_SELECT_NORMAL from 0xA0 to 0xA1 and COMMON_OUTPUT_NORMAL from 0xC0 to 0XC8, to see if the garbage pixels change right-to-left and top-to-bottom orientation.

Make a loop to increment/decrement the ELECTRONIC_VOLUME_SET (0x81, nn) to see the contrast increase/decrease.

If those work, then something must be wrong with the A0 signal reaching the display, or maybe the page, row, and column settings are wrong and you are not addressing visable memory.

Since you have left many of my questions unanswered, I can provide no further advice at this time.
 

iamanil

New member
I have done all the examples that you provided with and it seems to work as suggested.

I checked on the A0 on the oscilloscope and looks like it is set to 3.3V(high).

For clearing the screen, I used the following code:


#define START_LINE_SET 0x40
#define PAGE_ADDRESS_SET 0xB0

#define COLUMN_ADDRESS_HIGH 0x10
#define COLUMN_ADDRESS_LOW 0x00

void clear_display( void )
{

Write_Display( CMD, START_LINE_SET );

for ( j = 0; j < 8; j++ ){
Write_Display( CMD, COLUMN_ADDRESS_HIGH );
Write_Display( CMD, COLUMN_ADDRESS_LOW );
Write_Display( CMD, PAGE_ADDRESS_SET + j );

for( i = 0; i < 128; i++ ){
Write_Display( DATA, 0x00 );
}
}
}



cosmicvoid said:
Since it seems that the CMD writes are working, I would experiment with changing some of the settings after the initialization is complete, just to verify that you are able to change the behavior of the display.

For example, try changing:
ADC_SELECT_NORMAL from 0xA0 to 0xA1 and COMMON_OUTPUT_NORMAL from 0xC0 to 0XC8, to see if the garbage pixels change right-to-left and top-to-bottom orientation.

Make a loop to increment/decrement the ELECTRONIC_VOLUME_SET (0x81, nn) to see the contrast increase/decrease.

If those work, then something must be wrong with the A0 signal reaching the display, or maybe the page, row, and column settings are wrong and you are not addressing visable memory.

Since you have left many of my questions unanswered, I can provide no further advice at this time.
 
Top