Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

INTERFACING GRAPHIC LCD ssd1289

Status
Not open for further replies.
pic32 t6963c

Hello,

Yes I have currently changed my PIC to the PIC18F452, and also finally figured out how to display bmp pictures on it. Alas, it's still not centralized. I'd appreciate any suggestions. Thanks so much
 

lcd 128x160 22 pins

From the looks of it you have an offset of 64 (educated guess) in your x axis somewhere.

Apparently the LCD has a T6963C controller chip and mikroC has special library routines for it - maybe you could try those instead.

/Ram
 

pic18f2550 graphic lcd

What is bugging me is that, it still remains the same even after I reprogram it. The picture is still cut in half.
I've tried looking for T6963C , unfortunately where I am, this model is unavailable. All I have is what is available here. It's really frustrating.
 

graphic lcd interfacing with pic

I have some broken cellulars with color lcds I want to use their screens, can you give some examples?
 

file: pic32 t6963

Dear All,

I Am using the Graphical LCD T6963C Driver LCD (240 *128 Pixel). I Am using in Text Mode, when i am writing the Value to the Particular Address. Its writing to the Whole Display.

When i Am writing the Value A(0x21). to the Address location 2 . Its writing to the Whole Display. Can Anyone suggest me . How to write the Value to the Particular Address. How to initalise the Text Mode.
 

interface pic to glcd

Dear piculator,

Swap the GLCD pins "Chip Select 1" and "Chip Select 2" ie. Pins 15 and 16.

-ksp
 

jhd12864 lcd

Hi,
I would like to know how to interface PIC32 to a Hitachi 8.0" LCD Touch Panel. The specifications for the touch panel can be found here: **broken link removed**

If I buy a PIC32 development board, what additional hardware interfaces do I require, to drive the LCD display? I want to know the pre-requisites for connecting the two together, so that I can then work on the software application that will utilize the PIC32 and use the LCD touch panel as a graphical user interface.

Best regards,

Elvis Dowson
 

driving graphic lcd

Hello,

I am trying to interface graphical display of 1100(controller PCF8814) with AT Mega 16.I have pasted the program below.The LCD does not work.Please tell me if something is wrong.

#include<avr/io.h>
#include<avr/interrupt.h>
#include<util/delay.h>
#include<string.h>

#define BIT(x) (1 << (x))

#define CHECKBIT(x,b) x&b
#define SETBIT(x,b) x|=b;
#define CLEARBIT(x,b) x&=~b;
#define TOGGLEBIT(x,b) x^=b;

#define SCE 0x08
#define DC 0x04

volatile char pixel_lookup[8]={0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};

