Need help to run GLCD with 3 SED1520 on Arduino MEGA 2560

Hello everybody,

I have a EA DIP180-5 (180x32 pixel with 3 SED1520 Controler).
I do have a code(year 2008) for Atmega16. I try to translate for my MEGA 2560 but by now I’m stockt… May someone can help me in this?

testdip180.ino: In function ‘int main()’:

C:\Users\Ben.PC-BEN\Documents\Arduino\testdip180\testdip180.ino:147:36: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

GLCD_WriteString(“Hello world!!!”);

^

PS: Please do not ask why I use this display, because its the right size :slight_smile:

testdip180.ino

//-------------------------------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------
#include <font5x7.h>
#include <SED1520.h>
#include <graphic.h>
//-------------------------------------------------------------------------------------------------
unsigned char lcd_x = 0, lcd_y = 0;
//-------------------------------------------------------------------------------------------------
extern void GLCD_WaitForStatus(unsigned char, unsigned char);
extern void GLCD_WriteCommand(unsigned char, unsigned char);
extern void GLCD_WriteData(unsigned char);
extern unsigned char GLCD_ReadData(void);
extern void GLCD_InitPorts(void);
//-------------------------------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------
void GLCD_GoTo(unsigned char x,unsigned char y)
{
lcd_x = x;
lcd_y = y;

if(x < (SCREEN_WIDTH/3)) //area of 1st Controller
  {
  GLCD_WriteCommand(COLUMN_ADDRESS_SET | lcd_x, 0);
  GLCD_WriteCommand(PAGE_ADDRESS_SET   | lcd_y, 0);
  GLCD_WriteCommand(COLUMN_ADDRESS_SET |     0, 1); // Putting the cursor in controller two
  GLCD_WriteCommand(PAGE_ADDRESS_SET   | lcd_y, 1); // already at the beginning and the right page
  GLCD_WriteCommand(COLUMN_ADDRESS_SET |     0, 2); // Putting the cursor in controller three
  GLCD_WriteCommand(PAGE_ADDRESS_SET   | lcd_y, 2); // already at the beginning and the right page
  //those lines are necessary to e.g. write string over controller boundaries
  }

if((x >= (SCREEN_WIDTH/3)) && (x < (SCREEN_WIDTH*2/3))) //area of 2nd Controller
  {
   GLCD_WriteCommand(COLUMN_ADDRESS_SET | (lcd_x - (SCREEN_WIDTH/3)), 1);
   GLCD_WriteCommand(PAGE_ADDRESS_SET   | lcd_y, 1);
   GLCD_WriteCommand(COLUMN_ADDRESS_SET |     0, 2); // Putting the cursor in controller three
   GLCD_WriteCommand(PAGE_ADDRESS_SET   | lcd_y, 2); // already at the beginning and the right page
  }
  
if(x >= (SCREEN_WIDTH*2/3))  //area of 3rd Controller
  {
  GLCD_WriteCommand(COLUMN_ADDRESS_SET | (lcd_x - (SCREEN_WIDTH*2/3)), 2);
  GLCD_WriteCommand(PAGE_ADDRESS_SET | lcd_y, 2);
  }  
}
//-------------------------------------------------------------------------------------------------
// 
//-------------------------------------------------------------------------------------------------
void GLCD_ClearScreen(void)
{
char j, i;
for(j = 0; j < 4; j++)
  {
  GLCD_GoTo(0, j);
  for(i = 0; i < SCREEN_WIDTH; i++)
    {
  GLCD_WriteData(0);
  }
  }
GLCD_GoTo(0, 0);
}
//-------------------------------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------
void GLCD_WriteChar(char x)
{
char i; 
x -= 32; 
for(i = 0; i < 5; i++) 
  GLCD_WriteData(pgm_read_byte(font5x7 + (5 * x) + i));
GLCD_WriteData(0x00);
}
//-------------------------------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------
void GLCD_WriteString(char * s)
{
while(*s)
  {
  GLCD_WriteChar(*s++);
  }
}
//-------------------------------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------
void GLCD_SetPixel(unsigned char x, unsigned char y, unsigned char color)
{
unsigned char temp;  
GLCD_GoTo(x, y/8); 
temp = GLCD_ReadData(); 
GLCD_GoTo(x, y/8); 
if(color)
  GLCD_WriteData(temp | (1 << (y % 8))); 
else
  GLCD_WriteData(temp & ~(1 << (y % 8))); 
}
//-------------------------------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------
void GLCD_Bitmap(char * bmp, unsigned char x, unsigned char y, unsigned char dx, unsigned char dy)
{
unsigned char i, j;
for(j = 0; j < dy / 8; j++)
  {
  GLCD_GoTo(x,y + j);
  for(i = 0; i < dx; i++)
    GLCD_WriteData(pgm_read_byte(bmp++)); 
  }
}
//-------------------------------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------
void GLCD_Init(void)
{
GLCD_InitPorts();
GLCD_WriteCommand(RESET, 0);
GLCD_WriteCommand(RESET, 1);
GLCD_WriteCommand(RESET, 2);
GLCD_WaitForStatus(CTRL_RESET_ON, 0);
GLCD_WaitForStatus(CTRL_RESET_ON, 1);
GLCD_WaitForStatus(CTRL_RESET_ON, 2);
GLCD_WriteCommand(DISPLAY_ON, 0);
GLCD_WriteCommand(DISPLAY_ON, 1);
GLCD_WriteCommand(DISPLAY_ON, 2);
GLCD_WriteCommand(DISPLAY_START_LINE | 0, 0);
GLCD_WriteCommand(DISPLAY_START_LINE | 0, 1);
GLCD_WriteCommand(DISPLAY_START_LINE | 0, 2);


}
//-------------------------------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------
int main(void)
{  
  
       
  GLCD_Init();
  
  GLCD_ClearScreen();
  
  _delay_ms(100);   
      
  GLCD_SetPixel(46,SCREEN_HEIGHT/2-1,0); //Set position for Write String, color 0 = blue
  GLCD_WriteString("Hello world!!!");
  GLCD_Rectangle(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);
  GLCD_Rectangle(2,2,SCREEN_WIDTH-4,SCREEN_HEIGHT-4);
  
  
  
}

