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.

Pic lcd

Status
Not open for further replies.

Dreak

New Member
Here is my program
void delay(int);
#include<p18f452.h>
void main(void)
{
LATCbits.LATC4=0;
LATCbits.LATC5=0;
delay(100);
LATCbits.LATC5=1;
delay(100);
LATD=0x38;
LATCbits.LATC4=0;
LATCbits.LATC5=0;
delay(100);;
LATCbits.LATC5=1;
delay(100);
LATD=0x01;
LATCbits.LATC4=1;
LATCbits.LATC5=0;
delay(100);;
LATCbits.LATC5=1;
delay(100);
LATD='w';
}
void delay(int a)
{
int j;
for(j=0;j<a;j++)
{
}
}
& here is a schematic for reference
View attachment 63764
the program neither works on PIC Board, nor on Proteus sim
& this is not just about this particular program. no program (even as simple as led blinking didn't run). Any reasons? Ic does get programmed though.
 
This is interesting to me because I am a PIC newbie too!

In your program, I don't see a value being assigned to "a" - but I don't really know C. Does it get the value from the function call?

Have you checked that the power/gnd connections actually have voltage on them? It's strange not even an LED flasher will work. Can you run the program step by step in your IDE?

If no program will run, how can you tell it is being programmed? Is your IDE using the correct compiler? Does the chip get vcc,vpp and gnd when it's being programmed? Check voltages at the actual pins of the PIC.

Well, that's all I can think of. Good luck.
 
Dreak, you should always post code in between code tags (there's an icon for it in the bar about the text you enter when creating a post) this allows the white spacing (tabs and indentation) to appear correctly for code making it much more readable.
 
Status
Not open for further replies.

Latest threads

Back
Top