Previous journal: | Next journal: |
---|---|
0089-2023-06-05.md | 0091-2023-06-07.md |
Want to try driving/reading DE0-Nano pins with async clocking, so as to behave like an actual CPU bus:
- Consider making the DUT (target design) interface just 8 IOs, so it is both simpler to implement (I think?) and works with more controllers that are IO-constrained, e.g. have up to 4 control pins, and a bi-dir nibble (so a 24-bit register would take 6 control-clocks). Just remember that the speed of reads/writes would be slower than the main system clock, because of the synchronising input DFFs (i.e. metastability avoidance).
- USB-UART options:
- Most USB-UARTs seem to max out around 1~2Mbps.
- I think FTDI chips (FT232) have 8 GPIOs, controllable by USB, besides just their UART.
- CY7C65213 (datasheet) is a pin-compatible replacement for FTDI chip? Besides 2-pin up to 8-bit UART, it also has 8 GPIOs. In turn these could probably cooperate with a shift register or IO expander?
- FT232H (see also: datasheet)
can do a bunch of other generic serial protocols, but still only 8 GPIO?
This claims:
The board supports a total of 16 I/O lines in any combination of input or output. All lines are 3v or 5V capable. ...but is that definitely true? I didn't fully get that impression from the datasheet.
- FT245 by comparison is a USB 8-bit IO with FIFO but reads/writes are driven by an external master.
- CH340G and CP2102 I don't think are suitable: There are flow control pins but not sure if we can use them as IOs; certainly there are not enough.
- CH341 (maybe CH341A?) (see also: here) looks like it can be a USB-UART, but also USB parallel port and EPP (supposedly the EPP standard can do up to 2MByte/sec, half-duplex bi-dir, but not sure what CH341A actually maxes at), including 8 data pins and other parallel port control pins...? Supports IEEE-1284. The CH341A "MEM" mode sort of looks like a wider general bus/GPIO mode, but it's not clear. Table 4.5 of the datasheet ("Parallel mode pins") shows that there are 8 bi-dir tri-state IOs, 3 dedicated outputs (though one may be a reset line only?) 1 tri-state output, 4 dedicated inputs (including 1 interrupt?), and a CH341A WAIT input.
- MCP2210 has 8 pins that can be used as GPIOs, and 1 extra input-only.
- Could use an STM32 with firmware doing just the main intended tests, or it could be a bridge.
- If STM32 blue pill can do UART over USB (to host PC), or even be a custom USB device, then this is probably fine: program it with firmware that understands how to receive "commands" over UART and
- Look into "Firmata protocol" for converting Arduino boards into USB-GPIOs? See general description of firmata/arduino. Note that "StandardFirmata" might be the way to go?
- stm32duino
- Discussion about this stuff
- Other chips I've got:
- MCP23017 - 16-bit I/O expander with serial interface.
- PC8574T chips, and board (for LCD driver?). 8-bit I2C I/O expander?
- SX1509 breakout boards - 16-bit I2C I/O expander