Is Arduino 6800 series or 8080 series?

I am using a 128x64 LCD screen by tianma. The part number is TM12864H6CCOWA. The product page in my dealer's website is http://nskelectronics.com/graphic_display_tm12864.html. The link to the datasheet: http://nskelectronics.com/files/64x128_graphics_lcd_datasheet_v1_1__0.pdf. The controller is NT75451.(Datasheet: http://www.melt.com.ru/docs/NT75451v1.0.pdf).

The LCD display has a pin 'C86', which is described in the datasheet as 6800/8080 select(page: 9 of the LCD datasheet). But i'm using it with the arduino board. So which kind of chip is the arduino and if it doesn't belong to both categories, does it mean that the LCD display is incompatible with arduino?

Thank you.

"6800" mode refers to having a "R/~W" (Read high, write low) signal and an "enable" signal - what the HD44780 has in fact, while "8080" mode refers to separate "~RD" and "~WR" enables, each active low.

If you only ever want to write to the display, you can either hold "R/~W" permanently low and use the enable to write data in "6800" mode, or hold "~RD" permanently high and pull "~WR" low to write data in "8080" mode. And it is just as easy to arrange to read data if you need to.

Since the Arduinos are microcontrollers rather than bus-implemented microcomputers, you have to program I/O lines to generate the control signals anyway, and it is exactly as easy in either mode.

Just use 8080 mode, no-one uses anything else as far as I can tell.
All the eBay TFT modules with parallel interfaces I've seen only support
8080 mode.

