Need Help doing C Language Programming for PIC18F4520 MPLAB lCD 3

Status
Not open for further replies.
Code:
#pragma config OSC = HS     //Use external oscillator
But I thought that we had established that the external oscillator does not work on your board. ...or have you repaired the fault?

Code:
#pragma config DEBUG = OFF  //Turn off debug mode
You should not set DEBUG to OFF, or to ON. Delete this line completely. MPLAB IDE will set or clear the debug bit according to whether you chose "Release" or "Debug" option when you compile.

I see you are using XLCD functions to drive your LCD. I hated these routines so much that I ended up re-writing the LCD code to be simpler.
I cannot see where PORTD.7 is set high to turn on the LCD power. I wonder if this is messing things up?

I cannot get your code to compile, but I suspect that my set-up is wrong. I have made little use of MPLAB for the last few years, so I may be of limited further help to you.
 
Last edited:

The Crystal got burned when i did some soldering now currently its ok .. i wrote a program to display voltage.. now the following attached program can work but do you know how to write a similiar program to display temperature readings..
 

Attachments

  • LCD_test.rar
    57.1 KB · Views: 47

Just add a LM32 sensor to your circuit. Connect the output of LM35 to ADC pin of MCU. Then get the adc value and convert it to temperature range.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…