LCDInfo.com

http://www.lcdinfo.com
It is currently Fri May 02, 2025 18:52

All times are UTC + 2 hours




Post new topic Reply to topic  [ 288 posts ]  Go to page Previous  1 ... 10, 11, 12, 13, 14, 15, 16 ... 20  Next
Author Message
 Post subject:
PostPosted: Wed Jan 24, 2007 23:57 
Offline

Joined: Sun Jan 07, 2007 13:01
Posts: 10
I've put pics of a selection of these LCDs online to help people ID driver types when buying from ebay etc. :
http://www.electricstuff.co.uk/noklcd.html


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 10:35 
Offline

Joined: Sun Feb 11, 2007 15:49
Posts: 4
Hi all, they are new user, excuse me for my English :oops:

I'm working with display nokia and pic 18f452 and the code of Jaime Fernández-Beloved Belmonte of :
http://www.hobbypic.com/index.php?optio ... &Itemid=36,
with the compiler of the CCS.
It works perfectly but I have found some problem of imperfection in the font:
Send screen:

Image

as you see I have plot two font various and the space between the two font too much seems to be wide unless not letter “m” that the space is too much short
How resolve it?
Thanks ,
Michele

The code:

//-----------------------------------------------M A I N ---------------------------
gclcd_font(0);
gclcd_color(BLUE);
gclcd_gotoxy(5,20);
printf(gclcd_putc,"lmnopqrstvuz\n\n");
// gclcd_gotoxy(5,30);
printf(gclcd_putc,"This is a \n test");


gclcd_font(1);
gclcd_color(RED);
gclcd_gotoxy(20,80);
printf(gclcd_putc,"Mnopqrs");
while (true); // Variamos el contraste


//-------------------------------- F U N C T I O N --------------------------

int gclcd_putc(int16 c)
{
unsigned int16 index;
unsigned int8 i, j, w, data, skipped=1;
unsigned int8 startY;

startY=yCoord;

gclcd_cmd(MEM_CONTROL);
gclcd_data(0b01101000);

if(c == '\n') gclcd_newline();
if(c == '\f') gclcd_cls();
if(c < 32) return 0;

c -= 32;
index = c*(font.width)*(font.height/8)+2;//+font.width;


for(w=0; w<font.width; w++)
{
for(i=0; i<font.height/8; i++)
{
if (font_select == 0){
data = Arial9[index++]; // tipo de letra usado
}else if(font_select == 1){
data = Times_New_Roma8[index++]; // tipo de letra usado
}else{
data = Arial9[index++]; // tipo de letra usado
}


for(j=0; j<8; j++)
{
if(data & 0x01)
{
if(skipped)
{
gclcd_gotoxy(xCoord, yCoord);
gclcd_cmd(MEMWRITE);
skipped=0;
}
#ifdef HIGH_COLOR
gclcd_data(color >> 8);
gclcd_data(color);
#else
gclcd_data(color);
#endif
yCoord++;
}
else
{
skipped=1;
gclcd_gotoxy(xCoord, ++yCoord);
}
data >>= 1;
}
}
gclcd_gotoxy(++xCoord, startY);
}
gclcd_cmd(MEM_CONTROL);
gclcd_data(0b01001000);
return 0;
}



void gclcd_font(int8 a)
{ if (a == 0) {
font.width = Arial9[0];
font.height = Arial9[1];
font_select = 0;
}else{
font.width = Times_New_Roma8[0];
font.height = Times_New_Roma8[1];
font_select = 1;
}
}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 14:40 
Offline

Joined: Sun Feb 11, 2007 15:49
Posts: 4
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 12, 2007 16:28 
Offline

Joined: Mon Jun 20, 2005 23:03
Posts: 161
Location: Hong Kong
micman2:
Thats because GCLCD is using fixed width glyph rendering and because the selected font isn't suited to this it highlights the problem.
One method of resolving this, and probably the better method, would be to create a lookup table to store each character width, then adjust gclcd_putc() accordingly.
If storage on the PIC is an issue you could try packing two char widths per byte.
Fixed width rendering isn't suited to displays of this size.

