root/lang/cplusplus/gainer++/protocol.h

Revision 8184, 2.0 kB (checked in by mootoh, 10 months ago)

lang/cplusplus/gainer++: add protocol sheet.

Line 
1/*
2 * GAINER I/O module command list   
3 * version: 1.0.0.15   
4 * date: 2006.5.27   
5 * original: io-module_protocol.xls
6 *
7 * format:
8 *   command result  comments
9 */
10
11/*
12 * Configuration   
13 */
14
15KONFIGURATION_n KONFIGURATION_n*  n: configuration (1~8)
16
17/*
18 * I/O   
19 */
20Dxxxx Dxxxx*  set all digital outputs, xx: value
21Hn  Hn* set specified digital output high, n: port number
22Ln  Ln* set specified digital output low, n: port number
23R Rxxxx*  get all digital inputs, xx: value
24r rxxxx*rxxxx*…  get all digital inputs (continuous mode), xx: value
25E E*  exit continuous mode
26
27Tx  Tx* set sensitivity for capacitive sensing inputs
28
29Axx…xx A*  set all analog outputs, xx: value
30anxx  anxx* set specified analog output, n: port number, xx: value (00~FF, 8bit)
31anx…x  a*  set specified analog output, n: row number, x: value (0~F, 4bit)
32I Ixx…xx*  get all analog inputs, xx: value
33i ixx…xx*  get all analog inputs (continuous mode), xx: value
34E E*  exit continuous mode
35
36Sx  Sxx*  get specified analog input (continuous mode), xx: value
37E E*  exit continuous mode
38
39Mx  Mx* ain sampling mode, x:mode (0: scan all channles, 1: scan ain 0/4 only)
40
41/*
42 * Button/LED   
43 */
44(button pressed)  N*  the on-board button is pressed (no need to send a get command)
45(button released) F*  the on-board button is released (no need to send a get command)
46h h*  turn the on-board LED on
47l l*  turn the on-board LED off
48
49/*
50 * PGA   
51 */
52Gxy Gxy*  set PGA gain and PGA reference, x: gain, y: reference
53
54/*
55 * Misc.   
56 */
57Q Q*  reboot
58Vx  Vx* verbose mode, x: mode (0: disabled, 1: enabled)
59? ?1.0.0.xx*  version number, xx: build number
60
61/*
62  General Notes   
63  all values are in hex and should be in upper case (e.g. 0A, F8...)   
64
65  Configurations   
66  configuration ain/din/aout/dout comments
67  0  0/ 0/ 0/ 0 initial configuration just after rebooting
68  1  4/ 4/ 4/ 4 default configuration
69  2  8/ 0/ 4/ 4
70  3  4/ 4/ 8/ 0
71  4  8/ 0/ 8/ 0
72  5  0/16/ 0/ 0
73  6  0/ 0/ 0/16
74  7  0/ 8/ 8/ 0 matrix LED control mode
75  8  0/ 8/ 0/ 8 capacitive sensing switch mode (first 4 ports only)
76*/
Note: See TracBrowser for help on using the browser.