CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

New PICDEM2 LCD problem
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
mindstorm88



Joined: 06 Dec 2006
Posts: 102
Location: Montreal , Canada

View user's profile Send private message

New PICDEM2 LCD problem
PostPosted: Tue Feb 06, 2007 10:44 am     Reply with quote

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
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 10:50 am     Reply with quote

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 ?
mindstorm88



Joined: 06 Dec 2006
Posts: 102
Location: Montreal , Canada

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 10:58 am     Reply with quote

here what i did !!
Code:
#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);
  }

}
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 12:06 pm     Reply with quote

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.
mindstorm88



Joined: 06 Dec 2006
Posts: 102
Location: Montreal , Canada

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 12:34 pm     Reply with quote

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:
/ 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
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 1:33 pm     Reply with quote

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.
mindstorm88



Joined: 06 Dec 2006
Posts: 102
Location: Montreal , Canada

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 2:08 pm     Reply with quote

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 !!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 2:40 pm     Reply with quote

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/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en010072&part=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.
mindstorm88



Joined: 06 Dec 2006
Posts: 102
Location: Montreal , Canada

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 2:53 pm     Reply with quote

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 !!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 3:06 pm     Reply with quote

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/electronics/LCD-Modules.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.
mindstorm88



Joined: 06 Dec 2006
Posts: 102
Location: Montreal , Canada

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 3:10 pm     Reply with quote

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Feb 06, 2007 3:29 pm     Reply with quote

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



Joined: 06 Dec 2006
Posts: 102
Location: Montreal , Canada

View user's profile Send private message

PostPosted: Wed Feb 07, 2007 11:47 am     Reply with quote

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



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 07, 2007 12:27 pm     Reply with quote

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

Quote:

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/chip_on_glass/specs/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
mindstorm88



Joined: 06 Dec 2006
Posts: 102
Location: Montreal , Canada

View user's profile Send private message

PostPosted: Wed Feb 07, 2007 2:43 pm     Reply with quote

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!!!
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group