HackerPort USB message specification version 0.3 date 2004-05-24 part of the hacker port project - http[s]://1stein.schuermans.info/hackerport/ Copyright (C) 2003-2004 1stein <1stein@schuermans.info> Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html PC -> HackerPort ---------------- commands are sent using messages on bulk output endpoints 1, 2 and 3 the first packet is sent on endpoint 1, the second one on endpoint 2, the third one on endpoint 3, the fourth one on endpoint 1, and so on this enables the PC to send 3 packets until it receives a NAK due to a filled FIFO in the USBN9604 for synchronizing purposes, the first byte in every packet is a sequence number incrementing with each packet multiple command messages may be combined into a single packet of length <= 64 0x00 set output port A 0x01 set output port B 0x02 set output ports A and B 0x04 read input port A 0x05 read input port B 0x06 read input ports A and B 0x08 ... burst output on output port A 0x09 ... burst output on output port B 0x0A ... burst output on output ports A and B 0x0C ... burst output on output port A combined with input on input port A (after each byte is output, a byte is input) 0x0D ... burst output on output port B combined with input on input port B (after each byte is output, a byte is input) 0x0E ... burst output on output ports A and B combined with input on input port A and B (after each byte is output, a byte is input) 0x10 set PWM output A 0x11 set PWM output B 0x12 set PWM outputs A and B 0x13 *TODO* set PWM frequency 0x18 read analog input A 0x19 read analog input B 0x1A read analog input C 0x1B read analog input D 0x1C read analog input E 0x1D read analog inputs A ... E 0xFF read version information HackerPort -> PC ---------------- answers a received using messages on bulk input endpoints 1, 2 and 3 the first packet is sent on endpoint 1, the second one on endpoint 2, the third one on endpoint 3, the fourth one on endpoint 1, and so on this enables the PC to fetch 3 packets until it receives a NAK due to an empty FIFO in the USBN9604 for synchronizing purposes, the first byte in every packet is a sequence number incrementing with each packet multiple answer messages may be combined into a single packet of length <= 64 0x04 input port A read 0x05 input port B read 0x06 input ports A and B read 0x0C ... data read from input port A during burst output/input 0x0D ... data read from input port B during burst output/input 0x0E ... data read from input ports A and B during burst output/input 0x18 analog input A read 0x19 analog input B read 0x1A analog input C read 0x1B analog input D read 0x1C analog input E read 0x1D ... analog inputs A ... E read 0xFF version information read ( specifies the hardware variant of the hacker port: 0x00: original hacker port with PIC18F442 and USBN9604)