PIC 12F629 gpio internal pull-up/down settings
-
- Posts: 4
- http://meble-kuchenne.info.pl
- Joined: Wed Apr 06, 2022 4:48 pm
- Has thanked: 1 time
- Been thanked: 1 time
PIC 12F629 gpio internal pull-up/down settings
Hi, I have a difficulty to set the code of gpio internal pull-up/down settings. Anyone can teach me how to set the code? Thank a lot!
-
- Matrix Staff
- Posts: 1901
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 494 times
- Been thanked: 668 times
Re: PIC 12F629 gpio internal pull-up/down settings
Hello,
The PIC12F629 only has internal pull up resistors but these can be enabled as follows using a C icon.
The PIC12F629 only has internal pull up resistors but these can be enabled as follows using a C icon.
Code: Select all
OPTION_REG = OPTION_REG & 0x7F; //Clear GPPU bit enabling pull ups
WPU = 0x11; //Enable Pullup on GPIO0 & GPIO4
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: PIC 12F629 gpio internal pull-up/down settings
Is it correct? The internal pull up resistors of IOPort 4 is still disable.BenR wrote: ↑Thu Jun 16, 2022 9:41 amHello,
The PIC12F629 only has internal pull up resistors but these can be enabled as follows using a C icon.
Code: Select all
OPTION_REG = OPTION_REG & 0x7F; //Clear GPPU bit enabling pull ups WPU = 0x11; //Enable Pullup on GPIO0 & GPIO4
Thanks.
-
- Matrix Staff
- Posts: 1901
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 494 times
- Been thanked: 668 times
Re: PIC 12F629 gpio internal pull-up/down settings
Hello,
You have the C code in between the /* and */ symbols, these are comment blocks and need removing otherwise the code is effectively commented out.
You have the C code in between the /* and */ symbols, these are comment blocks and need removing otherwise the code is effectively commented out.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel