Menu

Activate Pull up resistor PIC16F628

Help
Capaction
2009-08-03
2013-05-30
  • Capaction

    Capaction - 2009-08-03

    How can we activate the internal Pull up resistors on the PIF 16F628 with GCBasic  ?
    If not possible what value of array resistors should be used outside the PIC on the board ?

     
    • kent_twt4

      kent_twt4 - 2009-08-03

      The data sheet says to clear the notRBPU bit for PortB pullups, and then setting the individual TRISB register as an input will activate it.  So, to activate say the PortB.0 and PortB.1 pin pullups:

      Set NOT_RBPU Off ;from 16f628.dat file and data sheet
      dir PortB.0 in ;set pin as input
      dir PortB.1 in

      10k resitors are commonly used for pullups, much like the MCLR pin circuits you see.

       
    • Capaction

      Capaction - 2009-08-08

      The set NOT_RBPU Off did not work  since the 16F628.dat  file has errors.
      I edited the file with a Find Replace:  OPTION by OPTION_REG and now I get  the expected ull up

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.