static const unsigned char font_lookup[96][5]=
{
{0x00, 0x00, 0x00, 0x00, 0x00},// (space)
{0x00, 0x00, 0x5F, 0x00, 0x00},// !
{0x00, 0x07, 0x00, 0x07, 0x00},// "
{0x14, 0x7F, 0x14, 0x7F, 0x14},// #
{0x24, 0x2A, 0x7F, 0x2A, 0x12},// $
{0x23, 0x13, 0x08, 0x64, 0x62},// %
{0x36, 0x49, 0x55, 0x22, 0x50},// &
{0x00, 0x05, 0x03, 0x00, 0x00},// '
{0x00, 0x1C, 0x22, 0x41, 0x00},// (
{0x00, 0x41, 0x22, 0x1C, 0x00},// )
{0x08, 0x2A, 0x1C, 0x2A, 0x08},// *
{0x08, 0x08, 0x3E, 0x08, 0x08},// +
{0x00, 0x50, 0x30, 0x00, 0x00},// ,
{0x08, 0x08, 0x08, 0x08, 0x08},// -
{0x00, 0x30, 0x30, 0x00, 0x00},// .
{0x20, 0x10, 0x08, 0x04, 0x02},// /
{0x3E, 0x51, 0x49, 0x45, 0x3E},// 0
{0x00, 0x42, 0x7F, 0x40, 0x00},// 1
{0x42, 0x61, 0x51, 0x49, 0x46},// 2
{0x21, 0x41, 0x45, 0x4B, 0x31},// 3
{0x18, 0x14, 0x12, 0x7F, 0x10},// 4
{0x27, 0x45, 0x45, 0x45, 0x39},// 5
{0x3C, 0x4A, 0x49, 0x49, 0x30},// 6
{0x01, 0x71, 0x09, 0x05, 0x03},// 7
{0x36, 0x49, 0x49, 0x49, 0x36},// 8
{0x06, 0x49, 0x49, 0x29, 0x1E},// 9
{0x00, 0x36, 0x36, 0x00, 0x00},// :
{0x00, 0x56, 0x36, 0x00, 0x00},// ;
{0x00, 0x08, 0x14, 0x22, 0x41},// <
{0x14, 0x14, 0x14, 0x14, 0x14},// =
{0x41, 0x22, 0x14, 0x08, 0x00},// >
{0x02, 0x01, 0x51, 0x09, 0x06},// ?
{0x32, 0x49, 0x79, 0x41, 0x3E},// @
{0x7E, 0x11, 0x11, 0x11, 0x7E},// A
{0x7F, 0x49, 0x49, 0x49, 0x36},// B
{0x3E, 0x41, 0x41, 0x41, 0x22},// C
{0x7F, 0x41, 0x41, 0x22, 0x1C},// D
{0x7F, 0x49, 0x49, 0x49, 0x41},// E
{0x7F, 0x09, 0x09, 0x01, 0x01},// F
{0x3E, 0x41, 0x41, 0x51, 0x32},// G
{0x7F, 0x08, 0x08, 0x08, 0x7F},// H
{0x00, 0x41, 0x7F, 0x41, 0x00},// I
{0x20, 0x40, 0x41, 0x3F, 0x01},// J
{0x7F, 0x08, 0x14, 0x22, 0x41},// K
{0x7F, 0x40, 0x40, 0x40, 0x40},// L
{0x7F, 0x02, 0x04, 0x02, 0x7F},// M
{0x7F, 0x04, 0x08, 0x10, 0x7F},// N
{0x3E, 0x41, 0x41, 0x41, 0x3E},// O
{0x7F, 0x09, 0x09, 0x09, 0x06},// P
{0x3E, 0x41, 0x51, 0x21, 0x5E},// Q
{0x7F, 0x09, 0x19, 0x29, 0x46},// R
{0x46, 0x49, 0x49, 0x49, 0x31},// S
{0x01, 0x01, 0x7F, 0x01, 0x01},// T
{0x3F, 0x40, 0x40, 0x40, 0x3F},// U
{0x1F, 0x20, 0x40, 0x20, 0x1F},// V
{0x7F, 0x20, 0x18, 0x20, 0x7F},// W
{0x63, 0x14, 0x08, 0x14, 0x63},// X
{0x03, 0x04, 0x78, 0x04, 0x03},// Y
{0x61, 0x51, 0x49, 0x45, 0x43},// Z
{0x00, 0x00, 0x7F, 0x41, 0x41},// [
{0x02, 0x04, 0x08, 0x10, 0x20},// "\"
{0x41, 0x41, 0x7F, 0x00, 0x00},// ]
{0x04, 0x02, 0x01, 0x02, 0x04},// ^
{0x40, 0x40, 0x40, 0x40, 0x40},// _
{0x00, 0x01, 0x02, 0x04, 0x00},// `
{0x20, 0x54, 0x54, 0x54, 0x78},// a
{0x7F, 0x48, 0x44, 0x44, 0x38},// b
{0x38, 0x44, 0x44, 0x44, 0x20},// c
{0x38, 0x44, 0x44, 0x48, 0x7F},// d
{0x38, 0x54, 0x54, 0x54, 0x18},// e
{0x08, 0x7E, 0x09, 0x01, 0x02},// f
{0x08, 0x14, 0x54, 0x54, 0x3C},// g
{0x7F, 0x08, 0x04, 0x04, 0x78},// h
{0x00, 0x44, 0x7D, 0x40, 0x00},// i
{0x20, 0x40, 0x44, 0x3D, 0x00},// j
{0x00, 0x7F, 0x10, 0x28, 0x44},// k
{0x00, 0x41, 0x7F, 0x40, 0x00},// l
{0x7C, 0x04, 0x18, 0x04, 0x78},// m
{0x7C, 0x08, 0x04, 0x04, 0x78},// n
{0x38, 0x44, 0x44, 0x44, 0x38},// o
{0x7C, 0x14, 0x14, 0x14, 0x08},// p
{0x08, 0x14, 0x14, 0x18, 0x7C},// q
{0x7C, 0x08, 0x04, 0x04, 0x08},// r
{0x48, 0x54, 0x54, 0x54, 0x20},// s
{0x04, 0x3F, 0x44, 0x40, 0x20},// t
{0x3C, 0x40, 0x40, 0x20, 0x7C},// u
{0x1C, 0x20, 0x40, 0x20, 0x1C},// v
{0x3C, 0x40, 0x30, 0x40, 0x3C},// w
{0x44, 0x28, 0x10, 0x28, 0x44},// x
{0x0C, 0x50, 0x50, 0x50, 0x3C},// y
{0x44, 0x64, 0x54, 0x4C, 0x44},// z
{0x00, 0x08, 0x36, 0x41, 0x00},// {
{0x00, 0x00, 0x7F, 0x00, 0x00},// |
{0x00, 0x41, 0x36, 0x08, 0x00},// }
{0x08, 0x08, 0x2A, 0x1C, 0x08},// ->
{0x08, 0x1C, 0x2A, 0x08, 0x08} // <-
};

