problem with i/o pic16F876


Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Apr 2009
    Posts
    4

    Default problem with i/o pic16F876

    HI,
    I'm in troubles here. I have programmed an pic16F876 to blink an LED.
    I tried many ways to do it but the LED just blink a few times.
    I don't know why. I tried to do this with proteus and just work fine but
    in practice it didn't work.

    In same way, I tried with pic16F627 and it worked fine, I don't understand
    the difference for the two devices. Maybe in I/O hardware, I saw a few
    differences in datasheet, but how can I do it?

    Image from proteus : circuit_Proteus.jpg

    I'm using CCS C with MPLAB 8.43


    ----------------------------------------------
    C code

    #include <16F876.h>
    #FUSES XT,NOWDT,NOPROTECT,NOBROWNOUT,NOPUT
    #use delay(clock=4000000)

    void main()
    {

    SET_TRIS_B(0x00);

    for( ; ; ){
    OUTPUT_B(0x01);
    delay_ms(500);
    OUTPUT_B(0x00);
    delay_ms(500);}
    }

    ----------------------------------------------
    hex code

    :1000000000308A0019280000223084008313000881
    :10001000031918280130F800F701F70B0D28F80B29
    :100020000C284A30F700F70B13281628800B0A28F3
    :100030000034840183131F30830583161F149F141B
    :100040001F159F1100308600860101308312860043
    :100050000230A100FA30A2000420A10B2A28831646
    :100060008601831286010230A100FA30A20004202A
    :0A007000A10B352883162428630035
    :02400E00393F38
    :00000001FF
    ;PIC16F876


    ----------------------------------------------

    I already tried pullups, didn't work

    Could anyone give me some help, please!
    Attached Images Attached Images  

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts