devices firmware to load them as a libgpiod driver.
adminy opened this issue · 3 comments
I'm not sure if this is possible, but I was wondering if these usb dongles can be used as linux gpio pins via the libgpiod device manager.
So they can show up as:
/dev/gpiochipN
where N is the current tinyMH plugged in.
Micronucleus is a bootloader over usb. Is there anything else needed for this to be detected as a device in gpioinfo ?
You want to make the tinies a USB device for function other that uploading? You're not gonna be happy.
Micronucleus only works as a bootloader because it was DOING NOTHING ELSE. because it needs to CONSTANTLY POLL THE USB LINEs. There was in the past a dream that interrupt-driven VUSB was posible, and that you would be able to create USB devices in arduino sketches and interact over USB. It is early grade school map to add up clocks it takes to get in and out of interrupts and see that you easilly blow the timing requirements.Digispark bent over backwards to try to make this work, and you canstill only make a very restricticted and constrained set of cases work;
On something newer like an AVR128DB64 extended temp range, overclocked at 48 MHz (twice spec) and with the ability to elevate the priority of the USB interrupt, that would have hope to bitbang USB in interrupt driven mode I suspect.
However I do not advise working on any bitbang USB solutions for modern AVRs however with the DU's so close. Once the DU's are available, and looking at microchip pricing trends. there will simply be no reason to do anything with a classic AVR either m32u4 or tiny with flaky fiddly VUSB. DU's will be priced below m32u4 and around vusb part prices if looking at historical at-release prices for modern AVRs (there's a big table of it over in DxCore docs, "AboutDxSeries" or something, near the bottom)
The DU's are upon release going to instantly become the only rational choice for an AVR developer looking for native USB. My guy on the inside tells me, it could be by the end of the year. But technically, he didn't specify which yeah. and this wouldn't be the first time that they have answered something like "Second quarter" and while it did come out in the second quarter of a year, I wasn't the one that one would have expected....
So I would advise you play with some of the new DD/DB series and modern tinyAVRs (see my other two cores) to get ready for the momentous release of the much anticipated DU-series 16/32k 14 and 20 pins, 16/32/64k 28 and 32 pins (basically it's a DD using MVIO to do the level shifting to USB levels, with the TCD and PLL was sacrificed at the alter of USB as well.,
With VUSB, you have a long road ahead,, which may not actually go all the way to what you want, and you need a lot of work to get it running at all.
With DU's real USB, barring unexpectedly severe bungling and errata. the road head should be more or less straight, wide and within a few months of technical briefs, practically paved for you.
libgpiod just encapsulates the ioctl calls and data structures behind a straightforward API. I don't really need it to be a full usb implementation, just as long as the pins can be set according to the signals coming from the usb and it would be nice if the usb was able to read pins also, but a bare minimum if it was possible to do outputting. If I can't even use them as bit shift registers then what good is this hardware? My intended use was simply to just take 2 pins and turn them into 15 pins. surely that should be possible with this ... I ran out of pins on the Pi and I wanted to use the tiny88 as a gpio extender. Turn the tiny88 into 16-channel 5V USB Serial Port Control Switch