|
|
View previous topic :: View next topic |
Author |
Message |
sonicdeejay
Joined: 20 Dec 2005 Posts: 112
|
Problem when doing test run on LCD using flex_lcd Driver |
Posted: Fri Feb 03, 2006 12:51 pm |
|
|
Guys....
Since my PIC18F2525 is used port B for LCD,I change this in the driver code,,,
Code: | #define LCD_DB4 PIN_B0
#define LCD_DB5 PIN_B1
#define LCD_DB6 PIN_B2
#define LCD_DB7 PIN_B3
#define LCD_E PIN_A1
#define LCD_RS PIN_A3
#define LCD_RW PIN_A2 |
I am tried to compile the following sample code to try out LCd panel using flex_lcd driver....
FLEX_LCD
Code: | #include <18F2525.h>
#include <flex_lcd.c>
#device ICD=TRUE
#device ADC=10
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=16000000) // 16Mhz Crystal is Used
#use rs232(baud=9600, parity=N, xmit=PIN_C6, rcv=PIN_C7, bits=8) // RS232 Configuration
#include <stdlib.h>
void main()
{
lcd_init();
while(1)
{
output_high(PIN_A1);
delay_ms(1000);
output_low(PIN_A1);
printf(lcd_putc, "Hello World.");
delay_ms(1000);
}
}
|
and I have compile error in flex_lcd.c side...
It gives error on
Code: | delay_us(60); and error message is unidentified indentifier delay_us |
How can I solve this prob??? I know I need must b using those delay to display properly.[/quote] |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Feb 03, 2006 1:21 pm |
|
|
The drivers use CCS library routines to do delays, such as delay_us().
So you must put the #include file below the #use delay() statement.
Example:
Code: |
#include <18F2525.h>
#device ICD=TRUE
#device ADC=10
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=16000000) // 16Mhz Crystal is Used
#use rs232(baud=9600, parity=N, xmit=PIN_C6, rcv=PIN_C7, bits=8) // RS232 Configuration
// Always put your source code #include files down here.
#include <flex_lcd.c> |
|
|
|
sonicdeejay
Joined: 20 Dec 2005 Posts: 112
|
|
Posted: Sat Feb 04, 2006 5:11 am |
|
|
gotcha...thx for the support
sonic
|
|
|
sonicdeejay
Joined: 20 Dec 2005 Posts: 112
|
|
Posted: Mon Feb 06, 2006 4:39 am |
|
|
Dear PCM programmer,,
My LCD is use S6A0069 as controller....
so can I use FLEX_LCD.c as the driver???? |
|
|
|
|
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
|