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 support@ccsinfo.com

problem with 16 X 2 LCD

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



Joined: 09 Aug 2007
Posts: 82
Location: TN, India

View user's profile Send private message Send e-mail

problem with 16 X 2 LCD
PostPosted: Wed Apr 29, 2009 12:32 am     Reply with quote

Hello CCS friends,

I try to display " Hello world " on LCD display, but LCD don't display any character, even cursor also. I use inbuilt lcd.c library. My lcd model is JHD162A. I connect LCD in port B.

My code is
Code:

#include<16f873a.h>
#device adc=8
#use delay(clock=4000000)
#fuses NOWDT,XT, PUT, PROTECT, NODEBUG, BROWNOUT, NOLVP, CPD, NOWRT

#include <lcd.c>
#include <string.h>

///////////////////////////////void main function///////////////////////////////
void main()
{
lcd_init();       // init the LCD
delay_ms(100);
output_high(pin_a0);
lcd_putc("\fHello World\n");

while(true)
{
output_high(pin_a0);
delay_ms(200);
output_low(pin_a0);
delay_ms(200);
}// while

}

Please see my code and give the best solution.
UDIPTA



Joined: 29 Apr 2009
Posts: 13
Location: Kolkata,India

View user's profile Send private message Send e-mail

PostPosted: Wed Apr 29, 2009 4:19 am     Reply with quote

The CCS LCD.c file defaults to all connections to port D. If U wish to use PORTB then the line #define use_portb_lcd TRUE must be added in your program before the LCD.c file is included. Try it now Razz !!
karthickiw



Joined: 09 Aug 2007
Posts: 82
Location: TN, India

View user's profile Send private message Send e-mail

already...
PostPosted: Wed Apr 29, 2009 7:37 am     Reply with quote

UDIPTA wrote:
The CCS LCD.c file defaults to all connections to port D. If U wish to use PORTB then the line #define use_portb_lcd TRUE must be added in your program before the LCD.c file is included. Try it now Razz !!



i already un-comment that line....
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