Page 86
M4120170509EN
UI Robot Technology Co. Ltd.
UIM24102/04/08-IE
33. SCF
η / SCFxη Set Sensor Configuration
Format:
SCF
; or SCFx
;
Description:
Configure S12CON
、
ATCONH and ATCONL.
1
)
When
is decimal:
Instruction type is SCF
;
Where,
= 0,1 … 1048575 (24 bits unsigned integer)
2
)
When
is hexadecimal:
Instruction is SCFx
;
Where
has 3 bytes, the structure is as follow:
Byte
0
1
2
Defination
D0
D1
IDX
Where,
[D1 D0] compose a hexadecimal 16bit data, D1 is high, D0 is low.
IDX = 0,1,2,3 denotes configuration of S12CON, ATCONH and
ATCONL separately.
Example:
Set S12CON as 0x1234;
Then send instruction SCFx 34 12 00; (00 is suffix)
Each Byte must have an even number of digits or letters.
ACK:
AA 00 C0 [S0] [S1] [S2] [AL0] [AL1] [AH0] [AH1] FF
Comment:
C0
>> The message ID of SCF
;
[S0] ~ [S2]
>> Received data 0 ~ 2
[AL0] ~ [AL1] >> Received data 3 ~ 4
[AH0] ~ [AH1] >> Received data 5 ~ 6
[S0] ~ [S2] is the converted value for [S12CON] (16 bits) (Figure 10-1),
[AL0] [AL1] is the converted value for lower limit of analog threshold
ATCONL (12 bits) (Figure 10-1 )
[AH0] [AH1] is the converted value for upper limit of analog threshold
ATCONH (12 bits) (Figure 10-1 )
Note:
The suffix-code for S12CON is 00 (hexadecimal)
The suffix-code for ATCONH is 02 (hexadecimal)
The suffix-code for ATCONL is 03 (hexadecimal)