|
|
View previous topic :: View next topic |
Author |
Message |
tomi7
Joined: 15 Sep 2004 Posts: 5
|
Problem with LCD display |
Posted: Wed Sep 15, 2004 1:25 pm |
|
|
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
|
|
Posted: Thu Sep 16, 2004 12:59 am |
|
|
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
|
|
Posted: Thu Sep 16, 2004 11:33 am |
|
|
I think the NOLVP setting has bitten quite a few people, myself included. |
|
|
tomi7
Joined: 15 Sep 2004 Posts: 5
|
|
Posted: Thu Sep 16, 2004 3:20 pm |
|
|
Yes, NOLVP helps, uffff
Thanks You very much. |
|
|
|
|
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
|