void lcd_cmd(unsigned char cmd);
void lcd_data(unsigned char cmd);

void lcd_goto_xy(char x,char y)
{
y=y|0x40;
lcd_cmd(y);
x=(x*6)|0x80;
lcd_cmd(x);
}

void lcd_char(unsigned char character)
{
unsigned char j=0;
for(j=0;j<5;j++)
lcd_data((font_lookup[character-32][j] << 1));

}



void lcd_string(unsigned char font,unsigned char *string)
{
if(font==1)
{
unsigned char j;
lcd_cmd(0xae);
while(*string!='\0')
{
for(j=0;j<5;j++)
lcd_data((font_lookup[*string-32][j] << 1));
lcd_data(0x00);
string++;
}
}

lcd_cmd(0xaf);

}

void lcd_num_char(unsigned char num)
{
unsigned char H=0,T=0,O=0,j=0;
H=num/100;
T=(num - (H*100))/10;
O=(num - (H*100) - (T*10));

for(j=0;j<5;j++)
lcd_data(font_lookup[H+16][j]);
for(j=0;j<5;j++)
lcd_data(font_lookup[T+16][j]);
for(j=0;j<5;j++)
lcd_data(font_lookup[O+16][j]);

}

void lcd_num_int(unsigned int num)
{
unsigned char TT=0, TH=0, H=0, T=0, O=0, j=0;

TT=num/10000;
TH=(num-(TT*10000))/1000;
H=(num-(TT*10000)-(TH*1000))/100;
T=(num - (TT*10000)-(TH*1000)-(H*100))/10;
O=(num - (TT*10000)-(TH*1000) -(H*100) - (T*10));
for(j=0;j<5;j++)
lcd_data(font_lookup[TT+16][j]);
for(j=0;j<5;j++)
lcd_data(font_lookup[TH+16][j]);
for(j=0;j<5;j++)
lcd_data(font_lookup[H+16][j]);
for(j=0;j<5;j++)
lcd_data(font_lookup[T+16][j]);
for(j=0;j<5;j++)
lcd_data(font_lookup[O+16][j]);
}
char x_line=0, y_line=0;





void Gotoxy(char x,char y){
lcd_cmd(0xB0|(y&0x0F)); // Y axis initialisation: 0100 yyyy
lcd_cmd(0x00|(x&0x0F)); // X axis initialisation: 0000 xxxx ( x3 x2 x1 x0)
lcd_cmd(0x10|((x>>4)&0x07)); // X axis initialisation: 0010 0xxx ( x6 x5 x4)
lcd_data(pixel_lookup[y]);
}

void lcd_pixel(char x, char y) // 40,36
{
unsigned char x_block=0, y_block=0;
//x_block=x/16;
y_block=y/8;
y=y%8;

y_block=y_block|0x40;
lcd_cmd(y_block);
x=x|0x80;
lcd_cmd(x);
lcd_data(pixel_lookup[y]);
}

