PIC not powering up.

Discussion in 'General Electronics Chat' started by saifmalik87, Apr 15, 2013.

  1. saifmalik87

    Thread Starter New Member

    Apr 15, 2013
    2
    0
    Hi guys!

    I am using Proteus 7.6 and used PIC18F45K20. All connections are correct and also coding is correct but still LEDs don't get power. Is there something wrong with hidden power pins or do I need to configure them?Can anyone help?

    Thanks
    Saif
     
  2. atferrari

    AAC Fanatic!

    Jan 6, 2004
    2,652
    766
    POst the actual schematic and the code.
     
    saifmalik87 likes this.
  3. saifmalik87

    Thread Starter New Member

    Apr 15, 2013
    2
    0
    Thank you.
    Main code in MikroC Pro:
    void main() {
    TRISD=0;
    LATD=0;
    while(1)
    {
    LATB=~LATB;
    Delay_us(1000);
    }

    }
    I fixed the problem. I was using PORT D in hardware but in code it was B.
    :)
     
Loading...