Thanks Koepel for all this info. It is very helpful.
My project is to adapt standard USB controllers to an Atari console.
The original controller has 18 buttons plus an analog joystick. The buttons are handled by switches, 2 by direct grounding, and 16 by a 4x4 matrix keypad.
The analog joystick is handled by the +5v POTC line and the two POTX and POTY lines. Putting 0 to 100K ohms resistance across these lines is read as the x and y positions of the joystick.
The idea is to use an Arduino (chosen because it is popular and relatively easy to develop for) between the console and a modern USB controller.
I chose the Teensy 4.1 because it has built-in USB host, has a lot of pins and is fast. The Teensy USB host library has sample code that makes it very easy to enumerate and read all kinds of USB devices.
I'm using the keypad.h library and a basic 4x4 matrix keypad on the Teensy, and converting it to one of 16 keypresses using 4 CD74HC4066E 4x analog switches (16 switches total) to cross wires 1-8 on the console harness to simulate keypresses on the console's matrix keypad. I did it this way so I didn't have to worry about how the keypad is scanned, I just cross the wires just as the original controller does.
Not counting voltage or ground, I need at least 18 output (CD74HC4066E switches and fire buttons) 8 input (matrix keypad), 3 SPI pins and USB host.
The CD74HC4066E switches are working fine using 3.3v Vcc and control lines and crossing the 5v lines on the console harness. Is this in-spec?
I'd really like to stick with the Teensy if possible because I like the USB library and I have it working nicely. It fits a lot of functionality in a small size. I think I'm stuck with 5v on the console side.
Assuming the 4066s will work with 3.3 volts on the control pins, the only problem is the 3.3v SPI connected to the 5v 42100. Is it possible to convert the 3.3v SPI to 5v SPI using transistors?
[edit] or something like this? https://www.sparkfun.com/products/12009
[edit again] Looking more into the SPI spec, all three SPI lines in use appear to be output lines. Would outputting 3.3v high from the Teensy to inputs on a 5v MCP42100 cause a problem with the 5v intolerance of the Teensy, or does that only apply to input pins on the Teensy? What about outputting ground from the Teensy to a 5v wire on the console harness?