adafruit / Adafruit-ItsyBitsy-M4-Express-PCB

PCB files for the Adafruit ItsyBitsy M4
Other
6 stars 7 forks source link

Dotstar LED and SERCOM5 #1

Closed ghost closed 5 years ago

ghost commented 5 years ago

First of all thank you for the Itsy Bitsy M4, it's a great board.

Rather than using your Dotstar Library, I decided to control the LED by simply configuring SERCOM5 as a SPI port, but quickly ran into trouble.

It appears in the Itsy Bitsy schematic that the Dotstar clock has been connected to port pin PB02 (SERCOM5/PAD[0]) and data to PB03 (SERCOM5/PAD[1]). Unfortunately the SAMD51's SERCOMs cannot be configured for a clock on PAD[0] and data on PAD[1].

Unless I'm mistaken, this means that it's necessary to bit-bang the Dotstar's control lines. If the data and clock pins were reversed, it would have allowed for hardware SPI control with SERCOM5. Same goes for the Itsy Bitsy M0 on SERCOM1.

ladyada commented 5 years ago

yep - the routing was too tight for other way and also it seemed a shame to waste a sercom on one pixel when all our drivers support bitbanging :)