SED1520.h (8.22 KB)

graphic.h (249 Bytes)

font5x7.h (3.42 KB)

I could help you if you want to switch to using openGLCD library. It is licensed GPL 3.0 and can be found here: https://bitbucket.org/bperrybap/openglcd/wiki/Home

It is a full featured library that has support for the sed1520.

However, I've not seen a datasheet for a sed1520 display that had more than 2 chips, hence the code currently only supports up to two chips, so there will need to be some slight alterations to the library to support 3.

If you want to switch libraries I'll be happy to work with you to add support for the display to the library. I'll need to see a datasheet for the display that you are using to see how the chipselects work.

--- bill

Hi Bill

Yes I would like to switch to openGLCD. I looked after to day. I am happy to see your post.

This is the datasheet:

Well there are not so many Infos…

PT6520 / SED1520 / and simular

I have found a example init file:
http://www.lcd-module.de/deu/disk/development%20service/DIP180%20SED1520/init_dip180.c

I allso found a interesting tutorial witch is based on GLCD library 3 Beta for a Winstar WG20232A(202x32) Display witch has also 3 SED1520 on board.

By now I’m looking for some timing Infos and try to figure out what’s this for

/* Chip Select
#define LCD_CHIP_1         1
#define LCD_CHIP_2         2
#define LCD_CHIP_3         4
#define LCD_CHIP_ALL       7
*/
/* equate the LCD Controller control signals to their port assignments */
#define LCDDATA_PORT       PORTA
#define LCDDATA_INPUT      PINA
#define LCDDATA_DDR        DDRA
                          
#define LCDCTRL_PORT       PORTC
#define LCDCTRL_DDR        DDRC

#define LCD_A0_PIN         PC4    // Instruction/Data select, H:D0-D7 are display data L:D0-D7 are control data
#define LCD_RW_PIN         PC3    // Read/Write control signal. L:Active (H:Read, L:Write)
#define LCD_CS1_PIN        PC5    // Enable signal (E) for the 68-type microcontroller
#define LCD_CS2_PIN        PC2    // Enable signal (E) for the 68-type microcontroller
#define LCD_CS3_PIN        PC1    // Enable signal (E) for the 68-type microcontroller
#define LCD_RST_PIN        PC6    // THE HARDWARE RESET IS EDGE-SENSITIVE. IT IS NOT LEVEL-SENSITIVE.

