Skip to content

Commit 3e3f4db

Browse files
committed
Revision of documentation protocol file
1 parent 41ed632 commit 3e3f4db

File tree

1 file changed

+79
-32
lines changed

1 file changed

+79
-32
lines changed

Protocol.md

+79-32
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ received the request but this request is not supported by this expansion.
8383

8484
The following describes each message and the related answer
8585

86-
### RESET EXPANSION I2C ADDRESS
86+
### RESET EXPANSION I2C ADDRESS (+)
8787

8888
Apply to: All expansion types
8989

@@ -102,7 +102,7 @@ initialized if the DETECT IN, DETECT OUT pins are in the correct state)
102102
- Expansion answer
103103
No answer expected
104104

105-
### SET I2C ADDRESS
105+
### SET I2C ADDRESS (+)
106106

107107
Apply to: All expansion types
108108

@@ -120,7 +120,7 @@ one specified in the payload.
120120
- Expansion answer
121121
No answer expected
122122

123-
### GET I2C ADDRESS AND TYPE
123+
### GET I2C ADDRESS AND TYPE (+)
124124

125125
Apply to: All expansion types
126126

@@ -148,9 +148,9 @@ Opta Digital Invalid -> 0x01
148148
Opta Digital Mechanical -> 0x02
149149
Opta Digital State Solid -> 0x03
150150
Opta Analog -> 0x04
151-
UNO R4 MINIMA -> 0x05
151+
Custom expansion get a dynamic expansion type See AboutCustomExpansionType.md
152152

153-
### GET DIGITAL VALUES
153+
### GET DIGITAL VALUES (+)
154154

155155
Apply to: Opta Digital
156156

@@ -176,7 +176,7 @@ inputs.
176176
Note: the status of digital inputs is a bit mask word (2 bytes): each bit of
177177
the word represent the status of digital input (1 means HIGH, 0 means LOW).
178178

179-
### GET ANALOG VALUES
179+
### GET ANALOG VALUES (+)
180180

181181
Apply to: Opta Digital
182182

@@ -202,7 +202,7 @@ pin received as argument (the analog value is the raw analog value in bits).
202202

203203
Note: the analog value is a WORD (2 bytes) - first is sent the LSB then the MSB.
204204

205-
### GET ANALOG ALL VALUES
205+
### GET ANALOG ALL VALUES (+)
206206

207207
Apply to: Opta Digital
208208

@@ -228,7 +228,7 @@ its PINs.
228228
Note: the payload is array of 16 words (LSB first) each value represent the
229229
analog value of the corresponding PIN.
230230

231-
### SET DIGITAL OUTPUTS
231+
### SET DIGITAL OUTPUTS (+)
232232

233233
Apply to: Opta Digital
234234

@@ -258,7 +258,7 @@ Note (2): the Expansion answer is requested in order to ensure that the message
258258
is properly received (CRC is OK), if the message answer is not received the
259259
Controller will trigger the related callback function (if set).
260260

261-
### SET DEFAULT OUTPUT VALUES AND TIMEOUT
261+
### SET DEFAULT OUTPUT VALUES AND TIMEOUT (+)
262262

263263
Apply to: Opta Digital
264264

@@ -296,7 +296,7 @@ Note (3): the Expansion answer is requested in order to ensure that the message
296296
is properly received (CRC is OK), if the message answer is not received the
297297
Controller will trigger the related callback function (if set).
298298

299-
### CONFIGURE OPTA ANALOG CHANNEL AS ADC
299+
### CONFIGURE OPTA ANALOG CHANNEL AS ADC (+)
300300

301301
Apply to: Opta Analog
302302

@@ -324,7 +324,7 @@ Configure an Opta Analog channel as ADC
324324
- Payload: no payload
325325
- CRC
326326

327-
### GET OPTA ANALOG ADC VALUE (adc bit 0-65535)
327+
### GET OPTA ANALOG ADC VALUE (adc bit 0-65535) (+)
328328

329329
Apply to: Opta Analog
330330

@@ -348,7 +348,7 @@ Configure an Opta Analog channel as ADC
348348
-> the analog value of the channe (2 byte) - LSB first
349349
- CRC
350350

351-
### GET OPTA ANALOG ALL ADC VALUE (adc bit 0-65535) AT ONCE
351+
### GET OPTA ANALOG ALL ADC VALUE (adc bit 0-65535) AT ONCE (+)
352352

353353
Apply to: Opta Analog
354354

@@ -370,7 +370,7 @@ Configure an Opta Analog channel as ADC
370370
-> 16 bytes (2 for each channel) - LSB first
371371
- CRC
372372

