The design works as Full Speed (12Mbit/s) USB communications device class (or USB CDC class).
Most of the code is based on this repo: https://github.com/ulixxe/usb_cdc
When connected to a pc the device should appear 1 or more serial ports. (COMX on Windows, /dev/ttyACMx on Linux and /dev/cu.usbmodemxxxx on OSX)
Linux requires that the user account belongs to the dialout group to grant permissions for virtual COM access.
Channel 0 application: Input to serial
When the value from one of the inputs change from 0 to 1 or 1 to 0 it sends a character to the port.
pin | rise | fall |
---|---|---|
input[0] | A | a |
input[1] | B | b |
input[2] | C | c |
input[3] | D | d |
input[4] | E | e |
input[5] | F | f |
input[6] | G | g |
input[7] | H | h |
(here goes a simple schematic some instructions)
USB cable 1.5k resistor
optional: Buttons for the inputs
# | Input | Output | Bidirectional |
---|---|---|---|
0 | input_0 | usb_pu | usp_p |
1 | input_1 | debug_led | usb_n |
2 | input_2 | debug_usb_configured | |
3 | input_3 | debug_usb_tx_en | |
4 | input_4 | debug_frame[0] | |
5 | input_5 | debug_frame[1] | |
6 | input_6 | debug_frame[2] | |
7 | input_7 | debug_frame[3] |