Problem with PIC16F87


Closed Thread
Results 1 to 40 of 44

Hybrid View

  1. #1
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    Code:
    TRISB=%00000100
    From your code you have portB.2 set as an input but it seems not used. Is this input pin floating?

    Al.
    All progress began with an idea

  2. #2
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Acetronics: The fuses are set in micropro (the software that programs the chip). I will try adding all of the other lines to the code though.

    aratti: portB.2 is used as a serial input. Its not used in this test code but it will be eventually

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by The Master View Post
    The fuses are set in micropro (the software that programs the chip)
    Ayayaye ... Quel Malheur !!!

    . I will try adding all of the other lines to the code though.
    I do recommend you to succed adding those lines ... humour !

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ive tried adding those lines. It wouldnt compile with the first 3 so i commented those out. Its still not working properly. It does seem like its trying to work now and for a few seconds the lights flash at the right speed then they will start to hang in 1 state or flash rapidly.

    I think ive seen a chip do this before when the supply cable is faulty but ive replaced that. The PSU is one i always use for things like this and is working properly, there are capacitors on the board and ive even tried adding an extra external capacitor

    Im going to breadboard the circuit up with only an LED connected to see if i can get it working. Is there anything else i can check?

  5. #5
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ive found the problem. I thought a bit more about the faulty supply thing. Ive got a 555 on the same board. I tried removing it and the PIC seems to be working fine now.

    Ive uploaded the schematic of the 555 part of the circuit. I know that works because ive checked it with the breadboarded version that i still have. The question is how can that affect the PIC part of the circuit?
    Attached Images Attached Images  

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    I thought it was a 16F88 ... sorry !

    Did you install the 0.1µF close to the '87 supply Pins ( between pins is best ! ) ... and a 10µF+ Tantalum as close as possible ???

    Some decoupling might be also necessary for the 555 : there are well known current spikes while the output stage toggles ... or try a CMOS 555 !

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  7. #7
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    I think i have a 10nF cap right at the side of the chip. Its as close as i can get it. There is also a 100uF cap right after the regulator. Theres also an audio circuit that connects to it which has a pair of 1000uF caps on i think (they are at least 100uF). It doesnt make any difference wether or not that circuit is attached.

    I didnt use a CMOS 555 because i read somewhere that they wouldnt be suitable for this circuit.

Similar Threads

  1. problem using GOSUB under interrupt
    By fobya71 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 5th March 2010, 19:52
  2. Problem to compile my program
    By wagner in forum Off Topic
    Replies: 5
    Last Post: - 7th July 2008, 20:17
  3. USART Problem , but don't know where, in pc? or in PIC?
    By precision in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 15th July 2007, 08:12
  4. 1 slave 1 master 1 MAX232 1 problem ?
    By SuB-ZeRo in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 31st July 2005, 22:59
  5. PORTA.PinNo = 1 ' problem
    By frank small in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th May 2004, 14:30

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