pic16f877a

tshuck

Joined Oct 18, 2012
3,534

ErnieM

Joined Apr 24, 2011
8,377
mahmood: You say you are new to PICs. I've been doing them for well over a decade now (almost two). So let me see if I can help you get this to work. You seem to have all the pieces there.

First, the program: take the dot-C file, the dot-mcppi, and anything else that looks useful (except the dot-hex file), zip them up and attach to your post. That way I can check how your code builds and otherwise looks. From your previous post it all looks good but I'll peek anyway.

While you are at it check your hardware: does it do anything? I mean that seriously, have you done other checks besides seeing if the LCD works? If not... try to wiggle the pins. Do you have a voltmeter or even a LED? Put a loop at the top of your program like this:
Rich (BB code):
void main()
{
    //4-a- set up ports
    TRISD = 0;     // PORTD All Outputs
    while(1)
    {
        PORTD=0;        // clear
        Delay_ms(1000); // Wait for 1 sec
        PORTD=0xFF;     // all on
        Delay_ms(1000); // Wait for 1 sec
    }
...
Then you can look at every pin on port D to see if it is working, though if 1 works they should all work, and that says much for your hardware.

Then let me know how things look here.
 
Top