W600_Pico SPI pins

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
GryKyo
Posts: 12
Joined: Sat Dec 15, 2018 12:43 am

W600_Pico SPI pins

Post by GryKyo » Mon Mar 23, 2020 1:45 am

I have started to like the simple ftp server interface on this little $2 thing to bung new or modified code over WiFi to test on the board. Today I tried the ePaper driver modules from https://github.com/mcauser/micropython-waveshare-epaper which seem to work for quite a few dev boards.
I have had no luck getting a WaveShare 2.9" ePaper display to even clear so think that I am having an issue with hardware. I have code running (a cut down "test.py" from the examples on this GitHub) and have no errors or exceptions, everything initializes OK. I have no display though!

Has anybody managed to understand the pin definitions for this chip and has anybody managed to operate the SPI interface? I would love to know what hardware pins and definitions you are using, it is like i have a very basic wiring issue!

This may help?

Code: Select all

import epaper2in9, framebuf
from machine import SPI, Pin

print("MAIN: begins here")

# SPI0 on W600_Pico
spi = SPI(0, baudrate=100000, polarity=1, phase=0, sck=Pin(Pin.PB_16), miso=Pin(Pin.PB_17), mosi=Pin(Pin.PB_18))
cs = Pin(Pin.PB_15)
dc = Pin(Pin.PB_07)
rst = Pin(Pin.PB_08)
busy = Pin(Pin.PB_09)

e = epaper2in9.EPD(spi, cs, dc, rst, busy)
e.init()
...or possibly this?

Code: Select all

>>> import machine
>>> help(machine.Pin)
object <class 'Pin'> is of type type
  init -- <function>
  value -- <function>
  irq -- <function>
  OPEN_DRAIN -- 1
  IN -- 1
  OUT -- 0
  PULL_UP -- 1
  PULL_DOWN -- 2
  PULL_FLOATING -- 0
  IRQ_DOUBLE_EDGE -- 2
  IRQ_RISING -- 0
  IRQ_FALLING -- 1
  IRQ_HIGH_LEVEL -- 3
  IRQ_LOW_LEVEL -- 4
  PA_00 -- 0
  PA_01 -- 1
  PA_02 -- 2
  PA_03 -- 3
  PA_04 -- 4
  PA_05 -- 5
  PA_06 -- 6
  PA_07 -- 7
  PA_08 -- 8
  PA_09 -- 9
  PA_10 -- 10
  PA_11 -- 11
  PA_12 -- 12
  PA_13 -- 13
  PA_14 -- 14
  PA_15 -- 15
  PB_00 -- 16
  PB_01 -- 17
  PB_02 -- 18
  PB_03 -- 19
  PB_04 -- 20
  PB_05 -- 21
  PB_06 -- 22
  PB_07 -- 23
  PB_08 -- 24
  PB_09 -- 25
  PB_10 -- 26
  PB_11 -- 27
  PB_12 -- 28
  PB_13 -- 29
  PB_14 -- 30
  PB_15 -- 31
  PB_16 -- 32
  PB_17 -- 33
  PB_18 -- 34
  PB_19 -- 35
  PB_20 -- 36
  PB_21 -- 37
  PB_22 -- 38
  PB_23 -- 39
  PB_24 -- 40
  PB_25 -- 41
  PB_26 -- 42
  PB_27 -- 43
  PB_28 -- 44
  PB_29 -- 45
  PB_30 -- 46
  PB_31 -- 47
Thanks,

Garry

Post Reply