Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Need Help doing C Language Programming for PIC18F4520 MPLAB lCD 3

Status
Not open for further replies.
ofcourse ...I'm still not sure about your hardware connections. Please read my earlier mail and check the connections as i have mentioned and program the recently sent file. It will surely work. I'm very much confident about it.
 

hemnath's 4 bit lcd code is working.
 

Attachments

  • sim ss 24.jpg
    sim ss 24.jpg
    143.9 KB · Views: 80

something is wrong i think , but i dunno what is it
 

what's displaying in the LCD? The program which i sent should work. you can check the post which posted by jayanth.
Can you tell me how you are programming the device?
If you have multimeter, check the voltage at microcontroller pin 1. It should be +5V. If its not, then it can make the problem.
 

my crystal frequency is 32.768kHz, component Y3
 

oh maybe is because of the wrong frequency thats why it doesnt display anything ?
 

5V at mclr, it seems good. you should try debugging your hardware. without your help, we couldn't do anything. I have used Internal oscillator. So never mind about what external oscillator is connected to the microcontroller pins.

@jayanth: i didn't do the lcd program in c18 compiler. I'm not sure about his hardware connections. So i did a small program and sent the hex file. Finally it seems, he got problem with his hardware ..
 

Thats why I'm asking you to check the hardware connections. Still you are in doubt ..
If your LCD pin R_W is not connected to uC pin D5. Then where you connected the Pin R_w and PIN D5?
 

Circuit is in the attached manual for PICDEM 2 Plus - ROHS version

Until the OP can make an LED flash, there seems little point worrying about how the LCD is wired.
 

Attachments

  • picdem2plusGreen.pdf
    1.2 MB · Views: 49

im going to double confirm with my teacher ..

- - - Updated - - -

btw hexreader, my board is black in color... not green
 

my board is black in color... not green
Back when I was writing this code, most older version boards were red, and most newer version boards were green.

This was a poor guide even back then, and is almost meaningless now, but I had already chosen names for the files.

There are two versions of the board, with completely different LCD wiring.

You have the new version (which I mistakenly refer to as "green")


..... but in any case, get the LED blinking first. Forget LCD for now. The pintest.hex file that I posted is as simple as you can get, and uses internal oscillator, so it does not matter about crystal frequency or whether the crystal is working.

I do not have ICD3, but I think you need to do a "release from reset" after programming.
You are "releasing from reset" aren't you?
Alternatively remove the programmer plug from the board to allow the board to run (but make sure you have power - with power LED lit)
 
Last edited:

pintest.hex file is perfectly fine, it is blinking and ticking as well..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top