2 ==========================================================
4 * PC is the host (always)
6 * 6 images MAXIMUM on the camera, 128k of memory
8 * Camera has an image counter that designates current image to do something with.
9 (yes, there is better wording, but hey... :)
11 * ACK = 0x06, NAK = 0x15
12 - No ack/nak means bad connection/faulty cable/no camera
14 * Camera always answers ACK to sent command
16 * Most COMMAND's have a matching RESPONSE
18 * Command Packet structure is:
19 [0x02] [COMMAND] [DATA] [DATA] [...] [0x03]
21 * Response Packet structure is:
22 [0x02] [RESPONSE] [DATA] [DATA] [...] [0x03]
24 * Image transfer Packet Structure is:
25 [0x02] [RESPONSE] [N1] [N2] [N3] [N4] [DATA] [DATA] [...] [0x03]
27 N1 = number of columns in the image
28 N2 = number of black lines
29 N3 = number of visible lines
30 N4 = number of status bytes
32 Number of data bytes = N1 * (N2 + N3) + N4
34 * Firmware version transfer Packet Structure is:
35 [0x02] [RESPONSE] [SIZE] [CHAR] [CHAR] [...] [NULL] [0x03]
38 [0x02] [RESPONSE] [0] [0x03]
40 * Camera sends response packets to host after it sends ACK.
41 (NAK gets no response of course)
43 - Command/Response codes
44 (note: COMMAND is upper case, RESPONSE is lower case of same letter)
46 CMD CMD DATA BYTES RESP DATA BYTES Description
47 --- ----------------------- --------------------- -----------------------
48 A 1 (index #) 1 (0) move to image index #
49 B 2 (duration, num times) 1 (0) beep (duration*50ms)
50 E 1 (test char) 1 (test char) echo (test or wake up camera)
51 G 1 (delay & retry flags) 1 (0, use grab image grab image - increments counter,
52 result for error lower nibble = self timer delay,
53 upper nibble = retry numbers
55 I 1 (0) 1 (image index) get image counter
56 (use reset first to get # pics)
57 J 2 (value: LSB, MSB) 2 (error, value) increment counter
58 (0 lets current ram be read)
59 K 1 (value) 1 (error) write rambyte
60 (counter incremented after)
62 M 1 (0) hdr+pixel data+info upload thumbnail (increments
63 image counter & image index)
64 P 1 (new port value) 1 (old port value) set port value
65 Q 1 (video mode) 1 (0) video mode (!!)
66 (requires capture card)
67 R 1 (register index) 1 (register value) read register value
69 T 2 (min, max) 1 (0) set exposure threshold
70 U 1 (0) hdr+pixel data+info upload image
71 V 1 (0) version string get version information
72 W 2 (register index, value) 1 (0 = OK, 0xFF = ERR) write register value
73 X 1 (0) 2 (min, max) get exposure threshold
74 Y 1 (0) 1 (grab result code) get grab result code
77 0x81 = failed exposure
78 Z 1 (0) 1 (0) quit self test
80 * If camera is busy when command is issued, camera responds with a BUSY packet
81 [0x02] [BUSY] [BUSYCODE] [0x03]
85 0x20 BUSY_TIMER camera waiting
86 0x21 BUSY_EXPOSURE waiting for exposure after grab started
87 0x22 BUSY_VIDEO camera in continuous video mode (self test)(yummy!!!!) :)
88 0x23 BUSY_SHUTTER waiting for shutter to come up
89 0x24 BUSY_COMMAND waiting for command completion
90 0x25 BUSY_COUNTER counter being reset (to nonzero value)