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 ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 ?
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.
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