From what I can tell, they track the rising and falling edges of the pins using interrupts, so it’s possible they would be more processor intensive.
It might be an issue for the speaker,
though I doub’t it would be as much of an issue for the LED given how infrequently it’s used.
Barring the issue with USB usually being 5V,
would normal PEX pins not suffice if there was a suitable system for acting as a host?
Is the protocol not the same even if you use unadorned pins instead of a standard port?
I found a few mbed classes for controlling USB, but none listed the Pokitto’s MCU as being supported unfortunately.
Though that isn’t to say it’s not possible that one does work for the Pokitto or that there aren’t alternatives.
If there’s evidence to suggest that there will definitely be an official ESP32 hat or there will definately be an ESP32 chip added to the Pokitto, or if there’s evidence to suggest it would be cheaper than the 32u4 approach then it’s worth consideration.
Even with those taken into account, I think a full scale emulator that would be compilable for ESP32 might be a bit difficult to find/create.
The USB pins on the 32u4 are dedicated to USB only. They’re not usable as general purpose I/O. You need a USB host to talk to it. Since the standard Caterina bootloader used in the Arduboy expects to talk over the USB pins using USB protocol, that’s what you need to provide.
A custom bootloader could be made to use any pins and any protocol.
If I were tasked with writing a custom bootloader for an Arduboy hat, I’d probably use the 32u4 RX and TX UART pins (0 and 1). I’d use asynchronous serial protocol and ether the standard AVR programming commands or something more suitable for control by the Pokitto.
I was going by Wikipedia, there was no mention of 3.3V.
In that case it’s probably even easier.
So essentially if it were possible to make the Pokitto act as a USB host then the USB connection could be done over plain pins, without an actual USB port, yes?
By “plain pins” do you mean ones that swing from GND to 3.3V? If so yes.
Or, do you mean over general purpose I/O pins? If so, I don’t think so. You would need dedicated USB hardware. I’ve never heard of anyone “bit banging” a USB host controller.
EDIT: After some research, it looks like bit banging USB may be possible. However, I don’t see what the problem would be with making a custom bootloader. You have to burn some kind of bootloader into the 32u4 on the hat anyway, and the hat is dedicated to connecting to the Pokitto. You could probably hack the one used on the Arduino UNO, that uses a serial interface, pretty quickly. You could then wire the 32u4’s USB port to a microUSB connector, so you could use it with Arduboy sketches that emulate a mouse, keyboard, etc.
Caterina is a LUFA CDC derivative using an AVR serial protocol. Just drop the virtual USB port part of the bootloader and recompile to read directly from uart (shouldn’t be too hard, and has been done with 8-bit Caterina versions)
If you’re sure it’ll be easier than getting the Pokitto doing USB over the PEX then I guess I’ll drop that idea.
If we do end up going down that route though,
it might be best to wait for a bit.
Someone on the Arduboy forums called Mr.Blinky (who I assume is the same one with an account here) has been working on an improved version of the caterina bootloader (which can be found here on his github), and it might be worth asking him if we could use that as a base.
It’s mostly done but he recently mentioned a few more things he had in mind for it.
Arduboy owners. Help please!
I started working on PCB. I found a schematic of arduboy (page says it’s production schematic). But…
It’s working completely on battery voltage and crystal is 16MHz. There are no boost circuit. Running atmega32u4 with battery is not a good idea (lipo batteries can go below 3v and below 4.5v running at 16MHz is not safe).
Pokitto is 3.3v device. We need boost converter, logic level shifters etc. for this.
Is any arduboy owner faced any problem due overclocking? I want to stay in safe side but for lower production cost we can do overclocking.
This was discussed back in the design stages (literally years ago now - time flies!!) and Kevin acknowledged this, and said running it outside of the specifications would be no big deal:
Thanks for information
We can try running at 3.3v and 16MHz for a while and see what happens. If we see any problem I can add other circuits. @Hanski production cost is not too much. When I draw a schematic I can say what is the production cost. Also you’re right. We need to split this discussion to another post.
Edit 2: Added PCB layout images. I will add RGB led later. Board dimensions are 49x32mm. With this dimensions we can use seeed or jlcpcb PCB service with 2x3 panelled boards. It means you can buy 60 boards with just 5 dollar (plus shipping ). Also small pcb means cheaper oshpark boards. I will calculate cost of one populated PCB tomorrow.
To be safe, you should connect PD2/RXD and PD3/TXD to UART capable pins on the PEX, in case we want to use a serial based bootloader on the hat, as discussed above:
@MLXXXp
Oops… I forget that. Thanks
I see your posts on Arduboy forum. Your suggestions are really great to make stable hardware. If you want to say something about this project, I glad to hear your suggestions.
Wonderful work! I suppose the PEX male connector in PCB will finally be facing downwards. As the PEX female connector in Pokitto is not in the middle of the device, should the PEX male connector be also more near the right edge on the PCB? To make it to look symmetric when connected.