View previous topic :: View next topic |
Author |
Message |
Wojtek
Joined: 26 Feb 2007 Posts: 1
|
LCD troubles Help please |
Posted: Tue Feb 27, 2007 8:54 am |
|
|
Hello I have quite problem with LCD display. I am using standard 16x2 Lcd that was added to software prototyping board. In my code I add lcd.c libary and i tried to use init_lcd() function, unfortunatley the compiler seems to get stuck in that function and dose not go any further. Could you please send me a datasheet of that LCD. I the LCD.c only four wires are connected to LCD, but in the data sheet http://info.hobbyengineering.com/specs/MTC-C162DPRN-2N-V10.pdf all 8 are used. Could you expalin my how it is passible to manage LCD with only 4 wires ?
I am looking forward to hearing form you
WW |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Tue Feb 27, 2007 9:04 am |
|
|
Looking at the spec. sheet you posted, it will take a minimum of 10 wires to control the LCD. 2 for power, 1 for contrast, 4 for data lines and 3 for control signals. You might need to connect up the remaining wires.
Ronald |
|
|
rnome
Joined: 18 Dec 2006 Posts: 20 Location: europe (Turkey)
|
|
Posted: Tue Feb 27, 2007 7:41 pm |
|
|
hi mate
i m workin on lcd for a week and i done it without any problem and i add my circuits schematic. ucan use it to fix yours
Code: |
#include <16F877.h>
#device ADC=8
#fuses XT,NOWDT,NOPROTECT,NOLVP
#use delay(clock=4000000)
#include <lcd.c>
void main()
{
int data_a0, data_a1;
setup_adc_ports(ALL_ANALOG);
setup_adc(ADC_CLOCK_DIV_8);
for(;;)
{
set_adc_channel(0);
read_adc(ADC_START_ONLY);
delay_us(100);
data_a0=read_adc(ADC_READ_ONLY);
set_adc_channel(1);
read_adc(ADC_START_ONLY);
delay_us(100);
data_a1=read_adc(ADC_READ_ONLY);
lcd_init();
lcd_gotoxy(1,1);
printf(lcd_putc, "%03u 1.axis\n",data_a0);
printf(lcd_putc, "%03u 2.axis\n",data_a1);
delay_ms(200);
}
}
| and this codes can help u to test the circuit _________________ live fast, never rest and do your best |
|
|
rina Guest
|
Re |
Posted: Wed Feb 28, 2007 3:18 am |
|
|
hey dude,
the lcd blinks after a period of time.. wat to do then... |
|
|
|