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 with LCD display

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



Joined: 15 Sep 2004
Posts: 5

View user's profile Send private message

Problem with LCD display
PostPosted: Wed Sep 15, 2004 1:25 pm     Reply with quote

I have problem with LCD display. I have use functions from orginal lcd.c and set PortB for LCD interface. This program doesn't work, led diode turns on once, but i hapens only sometimes. When I remove LCD function, led diode is flashing.
What is wrong ?

prg.h
#include <18F248.h>
#device adc=8
#use delay(clock=4000000)
#fuses NOWDT,WDT128,XT, NOPROTECT, NOOSCSEN, BROWNOUT, BORV20, PUT, NOCPD, STVREN, NODEBUG, LVP, NOWRT, NOWRTD, NOWRTB, NOCPB, NOWRTC, NOEBTR, NOEBTRB

prg.c
void main()
{

setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_spi(FALSE);
setup_wdt(WDT_OFF);
setup_timer_0(RTCC_INTERNAL);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_timer_3(T3_DISABLED|T3_DIV_BY_1);
lcd_init();
delay_ms(100);

while(1){
lcd_gotoxy(1,1);
delay_ms(100);
lcd_putc("Hello Word ...\n");
output_high(PIN_C3);
delay_ms(1000);
output_low(PIN_C3);
delay_ms(1000);
}
}
Arif
Guest







PostPosted: Thu Sep 16, 2004 12:59 am     Reply with quote

Hi,
i tried your code and you have to select NOLVP from fuses. Then it will work... Because when lvp selected pinb4 used for LVP function and b4 can not be used for general i/o.
rnielsen



Joined: 23 Sep 2003
Posts: 852
Location: Utah

View user's profile Send private message

PostPosted: Thu Sep 16, 2004 11:33 am     Reply with quote

I think the NOLVP setting has bitten quite a few people, myself included.
tomi7



Joined: 15 Sep 2004
Posts: 5

View user's profile Send private message

PostPosted: Thu Sep 16, 2004 3:20 pm     Reply with quote

Yes, NOLVP helps, uffff Very Happy
Thanks You very much.
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