LCDInfo.com
http://forum.lcdinfo.com/

LCD datasheet (NEC02070AA) + some KS0108 code
http://forum.lcdinfo.com/viewtopic.php?f=6&t=95
Page 1 of 1

Author:  AcidBit [ Fri Jan 17, 2003 1:20 ]
Post subject:  LCD datasheet (NEC02070AA) + some KS0108 code

Hello
Do you know the NEC02070AA DISPLAY?

Author:  Henri [ Fri Jan 17, 2003 21:32 ]
Post subject: 

I don't know that display and a quick google search didn't reveal anything, sorry.

Maybe someone else here would know ?

Author:  Spark [ Sun Jan 19, 2003 11:14 ]
Post subject: 

I dont know about that lcd, but if you know what controller chip there is. You can try hollowing link's.
http://www.apollodisplays.com/manuals.php
http://www.eio.com/public/lcd/subject.html#2822

Author:  AcidBit [ Tue Jan 21, 2003 17:36 ]
Post subject:  datasheet lcd

Thanks,but my controller is a JRC CHIP...I don't know if it is compatible with ks0108 or t6936c controller or other.


Do ks0108 has memory for chr pattern ?
Thanks

Author:  Henri [ Tue Jan 21, 2003 21:02 ]
Post subject:  Re: datasheet lcd

AcidBit wrote:
Do ks0108 has memory for chr pattern ?

Do you mean if KS0108 has character generator ? It doesn't so you have to make your own font routines to draw text.

Author:  AcidBit [ Wed Jan 22, 2003 12:07 ]
Post subject:  lcd datasheet

Hello
it's OK..

I found this code in C language (CCS COMPILER ) for ks0108 128x64 lcd. it is free.
I posted it for newbie , it could somebody to help. I use it.
Do you know it ?


Code for PIC16f84-4/p
CCS COMPILER C

#include <16F84.H>
#use delay (clock=4000000)
#use fast_io(A)
#use fast_io(B)
#fuses nowdt,xt


struct ballstruct {
int1 xvect;
int1 yvect;
int8 xloc;
int8 yloc;
int8 oldx;
int8 oldy;
int8 oldx1;
int8 oldy1;
} *currball,ball[3] = {3,23,70,23,7 0,23,70,
2,28,40,28,40,28,40,
1,50,30,50,30,50,30};

char CONST msg1[4] = {0xc0,0x40,0xb8,0x3f};
int8 mult;

void write(char c) {
output_b(c); //Put character on PORTB
output_high(PIN_A3); //Pulse LCD Enable line
delay_cycles(1);
output_low(PIN_A3);
}

void setxy(int8 x,int8 y) { //x=vertical point (0-63) & y=horizontal point (0-127)
if(bit_test(y,6)) { //if y>63, then switch to controller on right side
output_high(PIN_A0);
output_low(PIN_A1);
}
else { //else use left side controller
output_low(PIN_A0);
output_high(PIN_A1);
}
output_low(PIN_A4); //Switch to Instruction mode
write(0xB8 | (x/8)); //Set memory bank to (x / 8)
write(0x40 | (y&0x3F)); //Set column to (y & 0x3F)
output_high(PIN_A4); //Switch to Data mode (Don't forget the pullup resistor!)
}

#int_rtcc
clock_isr() {
int8 data,oldx,oldy,x;

for(x=0;x<3;x++) { //Process all 3 balls
currball=&ball[x]; //Grab pointer to current ball

if((currball->xloc==0) && (currball->xvect==0)) //Edge detection on x-axis
currball->xvect = 1;
else if((currball->xloc==62) && (currball->xvect==1))
currball->xvect = 0;

if((currball->yloc==0) && (currball->yvect==0)) //Edge detection on y-axis
currball->yvect = 1;
else if((currball->yloc==126) && (currball->yvect==1))
currball->yvect = 0;

if(currball->xvect==0) //A value of 0 in vector will subtract 1 from the x-axis position
currball->xloc--;
else //A value of 1 in vector will add 1 to the x-axis position
currball->xloc++;

if(currball->yvect==0) //ditto
currball->yloc--;
else
currball->yloc++;

if(mult==2) { //Only update the screen every 3 interrupts
oldx=currball->xloc; //Save old position so it can be erased later
oldy=currball->yloc;

setxy(currball->oldx1,currball->oldy1); //Erase really old ball
write(0); // (2 pictures of each ball are on the
setxy(currball->oldx1,currball->oldy1+1); // screen at one time to minimize fading)
write(0);
setxy(currball->oldx1+1,currball->oldy1);
write(0);
setxy(currball->oldx1+1,currball->oldy1+1);
write(0);

currball->oldx1 = currball->oldx; //Move old position to really old position
currball->oldy1 = currball->oldy;

data=0;
bit_set(data,(currball->xloc % 8 )); //Draw new ball
if((currball->xloc % 8 )<7) { // This is a brute-force method, but it works
bit_set(data,(currball->xloc % 8 )+1);
setxy(currball->xloc,currball->yloc);
write(data);
setxy(currball->xloc,currball->yloc+1);
write(data);
}
else {
setxy(currball->xloc,currball->yloc);
write(data);
setxy(currball->xloc,currball->yloc+1);
write(data);
setxy(currball->xloc+1,currball->yloc);
write(1);
setxy(currball->xloc+1,currball->yloc+1);
write(1);
}
currball->oldx = oldx; //Move current position to old position
currball->oldy = oldy;
}
}
if(mult==2) { //If screen is updated, reset counter
mult=0;
}
else { //Otherwise increment
mult++;
}
}

