Hi,
Playing with the PICO and its working well.
If I want a single pin (GP5) to be a input and set a weak pull up or pul down, how would I do this?
Does it need a line of C code?
I have a Switch component setup, set for Active Low. So I assume the Pin will be correctly set as an input.
Thanks, J.
PICO GP IO Internal weak Pull UP Down
-
- Posts: 157
- http://meble-kuchenne.info.pl
- Joined: Sun Dec 20, 2020 6:06 pm
- Has thanked: 58 times
- Been thanked: 44 times
-
- Valued Contributor
- Posts: 415
- Joined: Mon Dec 07, 2020 1:00 pm
- Has thanked: 76 times
- Been thanked: 231 times
Re: PICO GP IO Internal weak Pull UP Down
Try this C code
It might need to be placed after a Switch Read macro, which will initialise the pin for input.
Code: Select all
gpio_pull_up(5);
Re: PICO GP IO Internal weak Pull UP Down
Hi,
Thanks, yep that works great.
Also found the pull down and pull disable (leave pin floating) commands.
test program attached for anyone else wanting to play along.
Also checked and the pull up is weak at around ~50K but works for my needs J.
Thanks, yep that works great.
Also found the pull down and pull disable (leave pin floating) commands.
test program attached for anyone else wanting to play along.
Also checked and the pull up is weak at around ~50K but works for my needs J.