/* LCD screen and bitmap image array consants */
#define LCD_X_BYTES		     180
#define LCD_Y_BYTES	       4      // number of page (4page x 8bit = 32)

#define LCD_RIGHT	         179    // the right most pixel         (LCD_X_BYTES - 1)
#define LCD_BOTTOM		     31     // the bottom of pixel         ((LCD_Y_BYTES * 8) -1)

#define LCD_CHIP1_START_X  0      // the CHIP1 start column of pixel
#define LCD_CHIP2_START_X  60     // the CHIP2 start column of pixel
#define LCD_CHIP3_START_X  120    // the CHIP3 start column of pixel

#define LCD_CENTER_X      (LCD_X_BYTES / 2)
#define LCD_CENTER_Y      (LCD_Y_BYTES * 4)    // the row center of pixcel 

// command function equates for SBN166G LCD Display Controller
#define LCD_DISP_OFF       0xAE	  // turn LCD panel OFF
#define LCD_DISP_ON        0xAF	  // turn LCD panel ON
#define LCD_START_LINE     0xC0	  // Specifies RAM line corresponding to top line of display.
#define LCD_SET_PAGE       0xB8	  // set page address
#define LCD_SET_COL        0x00	  // set column address
#define LCD_SET_ADC_NOR    0xA0	  // Column/Segment Mapping Register,  set for normal direction
#define LCD_SET_ADC_REV    0xA1	  // Column/Segment Mapping Register   set for reverse direction
#define LCD_STATIC_OFF     0xA4	  // normal drive
#define LCD_STATIC_ON      0xA5	  // static drive (power save)
#define LCD_DUTY_16        0xA8	  // driving duty 1/16
#define LCD_DUTY_32        0xA9	  // driving duty 1/32
#define LCD_SET_RMW_START  0xE0   // Read-Modify-Write
#define LCD_SET_RMW_END 	 0xEE   // release the Read-Modify-Write
#define LCD_RESET          0xE2	  // soft reset command

/* LCD Color modes */
#define LCD_DOT_CLR        0
#define LCD_DOT_SET        1
#define LCD_DOT_XOR        2

/* LCD Line Style */
#define LCD_LINE_SOLID     0
#define LCD_LINE_DOTTED    1
/*
/* Chip Select
#define LCD_CHIP_1         1
#define LCD_CHIP_2         2
#define LCD_CHIP_3         4
#define LCD_CHIP_ALL       7
*/
/* Chip Select */
#define LCD_CHIP_1         1
#define LCD_CHIP_2         2
#define LCD_CHIP_3         4
#define LCD_CHIP_ALL       7
/*
// defines for panel specific timing  nanosecond (3.3v), using _delay_ns()
#define LCD_tAS            40     // tAS1,2:Address setup time with respect to R/W,C/S,C/D (ctrl line changes to E high)
#define LCD_tDS            160    // Data setup time (Write data lines setup to dropping E)
#define LCD_tACC           200    // Data access time(E high to valid read data)
#define LCD_tEWR           200    // Enable pulse width READ(minimum E hi pulse width)
#define LCD_tEWW           160    // Enable pulse width WRITE(minimum E hi pulse width)
*/
// defines for panel specific timing  nanosecond (3.3v), using _delay_ns()
#define LCD_tAS            20     // tAS1,2:Address setup time with respect to R/W,C/S,C/D (ctrl line changes to E high)
#define LCD_tDS            80    // Data setup time (Write data lines setup to dropping E)
#define LCD_tACC           90    // Data access time(E high to valid read data)
#define LCD_tEWR           100    // Enable pulse width READ(minimum E hi pulse width)
#define LCD_tEWW           80    // Enable pulse width WRITE(minimum E hi pulse width)

I hope you find what you need in those links.

*Ben

IT’S RUNNING!

I tok the library “Winstar WG20232A(202x32)”, Changed settings and used AtmelStudio.

There is one litte issue on the right buttom, there 6px shown.

But over all - I would like to have it on openGLCD. Its mutch cleener to ad to a sketch for fast projects.
All you need is in the ZIP

