Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

lcd problem

Status
Not open for further replies.

kimsiang85

New Member
i was connecting lcd to pic microcontroller to display some desired result.
and i am able to display the result several time but until yesterday night my lcd can't display anymore. is it my lcd wrecked?or my pic microcontroller is wrecked?
how to check whether my lcd is wrecked??

hope you all can help
 
kimsiang85 said:
i was connecting lcd to pic microcontroller to display some desired result.
and i am able to display the result several time but until yesterday night my lcd can't display anymore. is it my lcd wrecked? or my pic microcontroller is wrecked?
how to check whether my lcd is wrecked??

hope you all can help
Inadvertent plugging out while power ON , causes a lcd panel failure.. I have suffered twice.
Firstly,check the wiring for possible dry connection. If you have a DMM, check the voltages across pin1&2 of the 16 pin for 5V
sense the temperature of the smd devices behind LCD panel with your finger,if unusually hot, perhaps we can suspect the device. If it is 2*16 type,
there would be two such and it becomes easy to compare the relative difference in temperature.

Unlesspower supply reversal etc would have happened like an accident even for a moment, there is a likelyhood.
 
the lcd model i use is jhd 162a. it is 2x 16 type. i can get the black block when i adjust the contrast of the lcd. but it can't display anything. the back of lcd is not getting hot.

is it mean my connection got problems???
 
kimsiang85 said:
the lcd model i use is jhd 162a. it is 2x 16 type. i can get the black block when i adjust the contrast of the lcd. but it can't display anything. the back of lcd is not getting hot.

is it mean my connection got problems???

LCD may not be faulty, then.
If the program worked once at least, please indicate. if not, as Steve pointed out put your program here on net for analysis by some expert.
 
Check and double check all of your circuit, power supply, clock generation etc, I suspect that the LCD module is just not being initialised properly.
It's always possible of course, that your code has gone awry, more so if you're poking around in the circuit while it's powered. It wouldn't be the first time I have seen slightly elevated supply voltages erase a PIC bit by bit, so double check that also.


rgds
 
mvs sarma said:
LCD may not be faulty, then.
If the program worked once at least, please indicate. if not, as Steve pointed out put your program here on net for analysis by some expert.

my program worked for many time although i change some coding.
actually, i soldered all my circuit on copper strip board and i made some changes for my circuit before i found out that my lcd is not working.

i have checked the pic also. i used portb to display. it is working fine when i use in the other application like set all portb as output and set all output high.
 
kimsiang85 said:
my program worked for many time although i change some coding.
actually, i soldered all my circuit on copper strip board and i made some changes for my circuit before i found out that my lcd is not working.

i have checked the pic also. i used port b to display. it is working fine when i use in the other application like set all port b as output and set all output high.
Try to check your LCD JHD162A in some other equipment where plug-in is possible. that would certify the display's condition
 
i have used a new lcd display but i still fail to display my result.
is it my circuit connection is not solid enough?? for your knowledge, i have soldered all the circuit on copper strip board.

or you want to see all my coding before you all can come out with some conclusion??? i need to post full coding or just part that related to lcd???
thanks. hope you all can help...
 
kimsiang85 said:
i have used a new lcd display but i still fail to display my result.
is it my circuit connection is not solid enough?? for your knowledge, i have soldered all the circuit on copper strip board.

or you want to see all my coding before you all can come out with some conclusion??? i need to post full coding or just part that related to lcd???
thanks. hope you all can help...
hi,
Its best if you post the full code,, rather than a fragment.
Dont forget to include the code in 'code quotes' thats the hash sign in the post reply header menu.
That way your code will retain its formatting..
 
it is better that he /she posts the original and modded version. It would make analysis easy, as the O P clearly states that it worked many a time for him. Perhaps the related schematic would also help, even though the display circumstances can be seen from the display routines.
 
Last edited:
this is the coding i wrote...
i can't remember what i change in the coding. this is the latest one i used

#include <16f877a.h>
#device adc=10
#use delay(clock=20000000)
#fuses hs, noprotect, nowdt, nolvp
#define use_portb_lcd TRUE
#include <lcd.c>