_________________
myLCD - An LCD framebuffer library
(KS0108, PCD8544, SED1565, SED1335,
Nokia Colour LCD's, T6963C, TCP/IP, etc..)
http://mylcd.sourceforge.net/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 13, 2007 15:12 
Offline

Joined: Sun Feb 11, 2007 15:49
Posts: 4
Thanks for your answer .
Therefore the problem is in the program of conversion “GCLCD.exe”, Where can find an other program of conversion characters also to payment?


Top
 Profile  
 
 Post subject: BMP conversion
PostPosted: Thu Mar 08, 2007 7:46 
Offline

Joined: Thu Mar 08, 2007 7:36
Posts: 2
For anyone looking to get bitmaps on their lcd without having to write pc software, try this:

http://avrhelp.mcselec.com/bascom-avr.h ... 8Converter

1. Open the Lcdconvert program
2. Open the BMP file within Lcdconvert
3. On the output tab, unselect "Save as RLE"
4. Go to the Image tab then choose File:Convert
5. select the Colors tab then the Image tab (the image doesn't update automatically)
6. Select File:Save:Save Data Lines
7. Remember the filename
8. Open the file you just saved with a text editor that can replace linefeeds (I use Word)
9. Replace all "^pDATA" (paragraph mark then the word DATA) with ",^p"
10. If necessary replace all "&H" with "0x"
11. Format as an array

Hope this helps!

-Robotguy


Top
 Profile  
 
 Post subject: Re: BMP conversion
PostPosted: Thu Mar 08, 2007 11:45 
Offline

Joined: Sun Feb 11, 2007 15:49
Posts: 4
thanks you very much :D


Robotguy wrote:
For anyone looking to get bitmaps on their lcd without having to write pc software, try this:

http://avrhelp.mcselec.com/bascom-avr.h ... 8Converter

1. Open the Lcdconvert program
2. Open the BMP file within Lcdconvert
3. On the output tab, unselect "Save as RLE"
4. Go to the Image tab then choose File:Convert
5. select the Colors tab then the Image tab (the image doesn't update automatically)
6. Select File:Save:Save Data Lines
7. Remember the filename
8. Open the file you just saved with a text editor that can replace linefeeds (I use Word)
9. Replace all "^pDATA" (paragraph mark then the word DATA) with ",^p"
10. If necessary replace all "&H" with "0x"
11. Format as an array

Hope this helps!

-Robotguy


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 09, 2007 6:09 
Offline

Joined: Thu Mar 08, 2007 7:36
Posts: 2
No prob.

Here are a few screenshots:
http://robotguy.net/pda/icons.jpg
Image
Each of these is stored as a separate 16x16 bitmap.

http://robotguy.net/pda/flower.jpg
Image

http://robotguy.net/pda/world.jpg
Image

And here's my setup:
http://robotguy.net/pda/setup.jpg
Image

I am using an ATmega128 and a combination of the code from JCP on the Sparkfun Site and the Nokia6100 Test code from Refik Hadzialic at e-dsp.com, all modified to work with WinAVR.

Once I pretty it up and make sure all of the attributions are correct, I'll post it on my blog at http://robotguy.net/blog

-Robotguy[/img]


Top
 Profile  
 
 Post subject: hello robotguy, everyone
PostPosted: Mon Apr 09, 2007 2:05 
Offline

Joined: Mon Apr 09, 2007 1:59
Posts: 2
I am using this LCD for a student project and I am having a lot of trouble with it. The LCD is specifically the one being sold at Sparkfun with the carrier board included. I am using an STK 500 with an Atmel Mega32 mcu and I am using Codevision AVR which has a very poor compiler but it's what we've been using in this course so I'd like to stick with it. I have been trying the sample code provided by Jimbo at the Sparkfun site and it programs correctly without the "macro.h" header but nothing draws on the screen. I have it all set up with the correct ports wired on the STK 500 and an external power supply to the carrier board with 3.3 V (the board handles the rest to make 3 separate voltages. I remember the screen worked the very first time I tried it and stopped working as soon as I tried making more connections to improve the contrast. I have bought a couple new screens and a new carrier board since then and nothing has worked. I currently have no working models at all and unless I can get this screen to work soon I am going to have to use another screen!

Can anyone who has made the same (or similar) set up work help me out? Robotguy, I noticed you have the STK 500 too, any ideas? I tried changing contrast, etc. but nothing helped. The mcu programs and run and the screen lights up but it stays blue.

Thanks in advance for any help you can offer!


Top
 Profile  
 
 Post subject: got it working!
PostPosted: Mon Apr 09, 2007 21:02 
Offline

Joined: Mon Apr 09, 2007 1:59
Posts: 2
Hey everyone, nevermind my previous post, turns out I just needed to try some different code... I got the one from e-dsp and it worked great:

http://www.flickr.com/photos/ihavesenioritis/452766210/

I had to bump up the contrast a little (from 160 to 185) and the SPI transmitting method is really crude (had to 100-us delay to the LCDdata/command functions to prevent timing issues) but I now have something that works well and I'm going to be building off of this and making some graphics and text functions so I can realize my final goal of making some simple color games. Should be fun!


Top
 Profile  
 
PostPosted: Mon Apr 16, 2007 12:50 
Offline

Joined: Mon Apr 16, 2007 11:42
Posts: 4
I've tried writing a simple program to get this screen working using some of the popular C examples but I can't get anything working in assembly. I've narrowed the problem down to either my send data/command routines or the initialization of the lcd, which are at the bottom of the post. The program only produces the blue screen from power on so the problem must be in one of these code chunks, and before or at the "background fill" part of the initialization if its there. I'm using a pic16f877 and its being successfully programmed since I put a routine for continous blinking leds during LCD operation and only the leds work, but they work how theyre supposed to, and I triple checked all the connections electrically and pin/pin-matched-correctedly. Can anyone see anything I'm doing wrong, or give me a link to some code written in assembly? I've searched google to no end and I'm beginning to lose hope. Thanks a lot for any help...this screen is driving me nuts!

Code:
;___________________________________________________________________________________
;Send a command to the LCD
;___________________________________________________________________________________
LCD_Command
   bcf   PORTB,CLK   ;Bring the clock pin low
   bcf   PORTB,DATAP   ;Bring the data pin low
   bsf   PORTB,CLK   ;Bring the clock pin high
   movwf   TXByte      ;Temporary storage for the byte thats being sent
   movlw   0x08      ;Loop 8 times, once for each bit in the byte being sent
   movwf   VAR2
CommandLoop
   bcf   PORTB,CLK   ;Bring the clock pin low

   btfss   TXByte,0       ;Skip next line if the bit to send is set
   bcf   PORTB,DATAP   ;Send a 0 bit
   btfsc   TXByte,0   ;Skip next line if bit to send is clear
   bsf   PORTB,DATAP   ;Send a 1 bit

   bsf   PORTB,CLK   ;Bring the clock pin high

   rrf   TXByte,1   ;Shift the bits of the byte being sent to the right

   decfsz   VAR2,1
   goto   CommandLoop   ;Send another bit
   return         ;Exit command function



And heres the initialization code...

Code:
;___________________________________________________________________________________
;LCD Initilization
;___________________________________________________________________________________
LCD_Init
   bcf      PORTB,CS   ;Bring chip select pin low
   bcf      PORTB,DATAP   ;Bring data pin low
   bsf      PORTB,CLK   ;Bring clock pin high

   bsf      PORTB,RST   ;Bring reset pin high
   bcf      PORTB,RST   ;Bring reset pin low
   bsf      PORTB,RST   ;Bring reset pin high

   bsf      PORTB,CLK   ;Bring clock pin high
   bsf      PORTB,DATAP   ;Bring data pin low
   bsf      PORTB,CLK   ;Bring clock pin high

   movlw   0x39      ;10mS delay
   call   Delay

   movlw   DISCTL      ;Display control
   call   LCD_Command
   movlw   0x03      ;1st DISCTL parameter
   call   LCD_DataOut
   movlw   0x20      ;2nd DISCTL parameter
   call   LCD_DataOut
   movlw   0x0c      ;3rd DISCTL parameter
   call   LCD_DataOut
   movlw   0x00      ;This was in an example program...shouldnt there only be 3 params?
   call   LCD_DataOut

   movlw   COMSCN      ;Common scan direction
   call   LCD_Command
   movlw   0x01      ;1st COMSCN parameter
   call   LCD_DataOut

   movlw   OSCON      ;Turn on the internal oscillator
   call   LCD_Command   ;OSCON has no parameters

   movlw   SLPOUT      ;Turn sleep mode off
   call   LCD_Command   ;SLPOUT has no parameters

   movlw   VOLCTR      ;Brightness/contrast set
   call   LCD_Command
   movlw   0x05      ;1st VOLCTR parameter, relatively arbitrary
   call   LCD_DataOut
   movlw   0x01      ;2nd VOLCTR parameter
   call   LCD_DataOut

   movlw   PWRCTR      ;Power control
   call   LCD_Command
   movlw   0x0f      ;1st PWRCTR parameter (changed from 0x00)
   call   LCD_DataOut

   movlw   0xb6      ;100mS
   call   Delay

   movlw   DISINV      ;Display mode (inverted)
   call   LCD_Command

   movlw   DATCTL      ;Data scan direction, etc.
   call   LCD_Command
   movlw   0x00      ;1st DATACTL command
   call   LCD_DataOut
   movlw   0x00      ;2nd DATACTL command
   call   LCD_DataOut
   movlw   0x01      ;3rd DATACTL command
   call   LCD_DataOut
   movlw   0x00      ;example again...
   call   LCD_DataOut
   
   movlw   RGBSET8      ;256-color position set
   call   LCD_Command
   movlw   0x00      ;1st of 8 RED parameters of the RGBSET8 command
   call   LCD_DataOut
   movlw   0x02
   call   LCD_DataOut
   movlw   0x04
   call   LCD_DataOut
   movlw   0x06
   call   LCD_DataOut
   movlw   0x08
   call   LCD_DataOut
   movlw   0x0a
   call   LCD_DataOut
   movlw   0x0c
   call   LCD_DataOut
   movlw   0x0f
   call   LCD_DataOut
   movlw   0x00      ;1st of 8 GREEN parameters of the RGBSET8 command
   call   LCD_DataOut
   movlw   0x02
   call   LCD_DataOut
   movlw   0x04
   call   LCD_DataOut
   movlw   0x06
   call   LCD_DataOut
   movlw   0x08
   call   LCD_DataOut
   movlw   0x0a
   call   LCD_DataOut
   movlw   0x0c
   call   LCD_DataOut
   movlw   0x0f
   call   LCD_DataOut
   movlw   0x00      ;1st of 4 BLUE parameters of the RGBSET8 command
   call   LCD_DataOut
   movlw   0x04
   call   LCD_DataOut
   movlw   0x09
   call   LCD_DataOut
   movlw   0x0f
   call   LCD_DataOut

   movlw   NOPP      ;No operation command
   call   LCD_Command   ;NOP has no parameters
   
   movlw   PASET      ;Page address set
   call   LCD_Command
   movlw   0x02      ;1st PASET parameter, starting address (unkown why it should be 2)
   call   LCD_DataOut
   movlw   0x83      ;2nd PASET parameter
   call   LCD_DataOut
   
   movlw   CASET      ;Column address set
   call   LCD_Command
   movlw   0x00      ;1st CASET parameter
   call   LCD_DataOut
   movlw   0x83      ;2nd CASET parameter
   call   LCD_DataOut

   movlw   0x86
   movwf   VAR   
   movlw   RAMWR      ;Write to LCD RAM
   call   LCD_Command
Fill_Loop2
   movlw   0x86
   movwf   VAR1
Fill_Loop
   movlw   0xfa      ;green
   call   LCD_DataOut
   decfsz   VAR1
   goto   Fill_Loop   ;Send another pixel
   decfsz   VAR
   goto   Fill_Loop2

   movlw   DISON      ;Turn on
   call   LCD_Command   ;DISON has no parameters

   movlw   0xb6      ;200ms
   call   Delay
   movlw   0xb6
   call   Delay

   movlw   0xa0      ;Loop 160 times (this can be adjusted depending on effects)
   movwf   VAR1
Vol_Loop
   movlw   0xd6      ;Increase contrast
   call   LCD_Command
   movlw   0x19      ;2ms
   call   Delay
   decfsz   VAR1
   goto   Vol_Loop   ;Increase the contrast another tick

   return            ;Exit LCD initialization function


Thanks again for any info.
-Dave


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 9:42 
Offline

Joined: Mon Apr 23, 2007 9:35
Posts: 2
Hi dak246

Don't know if this will help, but until recently I was having the same problem. Looking at your code I would say you are trying to use an epsom display, however I suppect you have the phillips.

The datasheet can be found at
http://www.nxp.com/pip/PCF8833U_2DA_1.html

and there is some sample code around

http://www.deramon.de/nokia6610lcd.php


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 23, 2007 22:06 
Offline

Joined: Mon Apr 16, 2007 11:42
Posts: 4
Is there a way to tell for sure? I got the screen from sparkfun and apparently the one they supply has the espon controller, but if you're right that would make a lot of sense. Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 24, 2007 9:51 
Offline

Joined: Mon Apr 23, 2007 9:35
Posts: 2
Check out Mikes electrical stuff

http://www.electricstuff.co.uk/noklcd.html

At the top of your screen on the front / display side is the controller chip, if you run you thumb nail over the plasic cover (not to hard) you will find the edges, or you could just peal it back out of the way. The epson controllers are larger than the phillips and extend passed the connector. The phillips ends underneath the connector. If you study the photos in mike's link above you will see what I mean.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 25, 2007 3:27 
Offline

Joined: Mon Apr 16, 2007 11:42
Posts: 4
I lifted up the tape on the connector and the codes&styling match the epson controller example on http://www.electricstuff.co.uk/noklcd.html (the second set of pictures down). The only difference is that the connector under the tape is gold instead of green.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 288 posts ]  Go to page Previous  1 ... 10, 11, 12, 13, 14, 15, 16 ... 20  Next

All times are UTC + 2 hours


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group