User Tools

Site Tools


wio:wiopico-en

This is an old revision of the document!


WIOpico


pico.jpg

WIP
Pin assignments are due to change in case a GCA board comes available.


Introduction

The Raspberry Pi Pico can be used as WIOpi I2C slave for common tasks:

  • 4 Servos or 32 NeoPixel
  • 16 I/O (100ms scan)
  • 2 four wire stepper (ULN2003)
  • up to 4 Charlieplexing signals on both I/O banks

The NeoPixel protocol engine needs all interrupts on the Pico. This is the reason that it is not possible to combine servos and neopixel simultaneous on the same Pico.


WIOpico Firmware

The binary firmware can be downloaded here:
https://wiki.rocrail.net/rocrail-snapshot/WIOpico.ino.rpipico.uf2

Install

  1. Keep the Pico button pressed at connecting to USB.
  2. The Pico will behave like a removable drive.
  3. Copy the WIOpico.ino.rpipico.uf2 file on this drive.
  4. Ready.

Pins

Configuration
Servo GP0 (pin 1) connected to GND
NeoPixel GP0 (pin 1) open and connected to LED strip: Needs a 10k pullup.
I2C Slave address GP1 and GP2


I2C Slave Address
GP1 GP2 Address
off off 124
on off 125
off on 126
on on 127


I/O Banks
GP28 Value Config Bank 1 Bank 2
< 100 or > 4000 0 Input Output
< 1000 1 Input Input
< 2000 2 Output Output
< 3000 3 Output Input
< 4000 4 - -
GND *--[2k2]--*--[2k2]--*--[2k2]--*--[2k2]--*--[2k2]--* VREF
    |         |         |         |         |         |
Jmp /         /         /         /         /         /
    0         1         2         3         4         0
    *---------*---------*---------*---------*---------* GP28

The GP28 value can be checked in the Monitor.


I2C
SDA GP4 (pin 6)
SCL GP5 (pin 7)


NeoPixel
Data GP0 (pin 1)


Servo
PWM GP6 (pin 9)
PWM GP7 (pin 10)
PWM GP8 (pin 11)
PWM GP9 (pin 12)


Stepper
IN1 GP10 GP14
IN2 GP11 GP15
IN3 GP12 GP16
IN4 GP13 GP17


I/O
Bank 1 GP18…GP27 and GP3: needs 10k pullup.
Bank 2 GP10…GP17: needs 10k pullup.


NeoPixel Addressing

Node ID WIOpi node ID
Address Pixel number
Port I2C slave: 124…127


Charlieplexing Signal Support

A Rocrail signal with control aspects and port type multiplex, uses 4 pins starting with the port offset.
The refresh rate is about 250µs.
Aspect values are used from the details tab. 24bits are used, the upper 12bits are for blinking.
Example: LED 1 and 2 on and LED 2 blinking: 0x002003 → Aspect value = 8195

Test Signal

Diagram:
multiplex-signal.jpeg
Signal setup for WIOpi 98 and slave 126:
multiplex-signal-int-en.jpgmultiplex-signal-details-en.jpg

PINOUT

pico-pinout.jpeg


Arduino IDE Monitor

Type ?<enter> in the monitor to check the configuration of the Pico:

WIOpico (c)Rocrail Oct 20 2021 10:47:03
I2C:126 (pixel=0 servo=20003F70 IO=FF 00 servo=00 GP28=4083 CNF=0 IO1=input IO2=output)


wio/wiopico-en.1635497940.txt.gz · Last modified: 2021/10/29 10:59 by rjversluis