void init() { //Initialize LCD
int8 x,y;

output_a(0); //Setup everything as outputs
output_b(0);
set_tris_a(0);
set_tris_b(0);

output_high(PIN_A0); //CS1 - high
output_low(PIN_A1); //CS2 - low
output_low(PIN_A4); //Instruction mode
for(x=0;x<4;x++) { //Send init chars
write(msg1[x]);
}

output_low(PIN_A0); //ditto, but for other controller
output_high(PIN_A1);
output_low(PIN_A4);
for(x=0;x<4;x++) {
write(msg1[x]);
}

output_high(PIN_A4); //My LCD starts up with all ram locations = 0xFF
output_high(PIN_A0); //This clears the ram
output_low(PIN_A1);
for(x=0;x<8;x++) {
for(y=0;y<64;y++) {
output_low(PIN_A4);
delay_cycles(1);
write(0xB8 | x);
write(0x40 | y);
output_high(PIN_A4);
delay_cycles(1);
write(0);
}
}
output_low(PIN_A0); //Clear other side
output_high(PIN_A1);
for(x=0;x<8;x++) {
for(y=0;y<64;y++) {
output_low(PIN_A4);
delay_cycles(1);
write(0xB8 | x);
write(0x40 | y);
output_high(PIN_A4);
delay_cycles(1);
write(0);
}
}
}

void main() {
int8 x;

init(); //Initialize LCD


setup_counters(RTCC_INTERNAL,RTCC_DIV_64); //Setup interrupts

enable_interrupts(INT_RTCC); //Start Interrupts
enable_interrupts(GLOBAL);



while(1); //Twiddle thumbs forever...
//Probably user input code will go here




}


note:
when I use write function for example:

setxy(0,0);
write (1) ; b'0000001'

The PIC 'light on' two pixel and not one. I dont't know why.

lcd screen
____________________________________________
|. pixel(0,0) pixel(0,64) . (why?)
|
|
|

Author:  Henri [ Wed Jan 22, 2003 21:12 ]
Post subject: 

Thanks for posting that code, I'm sure someone will find it useful. Maybe I could take advantage of it also.

You probably know that 128x64 KS0108 displays are made of two 64x64 controllers. It seems that when you write something to one controller the commands go to the second also. CS pins are used to tell the controllers which one is enabled at a time. I didn't check the code very carefully but I think it should be ok unless you have made some changes to it. So maybe there's some problem with your wiring of CS pins. Did you find any information about the hardware connection used with this code ?

Author:  AcidBit [ Thu Jan 23, 2003 0:02 ]
Post subject:  lcd datasheet

The code is written by Barry Michels <bmichels@EPIX.NET>

RW pin is grounded

port A0 CS1
port A1 CS2
port A3 Enable line
port A4 Register Select
port B data lines

note:
I resolved my problem a wire was wrong..

I would to use a touch screen togheter graphic lcd, Do you know touch screen?

Author:  Henri [ Thu Jan 23, 2003 21:06 ]
Post subject: 

Good to hear that your problem is now solved.

I don't have any experience with touch screens but they are an interesting subject that I'd like to explore sometime.

Author:  amsee [ Mon May 12, 2003 10:58 ]
Post subject:  nec02070aa

Hi!
Have you found the specs for the display?
I've bought one such thing myself and the supplier told me they can give me the specs, if I can't find them.
I didn't think i'm not going to find the stuff on the net, so i said no thanks.
But I can go back there and ask for the disk. If you still need the file, I can send it to you.

Author:  aswotim [ Wed Jan 11, 2012 16:17 ]
Post subject:  Re: LCD datasheet (NEC02070AA) + some KS0108 code

I have one LCD display , too. Please let me know the pin configuration, please!
Thank you!

Page 1 of 1 All times are UTC + 2 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/