long value[6],i;

long value0;
long valuea, valueb, valuec, valued;
char value1, value2, value3, value4;

void sense1();
void sense2();
void sense3();
void disp1();

void sense_voltbat();
void sense_temp();
void sense_current();

void main()
{
lcd_init();

lcd_putc("\fWelcome to");
lcd_putc("\nUKM");
delay_ms(500);
lcd_putc("\f");
lcd_putc("Please Visit:\n");
lcd_putc("www.ukm.my");
delay_ms(500);

do
{
for(i=0; i<=5; i++)
{
set_adc_channel(i);
delay_ms(10);
value=read_adc();
delay_ms(10);
sense_temp();
sense_voltbat();
sense_current();
}
}while(1);
}

void sense1()
{
valued=value0/1000;
valuec=value0/100-valued/0.1;
valueb=value0/10-valued/0.01-valuec/0.1;
valuea=value0-valued/0.001-valuec/0.01-valueb/0.1;
value4=valued+'0';
lcd_putc(value4);
}

void sense2()
{
valuec=value0/100;
valueb=value0/10-valuec/0.1;
valuea=value0-valuec/0.01-valueb/0.1;
}

void sense3()
{
valueb=value0/10;
valuea=value0-valueb/0.1;
}

void disp1()
{
value3=valuec+'0';
value2=valueb+'0';
value1=valuea+'0';
lcd_putc(value3);
lcd_putc(".");
lcd_putc(value2);
lcd_putc(value1);
delay_ms(10);
}

void sense_temp()
{
value0=value[0]/0.341;
lcd_putc("\fTemperature");
lcd_gotoxy(1,2);

if(value[0]>=341)
{
sense1();
}
else if(value[0]>=34)
{
sense2();
value3=valuec+'0';
lcd_putc(value3);
}
else if(value[0]<=33)
{
sense3();
}

value2=valueb+'0';
value1=valuea+'0';
lcd_putc(value2);
lcd_putc(".");
lcd_putc(value1);
lcd_putc("C");
delay_ms(1000);
}

void sense_voltbat()
{
value0=value[1]/0.683;
lcd_putc("\fVoltage Battery");
lcd_gotoxy(1,2);

if(value[1]>=683 && value[1]<=1024)
{
sense1();
}
else if(value[1]>=68)
{
sense2();
}
else if(value[1]<=67)
{
sense3();
valuec=0;
}

disp1();
lcd_putc("V");
delay_ms(1000);
}

void sense_current()
{
value0=value[2]/0.717;
lcd_putc("\fCurrent");
lcd_gotoxy(1,2);

if(value[2]>=717)
{
sense1();
}
else if(value[2]>=72)
{
sense2();
}
else if(value[2]<=71)
{
sense3();
valuec=0;
}

disp1();
lcd_putc("A");
delay_ms(1000);
}

void sense_voltload()
{
value0=value[4]/0.683;
lcd_putc("\fVoltage Load");
lcd_gotoxy(1,2);

if(value[4]>=683)
{
sense1();
}
else if(value[4]>=68)
{
sense2();
}
else if(value[4]<=67)
{
sense3();
valuec=0;
}

disp1();
lcd_putc("V");
delay_ms(1000);
}
 
Last edited:
do you think the pic is wrecked???
i have measure the voltage at every line of the portb and i get 5V or 0V for the lines.
is it ok??
or some of the line maybe just have 3V/4V??
 
I'm sure the lcd module, pic and perf board are off to the right of the page somewhere :p

pssst...the lcd module is still not being initialised....
 
kimsiang85 said:
i want to get the reading for input which is the pin2, 3, 4 and display it at my lcd
Hai Kimsiang85,
Again I am unable to see the schematic. Have you posted ant special package or what? Can you post either PNG or JPG?
 
mvs sarma said:
Hai Kimsiang85,
Again I am unable to see the schematic. Have you posted ant special package or what? Can you post either PNG or JPG?

it is very weird because i can see the schematic i draw. do you see anything on the image?? i am now posting the image in PNG form. hope you can see it.

**broken link removed**
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top