View previous topic :: View next topic |
Author |
Message |
mohee
Joined: 16 Mar 2004 Posts: 2
|
help me in LCD |
Posted: Wed Mar 17, 2004 8:29 am |
|
|
hi
im new in programming with PCM. so im working in my project and i use LCD and PIC16F877, my problem is to let the cursor move at first char of each word when "next" bottom pressed , and if pressed enter call some function and another bottom "back" make the cursor to back at first char of each word
so please help me |
|
|
chava
Joined: 07 Sep 2003 Posts: 56
|
let me anderstand |
Posted: Wed Mar 17, 2004 4:10 pm |
|
|
Let me anderstand...
your problem is the LCD or the algorithm to do what you want to do? |
|
|
mystery Guest
|
Lcd |
Posted: Wed Mar 17, 2004 5:07 pm |
|
|
If you want to do this action you will have to find or program your
own lcd driver.
If you search on your C drive for "lcd.c", this is a basic lcd driver provided
by ccs.
This ccs driver does not support cursor to flash!!!!! |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1933 Location: Norman, OK
|
LCD code |
Posted: Wed Mar 17, 2004 5:20 pm |
|
|
Depending on what display is being used, the character flash has nothing to do with the driver as it is usually initiated by a simple ascii code/character sequence. However, the display may not even support flash at all. They have to look at the display data sheet to find out what is required, or if it is possible.... |
|
|
Guest
|
Re: let me anderstand |
Posted: Thu Mar 18, 2004 3:07 am |
|
|
my problem is in the algorithm to do what i want to do. |
|
|
mohee
Joined: 16 Mar 2004 Posts: 2
|
Re: let me anderstand |
Posted: Thu Mar 18, 2004 3:49 am |
|
|
my problem in the algorithm as below:
#if defined(__PCM__)
#include <16F877.h>
#fuses XT,NOWDT,NOPROTECT,NOLVP
#use delay(clock=4000000)
#include <lcd.c>
void main() {
char k;
lcd_init();
lcd_putc("Hello Mohee\n");
lcd_putc("Thanks God ");
while(true)
{
if( !input(PIN_A1) )
{
lcd_gotoxy(7,1);
lcd_send_byte(0,0x0F);
}
delay_ms( 2 );
if( !input(PIN_A4) )
output_B(0xff);
delay_ms( 2 );
if( !input(PIN_A1) )
{
lcd_gotoxy(1,2);
lcd_send_byte(0,0x0F);
}
if( !input(PIN_A2) )
lcd_gotoxy(1,2);
output_B(0x0f);
}
}
when i test this code on PIC doesnt work as i expect, i see that the cursor flashing on two char s.
so what is you say in this ...... chava |
|
|
|