*Ben

DIP180_ATMega2560.zip (348 KB)

Suppeschluerfer: There is one litte issue on the right buttom, there 6px shown.

Have sort that out... It's late... 2:10 AM - MEZ :D

#define LCD_CHIP1_START_X  1      // the CHIP1 start column of pixel
#define LCD_CHIP2_START_X  61     // the CHIP2 start column of pixel
#define LCD_CHIP3_START_X  121    // the CHIP3 start column of pixel

change to:

#define LCD_CHIP1_START_X  0      // the CHIP1 start column of pixel
#define LCD_CHIP2_START_X  60     // the CHIP2 start column of pixel
#define LCD_CHIP3_START_X  120    // the CHIP3 start column of pixel

From the datasheet it looks like it has 3 enables. I'll go off and look and see what it takes to modify the code to support 3 enables. --- bill

I don't have that display but it looks like it will run with the latest openGLCD library but only as a two chip device rather than a 3 chip device. So for now, you should be able to drive 2/3 of the display or as a 120x32 display.

The library comes with a config file for a Vikay5121 panel that should work with your display.

You will need to change the master config file openGLCD_config.h to point to that config file. (or I'd recommend making a copy it and renaming it something else - but if you rename it please change the glcd_ConfigName as that shows up during diagnostics and it can help identify which config file is being used)

You can look at the panel configuration file: config/sed1520/ManualConfig_sed1520-vk5121_Panel.h to see how to hook the pins up to your panel. Ignore the module pinout, and just use the defines to see what pins to use to hook to your display. (You can change the pins if you want/need to) You can't can't change the DISPLAY_WIDTH beyond 2X the CHIP_WIDTH yet which means you are currently limited to 120 pixels. There should be no need to change any of the GEOMETRY or CHIP defines.

But it should work.

Make sure to use a current limiting resistor on the backlight and do not use the backlight pin control capability to control the backlight unless the pin goes to a transistor as the pin cannot drive that displays backlight directly.

Essentially, it should work if you change the master config to point to the vk5121 config file (or your renamed panel config file) and then hook up the pins appropriately as defined in the panel config file. You may want to make a copy of it and rename it and use that instead of modifying the vk5121 file (I'd recommend doing that).

Try that and let me know if it works. Run the diag sketch to test the interface and the display. If that works, then the modifications to add the 3rd enable are very minimal.

--- bill

Actually from the main datasheet it isn't clear how the backlight works. Do you know if pin 18 is a power source/sink or if it is just a control for the backlight?

Are there any other pins for the backlight power?

Ok i will try your tutorial...

bperrybap: Actually from the main datasheet it isn't clear how the backlight works. Do you know if pin 18 is a power source/sink or if it is just a control for the backlight?

Are there any other pins for the backlight power?

Pin 18 is meant to GND with a resistor. It +5V from pin 2 VDD. There no other pins for backlight.

Maybe you can see it better in this datasheet for a DIP122-5 - 122x32px... http://www.lcd-module.de/eng/pdf/grafik/dip122-5e.pdf

/* used pins on the Arduino MEGA 2560

Port |Pin |Display      Port |Pin |Display
------------------------------------------
PC0  |37  |n.c.         PA0  |22  |D0
PC1  |36  |E3           PA1  |23  |D1
PC2  |35  |E2           PA2  |24  |D2
PC3  |34  |R/W          PA3  |25  |D3
PC4  |33  |A0           PA4  |26  |D4
PC5  |32  |E1           PA5  |27  |D5
PC6  |31  |RES          PA6  |28  |D6
PC7  |30  |n.c.         PA7  |29  |D7
*/

#define glcdPinData0    PIN_A0
#define glcdPinData1    PIN_A1
#define glcdPinData2    PIN_A2
#define glcdPinData3    PIN_A3
#define glcdPinData4    PIN_A4
#define glcdPinData5    PIN_A5
#define glcdPinData6    PIN_A6
#define glcdPinData7    PIN_A7

#define glcdPinRW      	PIN_C3

#define glcdPinE1       PIN_C5

#define glcdPinDI      	PIN_C4    // Ao glcd pin

#define glcdPinE2       PIN_C2

This comes up:

Serial initialized
--------------------------------------------------------------------
Reported Arduino Revision: 1070.1.0
F_CPU: 16000000
--------------------------------------------------------------------
Lib Configuration: openGLCD ver: 1.0rc2 build: v1.0rc2
Config File:2x-sed1520-dip180
--------------------------------------------------------------------
GLCD:sed1520 DisplayWidth:120 DisplayHeight:32
Chips:2 ChipWidth:60 ChipHeight:32
 RW:0xC3(PIN_C3) DI:0xC4(PIN_C4) E1:0xC5(PIN_C5) E2:0xC2(PIN_C2)
 D0:0xA0(PIN_A0) D1:0xA1(PIN_A1) D2:0xA2(PIN_A2) D3:0xA3(PIN_A3)
 D4:0xA4(PIN_A4) D5:0xA5(PIN_A5) D6:0xA6(PIN_A6) D7:0xA7(PIN_A7)
Delays: tDDR:290 tAS:20 tDSW:200 tWH:450 tWL:450
Data mode: byte
Backlight: <Not configured>
--------------------------------------------------------------------
Diag Loop: 1
Initializing openGLCD
Displaying Library version Screen
Turning display on/off
Displaying ChipSelect Screens
Walking 1s data test
 Compare error: 0 != 8
 Compare error: 0 != 20
 Compare error: 0 != 80
TEST FAILED
Test Count: 0 PASSED 1 FAILED
--------------------------------------------------------------------
Reported Arduino Revision: 1070.1.0
F_CPU: 16000000
--------------------------------------------------------------------
Lib Configuration: openGLCD ver: 1.0rc2 build: v1.0rc2
Config File:2x-sed1520-dip180
--------------------------------------------------------------------
GLCD:sed1520 DisplayWidth:120 DisplayHeight:32
Chips:2 ChipWidth:60 ChipHeight:32
 RW:0xC3(PIN_C3) DI:0xC4(PIN_C4) E1:0xC5(PIN_C5) E2:0xC2(PIN_C2)
 D0:0xA0(PIN_A0) D1:0xA1(PIN_A1) D2:0xA2(PIN_A2) D3:0xA3(PIN_A3)
 D4:0xA4(PIN_A4) D5:0xA5(PIN_A5) D6:0xA6(PIN_A6) D7:0xA7(PIN_A7)
Delays: tDDR:290 tAS:20 tDSW:200 tWH:450 tWL:450
Data mode: byte
Backlight: <Not configured>
--------------------------------------------------------------------
Diag Loop: 2
Initializing openGLCD
Displaying Library version Screen
Turning display on/off
Displaying ChipSelect Screens
Walking 1s data test
 Compare error: 0 != 1
 Compare error: 0 != 2
 Compare error: 0 != 8
 Compare error: 0 != 10
 Compare error: 0 != 80
TEST FAILED
Test Count: 0 PASSED 2 FAILED

I think

1.:
There is no Reset pin defined.

2.:

#define GLCD_tDDR     290    /* tACC6: Data Delay time (E high to valid read data)             */
#define GLCD_tAS       20    /* tAW6:  Address setup time (ctrl line changes to E high)        */
#define GLCD_tDSW    200    /* tDS6:  Data setup time (Write data lines setup to dropping E)  */
#define GLCD_tWH      450    /* tEW:   E hi level width (minimum E hi pulse width)             */ 
#define GLCD_tWL      450    /* E lo level width (minimum E lo pulse width)                    */

Should look like this:

#define GLCD_tDDR     90    /* tACC6: Data Delay time (E high to valid read data)             */
#define GLCD_tAS       20    /* tAW6:  Address setup time (ctrl line changes to E high)        */
#define GLCD_tDSW    80    /* tDS6:  Data setup time (Write data lines setup to dropping E)  */
#define GLCD_tWH      80     /* tEW:   E hi level width (minimum E hi pulse width)             */ 
#define GLCD_tWL      100    /* E lo level width (minimum E lo pulse width)                    */

But it isn’t working either…

Do you have any suggestions?

*BEN

So it looks like on the 122x32 pins 17 and 18 are anode and cathode and on the 180x32 17 is e3 and 18 is still the anode.

The reason I asked is that on the module I have the "backlight" pin is a ttl level enable and the backlight actually gets its power from the other LCD power pins.

But that isn't affecting it not working in this case since you have forced the backlight on.

I would suggest that you run the latest openGLCD version I've released which is openGLCD-v1.0rc2-14-ga8b9f57.zip

It shouldn't fix what is happening but it will print the arduino version correctly. It looks like the revision of IDE you are using is 1.7.10 This would be an IDE from arduino.org vs the IDE from arduino.cc

While openGLCD should work on their version of the IDE, I have not been testing on the arduino.org versions of the arduino IDE.

The whole arduino.cc vs arduino.org is a mess with lawsuits still pending. For now, I would recommend that you run the arduino.cc version of the IDE.

And in terms of timing, longer times is ok. So for now, I'd also use the longer timings that came with the library until things are working, then we can try shortening them.

--- bill

openGLCD-v1.0rc2-14-ga8b9f57 and Arduino IDE 1.6.1 (changed it because 1.7.1 is realy slow)

/*
 * Pins can be assigned using arduino pin numbers 0-n
 * Pins can also be assigned using PIN_Pb 
 *    where P is port A-L and b is bit 0-7
 *     Example: port D bit 3 is PIN_D3
 *
 */

//--------------------------------------------------------------
/* used pins on the Arduino MEGA 2560

Port |Pin |Display      Port |Pin |Display
------------------------------------------
PC0  |37  |n.c.         PA0  |22  |D0
PC1  |36  |E3           PA1  |23  |D1
PC2  |35  |E2           PA2  |24  |D2
PC3  |34  |R/W          PA3  |25  |D3
PC4  |33  |A0           PA4  |26  |D4
PC5  |32  |E1           PA5  |27  |D5
PC6  |31  |RES          PA6  |28  |D6
PC7  |30  |n.c.         PA7  |29  |D7
*/
//---------------------------------------------------------------

#define glcdPinData0    PIN_A0
#define glcdPinData1    PIN_A1
#define glcdPinData2    PIN_A2
#define glcdPinData3    PIN_A3
#define glcdPinData4    PIN_A4
#define glcdPinData5    PIN_A5
#define glcdPinData6    PIN_A6
#define glcdPinData7    PIN_A7

#define glcdPinRW       PIN_C3

#define glcdPinE1       PIN_C5

#define glcdPinDI       PIN_C4    // Ao glcd pin

#define glcdPinE2       PIN_C2
Serial initialized
--------------------------------------------------------------------
Reported Arduino Revision: 1.6.10
F_CPU: 16000000
--------------------------------------------------------------------
Lib Configuration: openGLCD ver: 1.0rc2-14 build: v1.0rc2-14-ga8b9f57
Config File:2x-sed1520-dip180
--------------------------------------------------------------------
GLCD:sed1520 DisplayWidth:120 DisplayHeight:32
Chips:2 ChipWidth:60 ChipHeight:32
 RW:0xC3(PIN_C3) DI:0xC4(PIN_C4) E1:0xC5(PIN_C5) E2:0xC2(PIN_C2)
 D0:0xA0(PIN_A0) D1:0xA1(PIN_A1) D2:0xA2(PIN_A2) D3:0xA3(PIN_A3)
 D4:0xA4(PIN_A4) D5:0xA5(PIN_A5) D6:0xA6(PIN_A6) D7:0xA7(PIN_A7)
Delays: tDDR:290 tAS:20 tDSW:200 tWH:450 tWL:450
Data mode: byte
Backlight: <Not configured>
--------------------------------------------------------------------
Diag Loop: 1
Initializing openGLCD
Displaying Library version Screen
Turning display on/off
Displaying ChipSelect Screens
Walking 1s data test
 Compare error: 0 != 1
 Compare error: 0 != 2
 Compare error: 0 != 4
 Compare error: 0 != 8
 Compare error: 0 != 10
 Compare error: 0 != 20
 Compare error: 0 != 40
 Compare error: 0 != 80
TEST FAILED
Test Count: 0 PASSED 1 FAILED

Errors in the error.txt

errors.txt (37.3 KB)

(changed it because 1.7.1 is realy slow)

What do you mean by this? Changed from what to what and what was slow?

1.6.10 and 1.7.1 are from two entirely different companies.

And does the other code work on same h/w, without changing any wires? i.e. you can upload the other code and it works?

The warnings you got about the PIN_A0 to PIN_A7 are because some knuckled head at arduino decided that they would create new defines for the analog pins in Arduino 1.6.10

They often do very short sighted things in their development and this is one of them but it is part of a much larger problem with using defines and their variant methodology.

These new defines collide with my avrio defines to do raw port i/o, however since the openGLCD defines are currently done after their defines, the openGLCD defines win.

I'm aware of this issue and am in the process of working out a solution. It is going to be a bit of pain, but I will figure out a way around it so that the low level library can use the openGLCD defines and the sketch can use the variant file defines.

In the mean time, you won't be able to use PIN_A0 to PIN_A7 to specify and arduino pin number to things like digitalWrite() when openGLCD is being used.

--- bill

I think we’re talking past each other…

I went back to arduino.cc 1.6.1

Suppeschluerfer: I went back to arduino.cc 1.6.1

Accuracy is critical when debugging at this level. The diag sketch is saying you are running 1.6.10 not 1.6.1 Those are two different IDEs.

Not sure where you got IDE 1.7.1 as arduino.cc has not released and IDE with a number that high. The latest nightly/houry build is 1.6.11 Perhaps you got 1.7.1 from arduino.org? But their latest revision of their IDE is 1.7.10 not 1.7.1

arduino.cc and arduino.org are two different companies.

Accuracy is super important when reporting information.

What about the other question I asked in post #13?

http://forum.arduino.cc/index.php?topic=417213.msg2879468#msg2879468

i.e. does the non arduino code work on the very same h/w setup?

--- bill

I now have switched to: ManualConfig_sed1520-4GLM12232_Panel.h because is has a RES pin

Initializing openGLCD → PASSED
Displaying Library version Screen → PASSED
Turning display on/off → PASSED
Displaying ChipSelect Screens → PASSED

Still have error!

Serial initialized
--------------------------------------------------------------------
Reported Arduino Revision: 1.6.10
F_CPU: 16000000
--------------------------------------------------------------------
Lib Configuration: openGLCD ver: 1.0rc2-14 build: v1.0rc2-14-ga8b9f57
Config File:DIP180-5
--------------------------------------------------------------------
GLCD:sed1520 DisplayWidth:120 DisplayHeight:32
Chips:2 ChipWidth:60 ChipHeight:32
 RES:31(PIN_C6) RW:34(PIN_C3) DI:33(PIN_C4) E1:32(PIN_C5) E2:35(PIN_C2)
 D0:22(PIN_A0) D1:23(PIN_A1) D2:24(PIN_A2) D3:25(PIN_A3)
 D4:26(PIN_A4) D5:27(PIN_A5) D6:28(PIN_A6) D7:29(PIN_A7)
Delays: tDDR:180 tAS:40 tDSW:160 tWH:200 tWL:160
Data mode: byte
Backlight: <Not configured>
--------------------------------------------------------------------
Diag Loop: 1
Initializing openGLCD
Displaying Library version Screen
Turning display on/off
Displaying ChipSelect Screens
Walking 1s data test
 Compare error: 0 != 1
 Compare error: 0 != 2
 Compare error: 0 != 4
 Compare error: 0 != 8
 Compare error: 0 != 10
 Compare error: 0 != 20
 Compare error: 0 != 40
 Compare error: 0 != 80
TEST FAILED
Test Count: 0 PASSED 1 FAILED

I think should be:

Chip1(0) Chip2(1)
Page0 Page0
Page1 Page1
Page2 Page2
Page3 Page3

Ok you are right its 1.6.10

1.7.10 is on Windows 7 64bit slow(up to 10sec) when open "Tools" and "Serial Monitor"...

*ben

I couldn't follow either of those two posts.

The diag tool never outputs information like this:

Initializing openGLCD --> PASSED Displaying Library version Screen --> PASSED Turning display on/off --> PASSED Displaying ChipSelect Screens --> PASSED

So I have no idea what is happening. There are things that should be displayed on LCD during those tests. Given the memory test failure it is highly improbably that any of those were actually successful. Have you looked at the the html documentation to see what the LCD should look like during the diagnostics?

It also sounds like you have been flipping between arduino.cc and arduino.org IDEs. These are two different IDEs created by two different companies. Please stay with the arduino.cc IDEs until we get this working and do not change to a newer version should one come out.

And you still have not answered the question I asked in post #12 and again in post#15. This is very important information.

I know you are probably wanting to move fast but running around trying things is not the answer. Time to slow down. If you want my help in getting this display up and working (which will require modifications to the library code) you are going to have to follow a methodical process and do the things that I ask and provide very accurate information and answers to the questions I ask.

All I can see from the diagnostic output shown in post #16 is that the walking ones test failed just like in post #9 and #11.

I referred you to the vk5121 config file because it was already set up for the correct pixels per chip of 60 which is what your datasheet showed.

It sounds like you have now have jumped over to the ManualConfig_sed1520-4GLM12232_Panel.h but have modified the DISPLAY_WIDTH to be 120 and CHIP_WIDTH to be 60 and also changed tWL from 200 to 160.

Now is not the time to start messing with timing parameters.

The timing in the 12232 file is faster and when trying to bring things up it is better to be running with slower timings until things start working.


Here is what I want you to do:

1) Answer my question from post #12 which I asked again in post#15 and am asking again now.

2) use/start with the vk5121 file Add the glcdPinRES pin define if you want to hook up the reset signal and have the library use it.

