New PICDEM2 LCD problem

Discussion of PIC® MCUs.

New PICDEM2 LCD problem

Postby mindstorm88 » Tue Feb 06, 2007 10:44 am

Hi guys , am i the only one having timing problem with it , i'm using the usual HELLO WORLD to test it , i tried with the 18f4520 and 16f877a that come with it and all i get on the display is "Hello Wo"

i'm using flex_lcd for the new board with the added line for the power !!!

any idea!!!

BSL
mindstorm88
 

Postby PCM programmer » Tue Feb 06, 2007 10:50 am

See my post in this thread, about 2/3 of the way down in the thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=29521
Did you turn on the LCD at the same point in the lcd_init() function ?
PCM programmer
 

Postby mindstorm88 » Tue Feb 06, 2007 10:58 am

here what i did !!
Code: Select all
#include <16f877a>
#fuses hs, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)

#include <flex_lcd.c>

//============================
void main()
{
output_high(lcd_power);
delay_ms(300);
lcd_init();


while(1)
  {
   lcd_putc('\f');
   delay_ms(500);
   lcd_putc("Hello World\n");
   lcd_putc("This is Line two");
   delay_ms(500);
  }

}
mindstorm88
 

Postby PCM programmer » Tue Feb 06, 2007 12:06 pm

I have the older version of the PicDem2-Plus board, which doesn't have
a power-control pin on the LCD. It's always on. But I can wire in a
separate LCD and a power-on circuit, and attempt to test it.

Before I do that, can you:

1. Post the pin list that you have at the start of the flex_lcd program.

2. Post the statement where you declare the 'lcd_power' pin.
PCM programmer
 

Postby mindstorm88 » Tue Feb 06, 2007 12:34 pm

here the declares , PCM i don't think you need to rewire yours , as my problem is not power , i do have message on the lcd but only partial !!

Code: Select all
/ These pins are for the Microchip PicDem2-Plus board,
// which is what I used to test the driver.  Change these
// pins to fit your own board.

#define LCD_DB4   PIN_D0
#define LCD_DB5   PIN_D1
#define LCD_DB6   PIN_D2
#define LCD_DB7   PIN_D3

#define LCD_E     PIN_D6
#define LCD_RS    PIN_D4
#define LCD_RW    PIN_D5
#define LCD_POWER PIN_D7
mindstorm88
 

Postby PCM programmer » Tue Feb 06, 2007 1:33 pm

Unfortunately the only character LCDs that I have here at the company
are 8x2 LCDs. I wired one of them up and it works, but it's not a real
test, because you're using a 16x2 LCD.

What compiler version are you using ? This will be a 4-digit number
like 3.249 or 4.023, etc. You can find it at the start of the .LST file.
The .LST file will be in your project directory. Don't post any numbers
that come after the version number.
PCM programmer
 

Postby mindstorm88 » Tue Feb 06, 2007 2:08 pm

Ok here the latest , first i do use 4.023!!

i'm now home , at my place i built my own copy of a picdem2 plus (new version) with a real lcd hd44780 , and surprise , everything works on my board!!!

so it seems that the new Picdem2 plus has a LCD not totally compatible , probably some timing to tweak !!!
mindstorm88
 

Postby PCM programmer » Tue Feb 06, 2007 2:40 pm

Microchip has MPASM source code available for download that shows
how they initialize and talk to the LCD on the PicDem2-Plus. They have
code for both the old and new versions of the board.
http://www.microchip.com/stellent/idcpl ... t=DM163022
I'll compare the two versions and see if they do anything different for
the new LCD. I won't have an answer on this until tomorrow.
PCM programmer
 

Postby mindstorm88 » Tue Feb 06, 2007 2:53 pm

i just did , and they're using the same lcd driver as the old board !!! they commented the old declare and put the new one, in the init they add a 30ms delay after setting power to display , all other timing seems to be the same ,

just to confirm my display is working ok with the demo code !!!
mindstorm88
 

Postby PCM programmer » Tue Feb 06, 2007 3:06 pm

I will compare the MPASM demo code to the Flex LCD driver code
and look for differences. Also, I'll attempt to find the data sheet
of the LCD used on the new version of the board, by looking at
photos of the LCDs on these Taiwan LCD manufacturer websites.
http://www.manufacturers.com.tw/electro ... dules.html

Does the LCD on the new board have the manufacturer's name
and part number on it ? On my older board, there's no company
name on the LCD -- just a few numbers.
PCM programmer
 

Postby mindstorm88 » Tue Feb 06, 2007 3:10 pm

nope nothing on the display!!!, and it is stick to the board !!
mindstorm88
 

Postby PCM programmer » Tue Feb 06, 2007 3:29 pm

I'll investigate it and get back to you tomorrow.
PCM programmer
 

Postby mindstorm88 » Wed Feb 07, 2007 11:47 am

PCM , in case you didn't find info , i've just asked microchip for data about that display !!! will see !!
mindstorm88
 

Postby PCM programmer » Wed Feb 07, 2007 12:27 pm

I found some information. Here's a thread on the Microchip forum
which lists LCD manufacturers for the PicDem2-Plus:
http://forum.microchip.com/tm.aspx?m=161163

LCD Module 16 Char x 2 Row
LCD1
1. FEMA Electronics CG-1621-SGR1C
2. P-Tec Corp PCOG1602B-GNFD-C1RCD (RCD Industries)
3. United Radiant UMSH-3112JNV-1G

I have the United Radiant LCD on my PicDem2-Plus board.
But my board is not the latest version. I bought it at least a year ago.

I was able to locate a data sheet for the Fema LCD:
http://www.femacorp.com/products/lcd/ch ... CG1621.pdf
It looks like it has a standard HD44780 interface.

P-Tec has a website, but there are no data sheets available for download.
They are apparently an OEM-only manufacturer.
http://www.p-tec.net/index.php?p=prod_list&cat_1=1

Unitied Radiant has a website, but again, there are no data sheets on it.
They're apparently another OEM-only manufacturer.
http://www.urt.com.tw/

If possible, get the data sheet from Microchip.

------

I studied the sample drivers (p18lcd.asm) in the two links that I gave
you. The driver for the new "Rohs" board is actually quite different
than the older one. The older driver has a normal init routine and it's
pretty much the same as the one in the CCS LCD.c driver. The new
driver has a different init routine. It doesn't send the nybble '3' for
three times at the start of the driver. It doesn't check the busy bit --
instead, the programmer has substituted a static delay for that, in the
busy routine.

If you can't get anything out of Microchip, I could convert the init routine
in the new driver to CCS C and post it. Also, if you can't get anything
from Microchip, I might just buy one of the new PicDem2-Plus boards.

----
Edited: A typo in a LCD p/n.
Last edited by PCM programmer on Wed Feb 07, 2007 2:48 pm, edited 1 time in total.
PCM programmer
 

Postby mindstorm88 » Wed Feb 07, 2007 2:43 pm

i got the datasheet from another tech ,lcd p/n is OM16214 and the driver is a NT7605 , i'm trying to understand the demo code from microchip BUT !!!!! :confused:

instuctions are hitachi standard!!!
mindstorm88
 

Next

Return to PIC® MCU General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron