16F627A PortA.4 trouble?


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Location
    Kent, UK
    Posts
    52


    Did you find this post helpful? Yes | No

    Default Re: 16F627A PortA.4 trouble?

    Add a pull up resistor, then it will work. Depends on what you are driving as to what value to use.

  2. #2
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: 16F627A PortA.4 trouble?

    Right you are. No easy way to add that to these PCB's though...
    Shawn

  3. #3
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: 16F627A PortA.4 trouble?

    I am not liking this chip! Maybe I should go back to my more familiar 18F parts!

    New problem, I was trying to setup the capture module using timer1 and I accidentally configured timer1 to use an external osc which made me loose control of those pins as general I/O's. Problem is, now my programmer can't re-program the chip to change it. It doesn't detect the PIC. Not sure why an MCLR reset won't allow me to use the timer1 OSC pins as PGC and PGD, but it isn't working. Any ideas?
    Shawn

  4. #4
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: 16F627A PortA.4 trouble?

    OK, I bricked 2 of these chips now... With this code?

    Code:
    Capture      VAR PIR1.2              
    T1CON.5=1     '1:4 prescaler
    T1CON.4=0     '1:4 prescaler
    T1CON.3=1     'Timer1 OSC enabled
    T1CON.2=1     'sychro clock
    T1CON.1=0     'internal clock
    T1CON.0=1     'start timer
    It works fine until I add the above into my program, then it seems portb.7 gets fried and I have to replace the chip to program again.
    Shawn

  5. #5
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: 16F627A PortA.4 trouble?

    Hi,
    Just a shot in the dark here, can it have anything to do with LVP, do you have it turned OFF in the CONFIGs?

    What programmer are you using to program the chips? Once they are "bricked" can't you even erase them?

    /Henrik.

  6. #6
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: 16F627A PortA.4 trouble?

    LVP is off, the chip still works 100% except portb.7 (maybe portb.6 too, I don't have anything on that pin) I have an LED on portb.7, which works fine until I add the above code. The programmer is a PICFlash2. It does not recognize the chip at all, won't allow me to erase, read, write, etc... I really need to use the capture module, but I can't keep bricking these chips. Not sure how to proceed from here.

    Thanks!
    Shawn

  7. #7
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: 16F627A PortA.4 trouble?

    Hi,
    I think the pin stop working because you enable the oscillator for TMR1, the oscillator uses RB6 and RB7 so they can't then be used as I/O.

    I see you're using internal oscillator, are you using internal MCLR as well by any chance?

    Looking around there seems to be an issue with using internal oscillator and internal MCLR and initially setting PGD/PGC pins as outputs - or something like that. In that case the device apparently can't enter programming mode without the device programmer applying Vpp before Vdd which apparently not all device programmers can do - again, or something like that. See this for example.

    Not saying this IS the case in your case but it does "smell" like it to me.

    /Henrik.

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