3) report back the diagnostic output.

4) can you provide me with a link to the code that is working correctly with the display?

--- bill

bperrybap:
I couldn’t follow either of those two posts.

The diag tool never outputs information like this:
So I have no idea what is happening.
There are things that should be displayed on LCD during those tests.
Given the memory test failure it is highly improbably that any of those were actually successful.
Have you looked at the the html documentation to see what the LCD should look like during the diagnostics?

It also sounds like you have been flipping between arduino.cc and arduino.org IDEs.
These are two different IDEs created by two different companies.
Please stay with the arduino.cc IDEs until we get this working and do not change to a newer version should one come out.

Suppeschluerfer:
Initializing openGLCD → PASSED
Displaying Library version Screen → PASSED
Turning display on/off → PASSED
Displaying ChipSelect Screens → PASSED

Ok… I will write it this way:
Initializing openGLCD → This is working
Displaying Library version Screen → This is working
Turning display on/off → This is working
Displaying ChipSelect Screens → This is working[/quote]

bperrybap:
And you still have not answered the question I asked in post #12 and again in post#15.
This is very important information.

The other code: Winstar WG20232A(202x32) Graphic LCD Tutorial > 자료실 | 만물상닷컴 Is working fine with AtmelStudio… attach in DIP180_ATMega2560.zip file.

