PIC programming

Discussion in 'Embedded Systems and Microcontrollers' started by Fresher, Mar 14, 2010.

  1. Fresher

    Thread Starter New Member

    Mar 14, 2010
    1
    0
    Hi
    I am new to programming.I have run into trouble.
    I am trying to program PIC16F877A using microc and microbrn programmer.
    I wrote this code and transferred it into the MCU.Everything went well but when I placed an led between protb pins 1 and 2 nothing happened.Please help me.

    void main()
    {
    TRISB=0;
    PORTB=0b10101010;
    }
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Have you set the configuration bits correct. They are mentioned in the "SPECIAL FEATURES OF THE CPU" section in the data sheet. If these bits is not proper set according to your application your MCU will not work as it should. You can set them in MPLAB or your code. Also read my answer in this post http://forum.allaboutcircuits.com/showthread.php?t=32461 about the ansel registers. It will apply to your chip also
     
Loading...