
RP2040 chip supports two SPI peripherals.
I2C LCD Interfacing with Raspberry Pi Pico Display Text and Custom Characters. BME280 with Raspberry Pi Pico using MicroPython. Three speed modes such as Standard ( m 0 to 100 Kb/s), Fast( ess than or equal to 400 Kb/s) and Fast Plus mode ( s less than or equal to 1000 Kb/s). Master or Slave Mode ( Default salve address = 0x055). I2C controller of RP4020 chip supports the following features: But before using an I2C controller, you should configure in software which GPIO pins you want to use with a specific I2C controller. Each connection of the controller can be configured through multiple GPIO pins as shown in the figure. The following table shows the connection of GPIO pins with both I2C controllers. Both I2C controllers are accessible through GPIO pins of Raspberry Pi Pico. Raspberry Pi Pico ADC with Voltage Measurement Examples. Therefore, the sampling frequency is 96 x 1 / 48MHz) = 2 μs per sample (500kS/s).Ĭheck this Raspberry Pi Pico ADC tutorial: ADC takes 96 CPU clock cycles to perform one conversion. Because RP2040 microcontroller operates on 48MHZ clock frequency which comes from USB PLL.
ADC ModuleĪ/D conversion can be performed in polling, interrupt, and FIFO with DMA mode.ĪDC conversion speed per sample is 2μs that is 500kS/s. The following table shows that the input signal for ADC0, ADC1, and ADC2 can be connected with GP26, GP27, and GP28 pins, respectively. Therefore, if we want to measure temperature, we can directly use build-in temperature by reading the analog value of ADC4. The fourth analog channel is internal connected to the internal temperature sensor.
But only three analog channels are exposed to pinout. It supports four 12-bit SAR based analog to digital converters.
PIR Motion Sensor with Raspberry Pi Pico using External Interrupts. Note: The Raspberry Pi Pico’s GPIOs are connected to the on-board 3.3V rail and are therefore fixed at 3.3V.įor more details, you can see this example where we used a PIR motion sensor to read its output on interrupt using Raspberry Pi Pico: Negative edge ( transition from active high to active low).
Positive edge ( transition from active low to active high).