An I/O controller for virtual pinball machines: accelerometer nudge sensing, analog plunger input, button input encoding, LedWiz compatible output controls, and more.
Dependencies:
mbed
FastIO
FastPWM
USBDevice
Fork of
Pinscape_Controller
by Mike R
2 comments:
I'm actually pretty skeptical that the KL25Z could keep up with addressable LEDs. They need quite a lot of bandwidth if you have more than a few of them because of the need to push the bits serially down the whole chain on every PWM update. I also just don't see a lot of benefit to trying to replace the Teensy setup. It would consolidate the hardware a bit, but at the software level, I think this needs to go across the USB bulk endpoint, so you'd need some kind of dual HID + WinUSB interface, which I'm not sure is even possible. And that wouldn't simplify anything at the software setup level on the PC; it would still look like two devices.
MikePinball
#
13 Feb 2019
I did quite a bit more investigation on this. I started with this article that shows some problems using DMA with the KL25Z. This makes it a non-starter.
You really need eDMA support that can be found on the more advanced uCs as described in this series of articles that use the FRDM-K64F.
Enhanced DMA is supported on a number of the newer KL uCs boards such as the FRDM-KL28Z ($23) and FRDM-KL82Z ($32). I will need to do a more detailed I/O pin mapping to make sure that a complete set of 8 I/O pins are available such as C0-C7 or D0-D7.
I'm actually pretty skeptical that the KL25Z could keep up with addressable LEDs. They need quite a lot of bandwidth if you have more than a few of them because of the need to push the bits serially down the whole chain on every PWM update. I also just don't see a lot of benefit to trying to replace the Teensy setup. It would consolidate the hardware a bit, but at the software level, I think this needs to go across the USB bulk endpoint, so you'd need some kind of dual HID + WinUSB interface, which I'm not sure is even possible. And that wouldn't simplify anything at the software setup level on the PC; it would still look like two devices.