Note! USB header files for HID descriptors is not included in the package, as it is modified from CCS copyrighted code.
HEX file are available for download below. The debounce is implemented for both press and release of button, as some microswitch types have contact bounce also at release. The debounce algorithm has separate counters for each button, which means that each button reacts immediately to a press or release, independent of other inputs.
The button readout, debounce, shift function, autofire and data transfer takes maximum of 650 μs, so the 1000 Hz constant update rate is reality. The polling interval is 1 ms, which means update rate of 1000 Hz. The aim has been to minimize lag to an absolute minimum. The Eagle 3D rendition of the J-ACE below shows the board with standard USB B connector.įirmware is written with CCS PIC-C compiler. Bulgin Buccaneer series panel mount USB connectors. It is also possible to use a 5-pin header, which is used on some cables or panel mount connectors, e.g. The default is a standard USB-B connector, which suits most needs. For USB connection, there are two alternatives. All connections to joystick, buttons and LEDs have screw terminals for connection. The board uses all through-hole components so it is easy to build for beginners. But I wanted to get the lowest possible lag. In practice that would perhaps not matter much, most HID devices are low speed. Low speed USB supports maximum update rate of 100 Hz. These are however currently limited to low speed USB. I find these implementations quite impressive. There are SW USB implementations for Atmel μC's that don't have any USB HW.
I have aimed to use full speed USB which generally requires hardware USB support from μC. It protects the PIC reset input from spurious glitches, which could cause the USB connection to reset in noisy environment, at least in theory. The pull-up resistor value is not critical, so if you can't find 4k7 network you can use pretty much anything between 1k and 47k. The external pull-ups are provided by resistor network RN1. The PIC has integrated pull-up resistors at port B. The circuit is kept as simple as possible, while trying to provide optimum performance. The hardware is based on PIC18F24K50, a microcontroller with integrated full-speed USB. Windows polls at 1000 Hz, Linux and OSX poll at 500 Hz.
It has cheap and simple hardware which is easy to build yourself. an USB arcade stick or you can use it in a dedicated MAME cabinet.