|
|
View previous topic :: View next topic |
Author |
Message |
humble pie Guest
|
help on LCD Display |
Posted: Thu Jan 04, 2007 10:53 pm |
|
|
Hi Mark, I wonder if you still actively involve in this forum discussion.
Thank you for your codes for the PICDEM 2 PLUS LCD driver. I have used it and it is working. However, I always got a rubbish character displayed either at the end of the display text or at the first position when I issue a clear display command.
What is the possible problem? or anyone could advise?
Thanks |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Jan 05, 2007 11:33 am |
|
|
Quote: |
However, I always got a rubbish character displayed either at the end
|
Post the following things and I'll test it on my PicDem2-Plus board:
1. Your compiler version. This is number like 3.191, 3.236, or 4.020, etc.
You can find it near the top of the .LST file, which is in your project
directory.
2. Your PIC. PicDem2-Plus comes with a 16F877-04 and a 18F452.
Which one are you using ? Or do you have a different PIC ?
3. Your crystal or oscillator frequency. The PicDem2-Plus comes with
a 4 MHz oscillator (the "can" type). If you're using the 18F452, do
you have the x4 PLL enabled ? |
|
|
humble pie Guest
|
help on LCD Display |
Posted: Thu Jan 18, 2007 12:01 am |
|
|
Hi pcm programmer, thank you for your reply and sorry for the late response.
OK, below is the answers to your questions.
1. Your compiler version. This is number like 3.191, 3.236, or 4.020, etc.
You can find it near the top of the .LST file, which is in your project
directory.
-- The number is 4.009,35330
2. Your PIC. PicDem2-Plus comes with a 16F877-04 and a 18F452.
Which one are you using ? Or do you have a different PIC ?
-- I am using 16LF877A. This will eventually use in our project.
3. Your crystal or oscillator frequency. The PicDem2-Plus comes with
a 4 MHz oscillator (the "can" type). If you're using the 18F452, do
you have the x4 PLL enabled ?
-- I am using the on board 4MHz oscillator (jumper J7 open).
Really appreciate your help. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Jan 18, 2007 5:02 pm |
|
|
I assume you're talking about Mark's LCD driver in the Code Library:
http://www.ccsinfo.com/forum/viewtopic.php?t=20182
I don't have PCM vs. 4.009 to test. The closest I have is vs. 4.014.
I installed that version and compiled the test program shown below.
I programmed it into a 16F877 installed on a PicDem2-Plus board,
with the 4 MHz "can" type external oscillator. It ran OK. I didn't
get any extra characters on the LCD after sending it a "clear screen"
command (\f). I have the original PicDem2-Plus board, not the
latest type, which has a power on/off control connected to pin D7 on
the PIC. Mark's driver (as posted) was for the original PicDem2-Plus.
Try this program. If you still have the problem, it might be caused
by vs. 4.009 of the compiler.
Code: |
#include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)
#include <lcdd.c>
//============================
void main()
{
lcd_init();
while(1)
{
lcd_putc('\f');
delay_ms(500);
lcd_putc("Hello World\n");
lcd_putc("This is Line two");
delay_ms(500);
}
} |
|
|
|
humble pie Guest
|
help on LCD Display |
Posted: Fri Jan 19, 2007 1:31 am |
|
|
Thanks PCM programmer, I will try out. |
|
|
|
|
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
|