373-
### CONFIGURE OPTA ANALOG CHANNEL AS DAC
373+
### CONFIGURE OPTA ANALOG CHANNEL AS DAC (+)
374374

375375
Apply to: Opta Analog
376376

@@ -396,7 +396,7 @@ Configure an Opta Analog channel as DAC
396396
- Payload: no payload
397397
- CRC
398398

399-
### SET OPTA ANALOG DAC CHANNEL VALUE (0 - 8191)
399+
### SET OPTA ANALOG DAC CHANNEL VALUE (0 - 8191) (+)
400400

401401
Apply to: Opta Analog
402402

@@ -420,7 +420,30 @@ Set Opta Analog DAC channel value
420420
- Payload: no payload
421421
- CRC
422422

423-
### CONFIGURE OPTA ANALOG CHANNEL AS RTD
423+
### APPLY DAC VALUE TO PHYSICAL OUTPUTs (+)
424+
425+
Apply to: Opta Analog
426+
427+
If set dac message above is used with UPDATE DAC immediately equal to 0 the
428+
DAC value is not output until this message is received (this can be used to
429+
update DAC synchronously)
430+
431+
- Controller request
432+
- Header:
433+
BP_CMD_SET (0x01)
434+
ARG_OA_SET_ALL_DAC (0x22)
435+
LEN_OA_SET_ALL_DAC (0x00)
436+
- Payload: no payload
437+
- CRC
438+
- Expansion answer (ACK answer):
439+
- Header:
440+
BP_ANS_SET (0x04)
441+
ANS_ARG_OA_ACK (0x20)
442+
ANS_LEN_OA_ACK (0)
443+
- Payload: no payload
444+
- CRC
445+
446+
### CONFIGURE OPTA ANALOG CHANNEL AS RTD (+)
424447

425448
Apply to: Opta Analog
426449

@@ -430,7 +453,7 @@ Configure an Opta Analog channel as RTD
430453
- Header:
431454
BP_CMD_SET (0x01)
432455
ARG_OA_CH_RTD (0x0E)
433-
LEN_OA_CH_RTD (0x07)
456+
LEN_OA_CH_RTD (0x06)
434457
- Payload:
435458
-> channel (1 byte) from 0 to 7
436459
-> use 3 wire (1 byte) (1 Enable, 2 Disable)
@@ -444,7 +467,7 @@ Configure an Opta Analog channel as RTD
444467
- Payload: no payload
445468
- CRC
446469

447-
### GET OPTA ANALOG RTD CHANNEL VALUE (Ohm)
470+
### GET OPTA ANALOG RTD CHANNEL VALUE (Ohm) (+)
448471

449472
Apply to: Opta Analog
450473

@@ -468,7 +491,7 @@ Get Opta Analog RTD channel value
468491
-> value 4 bytes as float
469492
- CRC
470493

471-
### CONFIGURE OPTA ANALOG RTD UPDATE TIME
494+
### CONFIGURE OPTA ANALOG RTD UPDATE TIME (+)
472495

473496
Apply to: Opta Analog
474497

@@ -479,7 +502,7 @@ Take into account that 3 wire RTD takes around 800 ms per channel.
479502
- Header:
480503
BP_CMD_SET (0x01)
481504
ARG_OA_SET_RTD_UPDATE_TIME (0x10)
482-
LEN_OA_SET_RTD_UPDATE_TIME (0x03)
505+
LEN_OA_SET_RTD_UPDATE_TIME (0x02)
483506
- Payload:
484507
-> update time (ms) - 2 bytes - LSB first
485508
- CRC
@@ -491,7 +514,7 @@ Take into account that 3 wire RTD takes around 800 ms per channel.
491514
- Payload: no payload
492515
- CRC
493516

494-
### CONFIGURE OPTA ANALOG CHANNEL AS DIGITAL INPUT
517+
### CONFIGURE OPTA ANALOG CHANNEL AS DIGITAL INPUT (+)
495518

496519
Apply to: Opta Analog
497520

@@ -522,7 +545,7 @@ Configure an Opta Analog channel as Digital Input
522545
- Payload: no payload
523546
- CRC
524547

525-
### GET OPTA ANALOG DIGITAL INPUT STATUS
548+
### GET OPTA ANALOG DIGITAL INPUT STATUS (+)
526549

527550
Apply to: Opta Analog
528551

@@ -544,7 +567,30 @@ Get Opta Analog DIGITAL INPUT status
544567
-> all DI status (1 byte) as bit mask
545568
- CRC
546569

