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

Problem when doing test run on LCD using flex_lcd Driver

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
sonicdeejay



Joined: 20 Dec 2005
Posts: 112

View user's profile Send private message

Problem when doing test run on LCD using flex_lcd Driver
PostPosted: Fri Feb 03, 2006 12:51 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Feb 03, 2006 1:21 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Sat Feb 04, 2006 5:11 am     Reply with quote

gotcha...thx for the support


sonic

Smile
sonicdeejay



Joined: 20 Dec 2005
Posts: 112

View user's profile Send private message

PostPosted: Mon Feb 06, 2006 4:39 am     Reply with quote

Dear PCM programmer,,


My LCD is use S6A0069 as controller....

so can I use FLEX_LCD.c as the driver????
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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