void lcd_clear(void){
unsigned int i;
lcd_cmd(0x40); // Y = 0
lcd_cmd(0xb0);
lcd_cmd(0x10); // X = 0
lcd_cmd(0x0);
lcd_cmd(0xae); // disable display;
for(i=0;i<864;i++)
lcd_data(0x00);
lcd_cmd(0xaf); // enable display;
}
void lcd_init(void)
{

CLEARBIT(PORTA, SCE)
CLEARBIT(PORTA, DC)
_delay_ms(5); // 5mS so says the stop watch(less than 5ms will not work)
SETBIT(PORTA, DC)
lcd_cmd(0x20); // write VOP register
lcd_cmd(0x90);
lcd_cmd(0xA4); // all on/normal display
lcd_cmd(0xAf);//display on
lcd_cmd(0x2F); // Power control set(charge pump on/off)
lcd_cmd(0x40); // set start row address = 0
lcd_cmd(0xb0); // set Y-address = 0
lcd_cmd(0x10); // set X-address, upper 3 bits
lcd_cmd(0x00); // set X-address, lower 4 bits
lcd_cmd(0xC8); // mirror Y axis (about X axis)
lcd_cmd(0xad);//a1 // Invert screen in horizontal axis
lcd_cmd(0xac); // set initial row (R0) of the display
lcd_cmd(0x07);
//lcd_cmd(0xF9); //
lcd_cmd(0xaf); // display ON/OFF
lcd_cmd(0xa9);
//lcd_cmd(0xE8);
lcd_clear(); // clear LCD
lcd_cmd(0xa7); // invert display
_delay_ms(500); // 1/2 Sec delay
lcd_cmd(0xa6); // normal display (non inverted)
_delay_ms(1000); // 1 Sec delay //lcd_cmd(0x21);
//lcd_cmd(0xc8);
//lcd_cmd(0x06);
// lcd_cmd(0x13);
//lcd_cmd(0x20);
// lcd_cmd(0x0c);
}


void lcd_cmd(unsigned char cmd)
{
CLEARBIT(PORTA, DC)
CLEARBIT(PORTA, SCE)
//SPDR=0xFE;
//while(!(CHECKBIT(SPSR,BIT(7)))) {}

SPDR=cmd;
while(!(CHECKBIT(SPSR,BIT(7)))) {}

SETBIT(PORTA, SCE)

}
void lcd_cmd1(unsigned char cmd)
{
CLEARBIT(PORTA, DC)
CLEARBIT(PORTA, SCE)
SPDR=0xFF;
while(!(CHECKBIT(SPSR,BIT(7)))) {}

SPDR=cmd;
while(!(CHECKBIT(SPSR,BIT(7)))) {}

SETBIT(PORTA, SCE)

}



void lcd_data(unsigned char dat)
{
SETBIT(PORTA, DC)
CLEARBIT(PORTA, SCE)

SPDR=dat;
while(!(CHECKBIT(SPSR,BIT(7)))) {}

SETBIT(PORTA, SCE)
}


void spi_write(unsigned char senddata)
{

SPDR=senddata;
while(!(CHECKBIT(SPSR,BIT(7)))) {}

}

void lcd_circle(unsigned char cx, unsigned char cy ,unsigned char radius)
{
int x, y,xchange, ychange, radiusError;
x = radius;
y = 0;
xchange = 1 - 2 * radius;
ychange = 1;
radiusError = 0;
while(x >= y)
{
lcd_pixel(cx+x, cy+y);
lcd_pixel(cx-x, cy+y);
lcd_pixel(cx-x, cy-y);
lcd_pixel(cx-x, cy+y);
//lcd_pixel(cx-x, cy-y);
//lcd_pixel(cx+x, cy-y);
lcd_pixel(cx+y, cy+x);
lcd_pixel(cx-y, cy+x);
lcd_pixel(cx-y, cy-x);
lcd_pixel(cx+y, cy-x);
y++;
radiusError += ychange;
ychange += 2;
if ( 2*radiusError + xchange > 0 )
{
x--;
radiusError += xchange;
xchange += 2;
}
}
}

int main(void)
{
unsigned int i=0;
DDRB=0xff;
DDRA=0xff;
PORTA=0xff;
SETBIT(SPSR,0)
SPCR=BIT(6)+BIT(4)+BIT(3)+BIT(2)+BIT(0);

lcd_init();



Gotoxy(10,20);
lcd_string(1,"vikky");

while(1){}
return 0;
}



