This is a simple web page to demonstrate the use of Raspberry Pi Pico W with Waveshare Pico-ePaper 3.7" E-ink Display to display the when the next train to the office is.

Raspberry Pi Pico W

Raspberry Pi Pico is a low-cost, high-performance microcontroller board with flexible digital interfaces.

Figure 1: Raspberry Pi Pico W Pinout.

Key features include:

Raspberry Pi Pico W adds on-board single-band 2.4GHz wireless interfaces (802.11n) using the Infineon CYW43439 while retaining the Pico form factor. The on-board 2.4GHz wireless interface has the following features:

Waveshare Pico-ePaper 3.7" E-ink Display

Figure 2: Waveshare Pico-ePaper 3.7" E-ink Display (front)
Figure 3: Waveshare Pico-ePaper 3.7" E-ink Display (back)
Table 1: Waveshare Pico-ePaper 3.7" E-ink Display pinout
Pin Name Pin Description
VCC 3.3V/5V
GND Ground
DIN SPI MOSI/POCI pin
CLK SPI SCK pin
SS/CS SPI chip selection, low active
DC Data / Command selection (high for data, low for command)
RST External reset, low active
BUSY Busy status output

Key features include:

Wiring Schedule

Table 2: Raspberry Pi Pico W to Waveshare Pico-ePaper 3.7" E-ink Display Wiring Schedule
Raspberry Pi Pico W Waveshare Pico-ePaper 3.7" E-ink Display
VCC VSYS
GND GND
DIN GP11
CLK GP10
CS GP09
DC GP08
RST GP12
BUSY GP13
Figure 4: Breadboard Schematic of Raspberry Pi Pico W and Waveshare Pico-ePaper 3.7" E-ink Display (driver only)

SPI Communication

Sending and Receiving Data

Figure 5: SPI Communication Diagram

SPI (Serial Peripheral Interface) is a synchronous serial communication protocol used for short-distance communication, primarily in embedded systems. It allows a controller device to communicate with one or more peripheral devices using a full-duplex communication method. SPI is widely used for connecting microcontrollers to various peripherals such as sensors, displays, and memory devices.

It's a "synchronous" data bus, which means that it uses separate lines for data and a "clock" that keeps both sides in perfect sync. The clock is an oscillating signal that tells the receiver exactly when to sample the bits on the data line. This could be the rising (low to high) or falling (high to low) edge of the clock signal. When the receiver detects that edge, it will immediately look at the data line to read the next bit. Because the clock is sent along with the data, specifying the speed isn't important, although devices will have a top speed at which they can operate.

Chip Select and Multiple Peripherals

Figure 5: SPI Communication Diagram

SPI Bus? SPI device? What's the difference?

The SPI bus is the communication pathway - or channel that allows data to be transferred between devices. Hense, many SPI devices (peripherals) can use the SPI bus to communicate with the Rapsberry Pi Pico (controller). The Infineon CYW43439 (802.11n wireless) chip also uses SPI for communication. Thankfully, the Raspberry Pi Pico W has two SPI busses available, so in this case both the display and the wireless peripherals can communicate at the same time.

How does the bus know where to send the data if I have multiple devices?

There are a couple of ways that electronics handle serial communication. The SPI bus requires a chip select pin to be connected between the controller and peripheral, with it being held low for the duration of the communication. Multiple peripherals can share the same but, so long as there are enough output pins on the controller to allow for selection.

Flashing to the Raspberry Pi Pico W

todo!