• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

GLCD (Wayton MG1206E) CS1 CS2 polarity ...

Status
Not open for further replies.

granddad

Well-Known 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 ).

wayton1206e2.jpg
GLCD_lashup.jpg
 
Last edited:

Pommie

Well-Known Member
Most Helpful Member
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.
 

Pommie

Well-Known Member
Most Helpful Member
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
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
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..
 

atferrari

Well-Known 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 ).

View attachment 106034
View attachment 106031
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:

atferrari

Well-Known Member
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. :happy:

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

granddad

Well-Known Member
ThanksM.jpg

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.
 

granddad

Well-Known Member
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 .

GLCD_2.jpg
 

Pommie

Well-Known Member
Most Helpful Member
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.
 

granddad

Well-Known Member
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 ....GLCD_33.jpg
 

atferrari

Well-Known Member
For 2x16 and 2x20 LCDs I use a fixed delay, so no check of busy condition. Pin is, IIRC, grounded.
 

granddad

Well-Known Member
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 .
GLCDtesting.jpg
 

Pommie

Well-Known Member
Most Helpful Member
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.

Latest threads

EE World Online Articles

Loading
Top