The hardware connections are as below

XRES----------->PA2
SCE------------->PA3
SDIN------------->PB5
SCK-------------->PB7
VDD and VDD1 are given 3.1V supply
VSS is ground.

Please help me to find out the problem.

With Thanks and Regards

Vikky
 

glcd mikroc 16f887

elvisjohndowson said:
Hi,
I would like to know how to interface PIC32 to a Hitachi 8.0" LCD Touch Panel. The specifications for the touch panel can be found here: **broken link removed**

If I buy a PIC32 development board, what additional hardware interfaces do I require, to drive the LCD display? I want to know the pre-requisites for connecting the two together, so that I can then work on the software application that will utilize the PIC32 and use the LCD touch panel as a graphical user interface.

Best regards,

Elvis Dowson

to use this with a pic32 you would need a display driver with a lot of ram.
For 16bit colour you would need 768k - SSD1962 or an equiv epson would do the job.

Cheers
ntfreak
 

pic18 glcd

Oh!.. dear all..
I am a new one for EDA Board. Its a very nice chatting room for technical speach... I require the SSD1289 TFT basic operation.. I think you are all already posted the kind of idea.. I will go through and come back to your knowledge.

Thanks
Apple_apple

Added after 1 hours 46 minutes:

please Any one post the full datasheet for SSD1289 with comand set. Please help me...

thanks
Apple.
 

32x64 graphical lcd details

this is the only data i have

Cheers
ntfreak
 

Attachments

  • ssd1289_1.1_1140.pdf
    803.7 KB · Views: 157

pic18f452 t6963c

Hi, Im using the TechToys 2.2" LCD and it works well, however I wanted to know if there is an 8bit colour mode?

I want to do rapid drawing and sending 2 colour bytes slows it down too much, anybody know how to do 8bit colour? I couldnt find it in the datasheet and i'm worried it doesnt have it.
 

graphic lcd pic32

HI!
I am interfacing Graphic LCD JHD12864E with P89v51RD2 for the first time. I did connections as per the example on net. and tried the sample code. The problem is, the whole LCD is turned to black except the line which I select. Therefore, I am no able to view the rest of the data, other than the row I select. What could be the problem. Can anyone help me out.


Here is the code I used,

//==================================================
#include <reg51.h>

sbit en=P2^0;
sbit cs1=P2^1;
sbit cs2=P2^2;
sbit rs=P2^3;
sbit rw=P2^4; // this pin is not used and shorted to ground (write mode only)


void delay()
{
int k,l;
for(k=0;k<3;k++)
for(l=0;l<50;l++);
}

void sendCommand(unsigned char val)
{
rs=0;
en=1;
P1=val;
delay();
en=0;
}

void sendByte(unsigned char dat)
{
rs=1;
en=1;
P1=dat;
delay();
en=0;
}

void main()
{
int i=0,j=0;
delay();
delay();
cs1=1;
cs2=0;
sendCommand(0x3f); //switch on display
sendCommand(0xc0); //select start line
for(j=0;j<8;j++)
{
for(i=0;i<64;i++)
{
sendByte(i); //just fill LCD randomly
}
sendCommand(0xb8+( j*8 )); //select next row
i=0xff;
while(i--); //delay
}
while(1); //halt
}
//============================================
 

INTERFACING GRAPHIC LCD

Hi, this is my first post.
I wanna know if there're some post on how to control bigger lcds with PICs, it'd be awesome to find.
 

INTERFACING GRAPHIC LCD

any know how to program a glcd in order to display a sin graph ?
 

Re: INTERFACING GRAPHIC LCD

hello
i have to display on a graphic lcd 128x64 a dot at a specificated coordonates(x,y and z). my lcd is dem128064a syh-ly and my microcontroller is 80c51.
i am using assembly language.
can anyone give me some help with this?
i do not want to gave the program just like that. i need that someone explain me how to do this.
i am sorry if this is to easy for you(i have seen all the discussions and the projects you have made and this is too easy for you) but for me is not.
 

INTERFACING GRAPHIC LCD

Hi nitinrakheja,
You can use the internal mikroC library for interfacing with GLCD. Under help, there is a segment describing how to use the GLCD library. Studying that will provide a clear understanding.
Hope this helps.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top