GLCD (Wayton MG1206E) CS1 CS2 polarity ...

Status
Not open for further replies.

granddad

Well-Known Member
Most Helpful Member
I had this 2.5” 128x64 GLCD (WAYTON MIT MG1206E SGL) in my parts box , and in a crazy moment I thought I would see if it worked ( It was from a Maplin grab bag of led / lcd junk) , found some data on the www and lashed up a test bed, having realised graphics LCD require big-ish data squirted at them I used a dsPIC33EV256GM104 it is has 16k ram available. ( no details of the 20 pins on the pcb ) several days later ….. success. Well some lines on the screen, seems NT7108 / KS0108 controllers are not all the same, this one has a high level CS1 and CS2 ,( Left and right side controllers) not seen any mention of this on the files / posts found on the web. So though I would share. My intention is to write fonts / graphics into an array in PIC memory and just display that….
( colours are just my BB wire reference ).


 
Last edited:
Not sure if it's useful or not but attached is some code I wrote about 10 years ago for one of these displays.

Mike.
 

Attachments

  • GLCD base code.c
    13.3 KB · Views: 280
Wow Mike... That's what I call a concise library.. Mine is half that size.. I do, however, use a double buffer, so alot of my code write's are to the spare canvas...

Well done though!!
 
Thank you Mike, I'm getting to understand the GLCD controller ( possibly ! )
.
 
I particularly like the circle routine because it completely baffles people how it works.
Code:
void Circle(unsigned char cx,unsigned char cy,unsigned char r){
    unsigned char x,y,p;
    x=0;
    y=r;
    p=-r/2;
    while(x<=y){
        Plot8(cx,cy,x,y);
        x=x+1;
        if(p>128){
            p+=2*x+1;
        }else{
            y--;
            p+=2*(x-y)+1;
        }
    }
}

Mike.
 
The way the circle routine works is the same as those nail and string curved paterns. The axes are at right angles in the circle case and a quarter circle is generated by working along "the nails". Using lines at different angles and lengths should give various arcs.

Mike
 
I know.... But a arc could cross the 90 degree, that means the 8 point routine won't do the job.. So if you come across one!! I have written one, but it's a little slow, too many iterations... if this and if that!! Ill convert it to asm to see if I can boost the speed..
 

Long time I do not use one of these. From what I recall, not all manufacturer use CS1 ans CS2 in the same way. Besides the allocation of pins, that is what distinguish GLCDs from each other.
 
Last edited:
Hola granddad,

I inherited from a failed replacement (difference in pins allocation) a brand new one.

After searching for the datasheet of a quickly vanished manufacturer in Brazil, I realized that there were kind of discernible patterns among the variation for different brands.

I finally compiled the data from several tens of datasheets and based on the pins allocated to power I could use mine successfully. The data is shown in the attached pdf. With my "electronic" PC down, it is good I got a proper back up handy. Hope you can wade through it.

One day I should post my implementation of the John Conway's game "Life". A piece of judicious programming I enjoyed much. Really.

¡Buena suerte!
 

Attachments

  • Identifying the pins of a GLCD 12864 - Agustín Ferrari.pdf
    9 KB · Views: 293


Mike, Not copy and paste of your code , but got lots of help etc, understand the true type working , just have to reinvent it for my project... Cheers.
 
I now have 2 more 128x64 GLCD modules to play with , a Winstar , ( blue white) , 15GBP from Rapid and an 'unknown' from China ( cheap) , this last one looks interesting, seems to be similar to the character (HD44780) LCDs , the single controller (ST7920) can do 8 bit or 4 bit parallel , or serial ... (SPB pin) and has build in character font .

 
Looks like good progress. I notice the odd spacing on the font above. I used a 5 byte wide proportional font and used 0x55 for bytes that should be ignored. If you modify your code it should look a lot better.

Mike.
 
0x55 = Got you Mike .. Lashup has condensed to 28pin dsPIC33EV , but could do with some spare I/O pins , I was planning to take GLCD RST to Vdd and W/R to Gnd. as I don't think I need to read the display ram or busy status.. ? appreciate your ( anybody's) input ....
 
For 2x16 and 2x20 LCDs I use a fixed delay, so no check of busy condition. Pin is, IIRC, grounded.
 
Moved up to the larger Winstar 128x64 blue display, and thanks to Pommie Mike's file , have the basics working , with RST at Vdd and R/W to gnd . Invert options and font spacing sorted, the dsPIC33 , works well only used 2% of program space ... also have a few pins to play with .
 
Looking good. The main drawback with those displays is there speed. If you update a value every 0.5 second it becomes unreadable. Shame really as they are otherwise very useful.

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…