547-
### SET OPTA ANALOG PWM
570+
### CONFIGURE OPTA ANALOG CHANNEL AS HIGH IMPEDANCE (+)
571+
572+
Apply to: Opta Analog
573+
574+
Configure an Opta Analog channel as High Impedance
575+
576+
- Controller request
577+
- Header:
578+
BP_CMD_SET (0x01)
579+
ARG_OA_CH_DI (0x24)
580+
LEN_OA_CH_DI (0x01)
581+
- Payload:
582+
-> channel (1 byte) from 0 to 7
583+
- CRC
584+
- Expansion answer (ACK answer):
585+
- Header:
586+
BP_ANS_SET (0x04)
587+
ANS_ARG_OA_ACK (0x20)
588+
ANS_LEN_OA_ACK (0)
589+
- Payload: no payload
590+
- CRC
591+
592+
593+
### SET OPTA ANALOG PWM (+)
548594

549595
Apply to: Opta Analog
550596

@@ -568,7 +614,7 @@ Set Opta digital PWM channel values
568614
- Payload: no payload
569615
- CRC
570616

571-
### SET OPTA ANALOG LED
617+
### SET OPTA ANALOG LED (+)
572618

573619
Apply to: Opta Analog
574620

@@ -590,7 +636,7 @@ Set Opta digital PWM channel values
590636
- Payload: no payload
591637
- CRC
592638

593-
### GET FW VERSION
639+
### GET FW VERSION (+)
594640

595641
Apply to: All expansion types
596642

@@ -614,7 +660,7 @@ Get FW version in the form MAJOR.MINOR.RELEASE
614660
-> release (1 byte)
615661
- CRC
616662

617-
### REBOOT expansion
663+
### REBOOT expansion (+)
618664

619665
Apply to: All expansion types
620666

@@ -638,7 +684,7 @@ Put expansion in Boot Loader Mode
638684
-> reboot confirmation code (1 byte) - value ANS_REBOOT_CODE (0x74)
639685
- CRC
640686

641-
### SAVE information in FLASH memory
687+
### SAVE information in FLASH memory (+)
642688

643689
Apply to: All expansion types
644690

@@ -657,7 +703,7 @@ Save up to 32 bytes in the Data Flash of the device
657703
- CRC
658704
- Expansion answer: None
659705

660-
### READ information from flash
706+
### READ information from flash (+)
661707

662708
Apply to: All expansion types
663709

@@ -685,7 +731,7 @@ Read up to 32 byte from the data flash of the device
685731
- CRC
686732

687733

688-
### SET TIMEOUT TIME TO FORCE DEFAULT VALUES
734+
### SET TIMEOUT TIME TO FORCE DEFAULT VALUES (+)
689735

690736
Apply to: Opta Analog
691737

@@ -711,7 +757,7 @@ to the values set by the messages ARG_OA_SET_DAC_DEFAULT or ARD_OA_SET_DEFAULT_P
711757
- CRC
712758

713759

714-
### SET OPTA ANALOG DAC CHANNEL VALUE (0 - 8191) AFTER COMMUNICATION TIMEOUT
760+
### SET OPTA ANALOG DAC CHANNEL VALUE (0 - 8191) AFTER COMMUNICATION TIMEOUT (+)
715761

716762
Apply to: Opta Analog
717763

@@ -722,10 +768,11 @@ channel when a timeout in the communication wiht the controller occurs
722768
- Header:
723769
BP_CMD_SET (0x01)
724770
ARG_OA_SET_DAC_DEFAULT (0x3D)
725-
LEN_OA_SET_DAC (0x03)
771+
LEN_OA_SET_DAC (0x04)
726772
- Payload:
727773
-> channel (1 byte) from 0 to 7
728774
-> DAC value (2 bytes) (0 - 8191) - LSB first
775+
-> UPDATE DAC immediately (1 byte) - not used
729776
- CRC
730777
- Expansion answer (ACK answer):
731778
- Header:
@@ -735,7 +782,7 @@ channel when a timeout in the communication wiht the controller occurs
735782
- Payload: no payload
736783
- CRC
737784

738-
### SET OPTA ANALOG PWM
785+
### SET OPTA ANALOG PWM (+)
739786

740787
Apply to: Opta Analog
741788

@@ -759,7 +806,7 @@ Set Opta digital PWM channel values
759806
- Payload: no payload
760807
- CRC
761808

762-
### GET CHANNEL CONFIGURATION
809+
### GET CHANNEL CONFIGURATION (+)
763810

764811
Apply to: Opta Analog
765812

0 commit comments

Comments
 (0)