I never changed wire. I always use PortA and PortC.

bperrybap:
I know you are probably wanting to move fast but running around trying things is not the answer.
Time to slow down.
If you want my help in getting this display up and working (which will require modifications to the library code) you are going to have to follow a methodical process and do the things that I ask and provide very accurate information and answers to the questions I ask.

It sucks because I’m on it for 14 days to find a functioning library. With the library from above does this work well. It’s just that I’m at the beginning with openGLCD again and all steps must do it again.

bperrybap:
All I can see from the diagnostic output shown in post #16 is that the walking ones test failed just like in post #9 and #11.

True

bperrybap:
I referred you to the vk5121 config file because it was already set up for the correct pixels per chip of 60 which is what your datasheet showed.

It sounds like you have now have jumped over to the ManualConfig_sed1520-4GLM12232_Panel.h but have modified the DISPLAY_WIDTH to be 120 and CHIP_WIDTH to be 60 and also changed tWL from 200 to 160.

Now is not the time to start messing with timing parameters.

The timing in the 12232 file is faster and when trying to bring things up it is better to be running with slower timings until things start working.


Here is what I want you to do:

  1. Answer my question from post #12 which I asked again in post#15 and am asking again now.

  2. use/start with the vk5121 file
    Add the glcdPinRES pin define if you want to hook up the reset signal and have the library use it.

  3. report back the diagnostic output.

  4. can you provide me with a link to the code that is working correctly with the display?

— bill

OK i will start at the beginning again with vk5121 in the next post.

DIP180_ATMega2560.zip (288 KB)