The Arduino is not a microprocessor with an external bus
so it is neither 6800 nor 8080 (in fact its Havard architecture so it can't be really).

Thank you Paul__B and MarkT for your replies. But I have another doubt. In the LCD datasheet(link mentioned in main post), there are two algorithms for initialization. One algorithm is used when the built-in power is being used immediately after turning on the power and the other one is used when the built-in power is not being used immediately after turning on the power(Ref. Page 14 & 15 in LCD datasheet). Which algorithm should I choose? Actually i did not understand the term built-in power.

Also in the algorithms, there is a step to check if the power is stabilized, then set res pin H. How to check if the power is stabilized?

Having had a good think about this, I believe they are referring to putting the display into its standby mode - that is, initialising it but then switching the LCD display effectively "off" (the backlight you have to control yourself by extra circuitry if you wish to switch it on and off).

By "built-in power" they appear to refer to the multiplexing circuitry including the charge pump which generates 15V from the 3V supply to actually drive the LCD segments.

You need the source code the site offers. I can't spot it, but I would say if you copy it and adapt for Arduino, you should not have to worry about too much.

Not too much - hopefully. :smiley:

Well, I couldn't find any code in my dealer's site and on tianma site, but found a source code on this site but it is for a different device, not AVR. The link to that product page: http://coineltech.com/index.php?main_page=product_info&products_id=28.

Well, for waiting for power to stabilize, can I put a delay of 2 s at the beginning of the setup function.

Again, thank you very much for your reply.

Actually i did not understand the term built-in power.

These displays were designed to be used as part of a lager device such as a desktop printer. As such the display will always be used with the printer and will be powered by the printer. The printer includes a power supply and the display will always be powered by this 'built-in' power supply so the characteristics of the LCD power supply are known.

Which algorithm should I choose?

You should choose the 'Initialization by instruction' algorithm if you would like your display to operate reliably. There are other factors to consider (other than the power supply) including the possibility that the Arduino might be reset without removing the power.

For a complete description of all of this follow the LCD Initialization link at http://web.alfredstate.edu/weimandn. Other links on the same page will lead you to programming examples.

Don

I wrote a code for this LCD referring to the data sheet of the NT75451 controller and a sample code for LPC1114 device. But I ended up with no result. I expected a filled up rectangle to show up on screen, but nothing happened. Here is the code that I wrote.(The loop and setup function are towards the end.). Can someone please check out what's wrong with the code. I'm completely new to this advanced electronics, so I have no clue how to proceed further.

Thank you.

//My variables.
#define DB0 6
#define DB7 DB0 + 7
#define BUSY_FLAG DB7
#define RW 5
#define RST 3
#define RS 4
#define CS1 2
#define PAGE1	0xB0
#define COL1	0
#define NOP() asm("NOP")




byte pow2(byte n)
{   byte i, ans;
    for(i = 1; i <= n; i++)
     ans *= 2;
    return ans;
}

void write_cmd(byte cmd)
{  int i;
   digitalWrite(RS, LOW); NOP();
   digitalWrite(CS1, LOW);NOP();
   digitalWrite(RW, LOW);NOP();
   for(i = DB0; i <= DB7; i++)
     digitalWrite(i, LOW);NOP();
   for(i = 0; i < 8; i++)
     digitalWrite(i + DB0, (cmd & byte(pow(2, i))) >> i);NOP();
   delay(10);
   digitalWrite(RW, HIGH);NOP();
   digitalWrite(CS1, HIGH);NOP();
   digitalWrite(RS, HIGH);NOP();
   Serial.println("Command written.");
}

void set_page(byte page, byte col)
{
  byte msb,lsb;
  msb	= (((col & 0xF0) >> 4)| 0x10);
  lsb	= (col & 0x0F);
  write_cmd(page);
  write_cmd(msb);
  write_cmd(lsb); 
}

void write_data(byte data)
{ int i;
  digitalWrite(RS, HIGH); NOP();
  digitalWrite(CS1, LOW);NOP();
  digitalWrite(RW, LOW);NOP();
  for(i = DB0; i <= DB7; i++)
      digitalWrite(i, LOW);NOP();
  for(i = 0; i < 8; i++)
     digitalWrite(i + DB0, (data & byte(pow(2,  i))) >> i);  NOP();
  delay(10);
  digitalWrite(RW, HIGH);NOP();
  digitalWrite(CS1, HIGH);NOP();
  digitalWrite(RS, LOW);NOP();
}

byte read_data()
{
  byte rd = 0, i;
  digitalWrite(RS, HIGH); NOP();
  digitalWrite(CS1, LOW);NOP();
  digitalWrite(RW, HIGH);  NOP();
  for(i = DB0; i <= DB7; i++)
       pinMode(i, INPUT);
  for(i = DB0; i <= DB7; i++)
      rd += digitalRead(i) * pow(2, i); NOP();
  digitalWrite(RS, LOW); NOP();
  digitalWrite(CS1, HIGH);NOP();
  digitalWrite(RW, LOW);NOP();
  for(i = DB0; i <= DB7; i++)
       pinMode(i, OUTPUT);NOP();
  return rd;
}

void initLCD()
{        
  
  pinMode(RST, OUTPUT);
  digitalWrite(RST, LOW);
  Serial.println("Wait for 10 seconds.");
  delay(10000);
  Serial.println("Wait released.");
  digitalWrite(RST, HIGH);
        pinMode(RS, OUTPUT);
        pinMode(RW, OUTPUT);
        pinMode(CS1, OUTPUT);
        for(int i = DB0; i <= DB7; i++)
          pinMode(i, OUTPUT);
    
	write_cmd(0xA3);		// LCD bias
	write_cmd(0xA0);		// ADC select	
	write_cmd(0xC0);  	        // COM Normal
        write_cmd(0x89);                //DC-DC setup.
        write_cmd(0x01);                //Select 4 times boosting circuit.
 	write_cmd(0x22);		// reg resistor select
	write_cmd(0x81);		// Ref vg select mode
	write_cmd(0x3f);		// Ref vg reg select
	write_cmd(0x2F);		// Power control
	write_cmd(0x40);		// Initial display line 00
	write_cmd(0xA4);		// Normal display
	write_cmd(0xA6);		// REverce display a7
	write_cmd(0xAF);		// Display ON
	write_cmd(0XB0);		// Set page address
	write_cmd(0x10);		// Set coloumn addr  MSB 
	write_cmd(0x00);		// Set coloumn addr LSB  

      Serial.println("Initialization over.");
}

/* clears entire lcd or clears all page*/
void blank(void)
{
	unsigned char i = 0,j = 0;
	
	set_page(PAGE1,COL1);		// initial page, col
		
	for(i = 0; i < 8; i ++)
	{
          for(j = 0; j < 128; j ++)
		  {
            write_data(0x00);
		  }
          set_page(PAGE1 + i + 1 , COL1);	// increment page
	}
	
	set_page(PAGE1,COL1);		// initial page,col	    
}

void setup()
{    Serial.begin(9600);

	initLCD();
	blank();
	int i, j;
        set_page(PAGE1+5, COL1);
       
         for(i = 0; i < 128; i++)
           write_cmd(0xff);
        Serial.println("60 second delay.");
	delay(60000);

}

void loop()
{
	
}

If the above code is correct and only problem is with the code in setup() function, can someone put some code that would work so that I can test it out.

Thank you.

Code tags, please, not "quote".

Do please Modify that last post.

Hi Nishal,

I am using the same GLCD. Can you please share your code.

Did you happen to look at the date on that post?

Nishal has not submitted any posts for nearly two years. It is fairly unlikely that someone who has posted, would not engage in further "conversation" yet still be monitoring posts here, or in fact has set up a response email. If he was occasionally reading here, he might notice a Personal Message if you sent him one.