Announcement

Collapse
No announcement yet.

16f627 ccp1

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 16f627 ccp1

    On a 16F627, RB.3 has an optional CCP1 function. Must I have a command writing in PBP3 to use this solely as an output pin (not used as CCP)? CCP1CON=? -Keith

  • #2
    No, the CCP module is OFF at power-up or reset.

    You don't need to do anything else to use RB3 as I/O.
    PBP3 Manual : Microchip Datasheets - 10F, 12F, 16F, 18F
    Never download a PIC datasheet from anywhere but microchip.com

    Comment


    • #3
      Thanks Darrel. The reason I a is, I was testing to see if I could low voltage erase this PIC because I'm using an LCD at 3.3Volts and would be helpful to not to go through the contortions that I prepared should I not be able to erase this way (socket LCD, switch in different voltages, remove and program and re-socket).
      So I tested by erasing, with the LCD removed, but used the LCDs backlight terminals for a 'blink LED' test. Erased first at low voltage (that worked), programmed at same voltage (3.3 volts) that programmed and verified. Bt no 'blink' on this pin RB.3.
      Used the pin to drive mosfet gate, with current limiting which I've done many times before. All pins on mosfet check out -Keith

      Comment


      • #4
        Okay, I solved the problem...sort of. Part of it was just a silly oversight in code.
        So originally I used 'low power erase' hoping that would work at 3.3volts. It said it was 'successful'. But I don't know if using low power erase requires using the PGM pin (which I wasn't; that was used as a normal I/O). So then for some reason, it actually programmed the part (or at least it said "programmed and verified) at 3.3Volts (again not using the PGM pin). Of course that was when I discovered my test program didn't work. So once I fixed the code problem, I erased at 3.3 volts and programmed at 3.3 volts and got an error. So then I erased at 5 volts and programmed at 5 volts (I have a dual DIP switch for changing voltage supply) and all looked well. Code functioned as expected (LED blinked). But when I tried running the processor at 3.3 volts...didn't work. Any idea?-Keith

        Comment


        • #5
          The LVP/PGM (Low Voltage Programming) is for low voltage VPP signaling instead of 8-13V VPP. It has nothing to do with programming when the power supply voltage is low.

          What OSC frequency are you running?
          They won't run above 10Mhz at 3.3V.
          PBP3 Manual : Microchip Datasheets - 10F, 12F, 16F, 18F
          Never download a PIC datasheet from anywhere but microchip.com

          Comment


          • #6
            Just running the internal at default. Works perfectly at 5 volts. Can read the 'high/low' sequence, on the pin in question. At 3.3 volts, nothing.-Keith

            Comment


            • #7
              Have you disabled the BOD (Brown-Out Detect) in the configs?

              It will reset the chip when VDD is below 4.0V.
              PBP3 Manual : Microchip Datasheets - 10F, 12F, 16F, 18F
              Never download a PIC datasheet from anywhere but microchip.com

              Comment


              • #8
                Ah-ha! Have to wait until tomorrow to check on that machine I'm using for it but I do believe I had BOD checked. Sounds likely. Will report back tomorrow. Thanks, Keith
                PS-All these years,I've never used PICs at 3.3 volts before but all is changing on peripherals.

                Comment


                • #9
                  Yup, that was it. Erased and programmed at 3.3 volts. Pin does what it's supposed to. So the programmer doesn't care if the target PIC is at this lower voltage to succeed in programming?
                  Thanks for your help.-Keith

                  Comment

                  Working...
                  X