Last modified by Xiaoling on 2025/06/12 15:06

From version 104.1
edited by Bei Jinggeng
on 2024/12/04 14:09
Change comment: There is no comment for this version
To version 109.1
edited by Mengting Qiu
on 2025/03/28 17:53
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Bei
1 +XWiki.ting
Content
... ... @@ -1104,19 +1104,23 @@
1104 1104  === 3.3.3 Set Interrupt Mode ===
1105 1105  
1106 1106  
1107 -Feature, Set Interrupt mode for PB14, PB15, PA4.
1107 +==== 3.3.3.1 Before V1.3.4 firmware ====
1108 1108  
1109 +(% style="color:red" %)**Note: Before V1.3.4 firmware, the interrupt function of PA8,PA4,PB15 had only one parameter to set, which was used to set the interrupt trigger mode.**
1110 +
1111 +Feature, Set Interrupt mode for PA8, PA4, PB15.
1112 +
1109 1109  Before using the interrupt function of the **INT** pin, users can set the interrupt triggering mode as required.
1110 1110  
1111 -(% style="color:#037691" %)**AT Command:**(% style="color:blue" %)** **(% style="color:#4472c4" %)**AT+INTMODx**
1115 +(% style="color:#037691" %)**AT Command:**(% style="color:blue" %)** **(% style="color:#4472c4" %)**AT+INTMODx=a**
1112 1112  
1113 1113  (% style="color:#4472c4" %)**AT+INTMODx:**
1114 1114  
1115 -* (% style="color:#4472c4" %)**AT+INTMOD1   **(%%)~/~/ Set the interrupt mode for (% style="background-color:yellow" %)** PB14**(%%) pin.
1116 -* (% style="color:#4472c4" %)**AT+INTMOD2   **(%%)~/~/ Set the interrupt mode for (% style="background-color:yellow" %)** PB15**(%%) pin.
1117 -* (% style="color:#4472c4" %)**AT+INTMOD3   **(%%)~/~/ Set the interrupt mode for (% style="background-color:yellow" %)** PA4**(%%) pin.
1119 +* (% style="color:#4472c4" %)**AT+INTMOD1   **(%%)~/~/ Set the interrupt mode for (% style="background-color:yellow" %)** PA8**(%%) pin.
1120 +* (% style="color:#4472c4" %)**AT+INTMOD2   **(%%)~/~/ Set the interrupt mode for (% style="background-color:yellow" %)** PA4**(%%) pin.
1121 +* (% style="color:#4472c4" %)**AT+INTMOD3   **(%%)~/~/ Set the interrupt mode for (% style="background-color:yellow" %)** PB15**(%%) pin.
1118 1118  
1119 -**Parameter setting:**
1123 +**Parameter a setting:**
1120 1120  
1121 1121  * **0:** Disable Interrupt
1122 1122  * **1:** Trigger by rising and falling edge
... ... @@ -1125,15 +1125,15 @@
1125 1125  
1126 1126  **Example:**
1127 1127  
1128 -* AT+INTMOD1=0  ~/~/Disable the PB14 pin interrupt function
1129 -* AT+INTMOD2=2  ~/~/Set the interrupt of the PB15 pin to be triggered by the falling edge
1130 -* AT+INTMOD3=3  ~/~/Set the interrupt of the PA4 pin to be triggered by the rising edge
1132 +* AT+INTMOD1=0  ~/~/Disable the PA8 pin interrupt function
1133 +* AT+INTMOD2=2  ~/~/Set the interrupt of the PA4 pin to be triggered by the falling edge
1134 +* AT+INTMOD3=3  ~/~/Set the interrupt of the PB15 pin to be triggered by the rising edge
1131 1131  
1132 1132  (% style="color:#037691" %)**Downlink Command:**(% style="color:blue" %)** **(% style="color:#4472c4" %)**0x06 00 aa bb**
1133 1133  
1134 -Format: Command Code (0x06) followed by 3 bytes.
1138 +Format: Command Code (0x06 00) followed by 2 bytes.
1135 1135  
1136 -(% style="color:#4472c4" %)**aa:**(%%) Set the corresponding pin. ((% style="background-color:yellow" %)**00**(%%): PB14 Pin;  (% style="background-color:yellow" %)**01**(%%)**: **PB15 Pin;  (% style="background-color:yellow" %)**02**(%%): PA4 Pin.)
1140 +(% style="color:#4472c4" %)**aa:**(%%) Set the corresponding pin. ((% style="background-color:yellow" %)**00**(%%): PA8 Pin;  (% style="background-color:yellow" %)**01**(%%)**: **PA4 Pin;  (% style="background-color:yellow" %)**02**(%%): PB15 Pin.)
1137 1137  
1138 1138  (% style="color:#4472c4" %)**bb: **(%%)Set interrupt mode. ((% style="background-color:yellow" %)**00**(%%) Disable, (% style="background-color:yellow" %)**01**(%%) falling or rising, (% style="background-color:yellow" %)**02**(%%) falling, (% style="background-color:yellow" %)**03**(%%) rising)
1139 1139  
... ... @@ -1143,7 +1143,66 @@
1143 1143  * Downlink Payload: **06 00 01 02     **~/~/ Equal to AT+INTMOD2=2
1144 1144  * Downlink Payload: **06 00 02 03     **~/~/ Equal to AT+INTMOD3=3
1145 1145  
1150 +==== 3.3.3.2 Since V1.3.4 firmware ====
1146 1146  
1152 +(% style="color:red" %)**Note: Since V1.3.4 firmware, the Interrupt function has added a new parameter to set the delay time, i.e. the state hold time.**
1153 +
1154 +(% style="color:#037691" %)**AT Command:**(% style="color:blue" %)** **(% style="color:#4472c4" %)**AT+INTMODx=a,b**
1155 +
1156 +(% border="1" cellspacing="4" style="background-color:#f2f2f2; width:420px" %)
1157 +|=(% style="width: 116px; background-color: rgb(79, 129, 189); color: white;" %)**Parameter **|=(% style="width: 392px; background-color: rgb(79, 129, 189); color: white;" %)**Values and functions**
1158 +|(% style="width:116px" %)(((
1159 +
1160 +
1161 +**x**
1162 +)))|(% style="width:392px" %)(((
1163 +1: Set the interrupt mode for (% style="background-color:yellow" %)** PA8**(%%) pin.
1164 +
1165 +2:  Set the interrupt mode for (% style="background-color:yellow" %)** PA4**(%%) pin.
1166 +
1167 +3: Set the interrupt mode for (% style="background-color:yellow" %)** PB15**(%%) pin.
1168 +)))
1169 +|(% style="width:116px" %)(((
1170 +
1171 +
1172 +**a**
1173 +)))|(% style="width:392px" %)(((
1174 +**0:** Disable Interrupt
1175 +
1176 +**1:** Trigger by rising and falling edge
1177 +
1178 +**2:** Trigger by falling edge
1179 +
1180 +**3: **Trigger by rising edge
1181 +)))
1182 +|(% style="width:116px" %)**b**|(% style="width:392px" %)(((
1183 +Set the delay time. (Default: 0)
1184 +
1185 +**Value range: 0~~65535 ms**
1186 +)))
1187 +
1188 +**Example:**
1189 +
1190 +* AT+INTMOD1=0,0  ~/~/Disable the PA8 pin interrupt function
1191 +* AT+INTMOD2=2,1000  ~/~/Set the interrupt of the PA4 pin to be triggered by the falling edge, however, the interrupt will only be triggered if the low level state remains 1000ms
1192 +* AT+INTMOD3=3,2500  ~/~/Set the interrupt of the PB15 pin to be triggered by the rising edge, however, the interrupt will only be triggered if the high level state remains 2500ms
1193 +
1194 +(% style="color:#037691" %)**Downlink Command:**(% style="color:blue" %)** **(% style="color:#4472c4" %)**0x06 00 aa bb cc**
1195 +
1196 +Format: Command Code (0x06 00) followed by 4 bytes.
1197 +
1198 +(% style="color:#4472c4" %)**aa:**(%%) **1 byte**, set the corresponding pin. ((% style="background-color:yellow" %)**00**(%%): PA8 Pin;  (% style="background-color:yellow" %)**01**(%%)**: **PA4 Pin;  (% style="background-color:yellow" %)**02**(%%): PB15 Pin.)
1199 +
1200 +(% style="color:#4472c4" %)**bb: **(%%)**1 byte**, set interrupt mode. ((% style="background-color:yellow" %)**00**(%%) Disable, (% style="background-color:yellow" %)**01**(%%) falling or rising, (% style="background-color:yellow" %)**02**(%%) falling, (% style="background-color:yellow" %)**03**(%%) rising)
1201 +
1202 +(% style="color:#4472c4" %)**cc: **(%%)**2 bytes**, Set the delay time. (0x00~~0xFFFF)
1203 +
1204 +**Example:**
1205 +
1206 +* Downlink Payload: **06 00 00 01 00 00     **~/~/ Equal to AT+INTMOD1=1,0
1207 +* Downlink Payload: **06 00 01 02 0B B8     **~/~/ Equal to AT+INTMOD2=2,3000
1208 +* Downlink Payload: **06 00 02 03 03 E8   **~/~/ Equal to AT+INTMOD3=3,1000
1209 +
1147 1147  === 3.3.4 Set Power Output Duration ===
1148 1148  
1149 1149  
... ... @@ -1319,6 +1319,8 @@
1319 1319  )))
1320 1320  |(% style="width:242px" %)(((
1321 1321  b: Output frequency (unit: HZ)
1385 +
1386 +range 5~~100000HZ
1322 1322  )))
1323 1323  |(% style="width:242px" %)(((
1324 1324  c: Output duty cycle (unit: %)
... ... @@ -1325,15 +1325,17 @@
1325 1325  The value ranges from 0 to 100.
1326 1326  )))
1327 1327  
1328 -(% style="color:blue" %)**Downlink Command: 0x0B01**
1393 +(% style="color:blue" %)**Downlink Command: 0x0B**
1329 1329  
1330 -Format: Command Code (0x0B01) followed by 6 bytes.
1395 +Format: Command Code (0x0B) followed by 6 bytes.
1331 1331  
1332 -Downlink payload:0B01 bb cc aa **~-~--> **AT+PWMOUT=a,b,c
1397 +0B + Output frequency (3bytes)+ Output duty cycle (1bytes)+Output time (2bytes)
1333 1333  
1334 -* Example 1: Downlink Payload: 0B01 03E8 0032 0005 **~-~-->**  AT+PWMOUT=5,1000,50
1335 -* Example 2: Downlink Payload: 0B01 07D0 003C 000A **~-~-->**  AT+PWMOUT=10,2000,60
1399 +Downlink payload:0B bb cc aa **~-~--> **AT+PWMOUT=a,b,c
1336 1336  
1401 +* Example 1: Downlink Payload: 0B 0003E8 32 0005 **~-~-->**  AT+PWMOUT=5,1000,50
1402 +* Example 2: Downlink Payload: 0B 0007D0 3C 000A **~-~-->**  AT+PWMOUT=10,2000,60
1403 +
1337 1337  = 4. Battery & Power Cons =
1338 1338  
1339 1339