Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4844

General • Re: How do I connect the voltage source to the Pico ADC ?

$
0
0
This will show the configuration of the pins -

Code:

from machine import mem32def ShowPinStatus(pin):    PADS_BANK0 = 0x4001C000    n = mem32[PADS_BANK0 + ((pin+1) * 4)]    OD = (n >> 7) & 1 # Output Disable    IE = (n >> 6) & 1 # Input Enable    DR = (n >> 4) & 3 # Drive Strength - 0=2mA, 2=4mA, 2=8mA, 3=12mA    PU = (n >> 3) & 1 # Pull-Up    PD = (n >> 2) & 1 # Pull-Down    ST = (n >> 1) & 1 # Schmitt Trigger    SL = (n >> 0) & 1 # Slew Rate - 0=Slow, 1=Fast    print("{} : OD={} IE={} DR={} PU={} PD={} ST={} SL={}".format(           pin, OD,   IE,   DR,   PU,   PD,   ST,   SL))for pin in range(30):    ShowPinStatus(pin)

Statistics: Posted by hippy — Sat Mar 09, 2024 3:16 pm



Viewing all articles
Browse latest Browse all 4844

Trending Articles