![]() | ![]() | ![]() |
| | |||||||
| Notices |
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink (permalink)) |
| 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"); Below is the link to the datasheet of the driver it is using. Code: http://www.ortodoxism.ro/datasheets/epson/SED1566.pdf I would be grateful if somebody can help me in this.. Thanks.. | |
| | |
| | (permalink (permalink)) |
| 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"); 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.. | |
| | |
| | (permalink (permalink)) | |
| Quote:
Hi, Any special library for nokia mobile phones? How do i do that for color mobile LCD panels? Any suggestion | ||
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |