This is a simple to build interface, which allows to plug any USB device to the Amstrad CPC. The chip used is the WCH CH376, which handles the USB stack, but also USB Mass Storage and FAT32 file system. This makes it very, very easy to use the interface with an USB stick or hard drive and access files on the FAT32 partition directly, without using a lot of CPU power or memory on the CPC.
The wiring is fairly simple. I used a module with a WCH376 on it for my prototype (from LC Technology). This means the interface consists only of 3 extra chips for address decoding
From the CPC bus: A15-A0, D7-D0, /IORQ, /RD, /WR are used (and of course GND and +5v)
No schematics yet, instead here is a description of the wiring:
That was not so hard! With this wiring scheme, the WCH command/status port is &FE81. The data port is &FE80.
Note that the Y3 output of IC3 decodes FE82-FE87. This may be useful to plug another device to these addresses.
The software is not written yet! But you can make sure your device is working.
10 ?hex$(inp(&FE81)) ' Status byte = 80 - Device is idle 20 out &FE81,1 : ?hex$(inp(&FE80)) ' Get chip version - 44 for mine (starts from 40) 30 out &FE81,6 : out &FE80,&55 : ?hex$(inp(&FE80)) ' Prints AA - bit-reverse of the input
The CH376 datasheets lists all the commands, and it should not be a problem to write a complete driver.