Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers

Notices


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 18th September 2007, 02:22 PM   (permalink (permalink))
Default Nokia 7110 LCD + questions regarding code and behaviour of LCD.

Hi..
I found this Nokia 7110 LCD code (in CCS) on the internet and I want to learn to understand the code. With the help of datasheet, I managed to figure out most of the things but there are still certain things that I need help on.

According to the datasheet, the LCD display area consist of 96 horizontal pixels. That means that it can display 16 characters of 6 pixel width (5 pixel width with 1 empty pixel between characters for seperation purposes). However, I just cannot manage to display 16 full complete characters without its side getting cropped off (refer to the picture attached).

If I am not mistaken, below are the 2 parts of the code that is responsible for making this happen.
Code:
void nokia_gotoxy(char xnokia, char ynokia) {
   char xaddr;
   xaddr = (0x32+((xnokia-1)*6)) << 4;
   nokia_write_command(0xB0 | (ynokia-1));       // page address set
   nokia_write_command(0x10 | xaddr);            // column address 4 most bit set
   nokia_write_command(xaddr>>4);                // column address 4 least bit set
}

// Part of main
   nokia_gotoxy(1,1);
   printf(lcd_chr,"01234567890123456789");
I have tried putting spaces (using spacebar) and also changing the xaddr value but i simply cannot make it happen. I have spent countless hours going through the datasheet but i just don't understand what it is saying and because of that, I don't know what I need to change.

Below is the link to the datasheet of the driver it is using.
Code:
http://www.ortodoxism.ro/datasheets/epson/SED1566.pdf
The complete source code is attached below.

I would be grateful if somebody can help me in this..
Thanks..
Attached Images
File Type: jpg Nokia 7110 LCD.jpg (33.8 KB, 35 views)
Attached Files
File Type: c Nokia_7110_01.c (12.2 KB, 26 views)
MrNobody is offline  
Reply With Quote
Old 18th September 2007, 03:27 PM   (permalink (permalink))
Default Found the solution.

Yes... finally.. I found the solution...
I have been looking at the wrong section in the datasheet all the while... The hours spent in looking at the datasheet might have made my brain too tired to think and not able to process the information just now.. After a few hours of break, finally my mind able to process the information better..

Ok... here is what I changed

Code:
void nokia_gotoxy(char xnokia, char ynokia) {
   char xaddr;
   xaddr = (0x00+((xnokia-1)*6));
   nokia_write_command(0xB0 | (ynokia-1));       // page address set
   nokia_write_command(0x11 | xaddr);            // column address 4 most bit set
   nokia_write_command(xaddr | 0x02);                // column address 4 least bit set
}

   nokia_gotoxy(1,1);
   printf(lcd_chr,"0123456789012345");
And attached is the result of the simulation..

However, there is still one minor problem that I cannot figure out how to solve.. Refering to the picture attached, the section that is inside the red circle is actually caused by the first row of the numbers 0, 1, 2, 3 .

For some reason which I cannot explain, the the first few columns of COM1 (row 1) is overlapped with the last few columns of COMS (last row).

Any idea on how I can cake the COMS row (last row) completely blank..?
Thanks..
Attached Images
File Type: jpg Nokia 7110 LCD2.jpg (45.6 KB, 20 views)
MrNobody is offline  
Reply With Quote
Old 19th September 2007, 07:50 AM   (permalink (permalink))
Default

Quote:
Originally Posted by MrNobody
Yes... finally.. I found the solution...
I have been looking at the wrong section in the datasheet all the while... The hours spent in looking at the datasheet might have made my brain too tired to think and not able to process the information just now.. After a few hours of break, finally my mind able to process the information better..

Ok... here is what I changed

Code:
void nokia_gotoxy(char xnokia, char ynokia) {
   char xaddr;
   xaddr = (0x00+((xnokia-1)*6));
   nokia_write_command(0xB0 | (ynokia-1));       // page address set
   nokia_write_command(0x11 | xaddr);            // column address 4 most bit set
   nokia_write_command(xaddr | 0x02);                // column address 4 least bit set
}

   nokia_gotoxy(1,1);
   printf(lcd_chr,"0123456789012345");
And attached is the result of the simulation..

However, there is still one minor problem that I cannot figure out how to solve.. Refering to the picture attached, the section that is inside the red circle is actually caused by the first row of the numbers 0, 1, 2, 3 .

For some reason which I cannot explain, the the first few columns of COM1 (row 1) is overlapped with the last few columns of COMS (last row).

Any idea on how I can cake the COMS row (last row) completely blank..?
Thanks..

Hi, Any special library for nokia mobile phones? How do i do that for color mobile LCD panels?
Any suggestion
flemmard is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 02:54 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.