You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> * Now, let $$R$$ be the resolution of the ADC register in digital decimal format (e.g., if 10-bit resolution is selected, then the equivalent decimal is $$(2^0 + 2^1 + 2^2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^7 + 2^8 + 2^9) = 1023$$, and if 8-bit resolution is selected, then the equivalent decimal is $$255$$); with the assertion of the property `R mod 8 == 0` or $$M = \\{m \ is\ the\ modulo\ result\ : m = Resolution_{Assigned} - (n * Resolution_{Base}) \land m = 0 \land Resolution_{Assigned}, n \in N \land Resolution_{Base} \in [8, +\infty[ \land \log_2{Resolution_{Base}} = x \land x \in N\\}$$.
150
+
> * So, both the base resolution (or the default resolution), and the assigned resolution must be a power of 2; and the assigned resolution must be an integer multiple of the base resolution.
151
+
> * Let $$Reg_{UART}$$ be a hardware data register of the UART of $$|Reg_{UART}|$$-bit data register; then the number of frames required for the UART to read the data from an ADC of resolution $$R$$ (aka. the cardinality of the $$F$$) can be calculated by this formula: $$|F| = \lceil{|R| / |Reg_{UART}|}\rceil$$; which given an example of an 8-bit (255) ADC resolution signal needs 1 frame in order to be fully read by an 8-bit UART data register (i.e., $$|F| = \lceil{8/8}\rceil = 1$$); unlike the 10-bit register data, the number of frames required to transfer a data of resolution 1023 or 10-bits will be $$|F| = \lceil{10/8}\rceil = 2$$.
152
+
> * Let $$i$$ be the index of the current frame; such that $$F = \\{f_i: i \in [0, \infty[ \land f_i = \\{Bit_0, Bit_1, Bit_2, Bit_3, Bit_4, Bit_5, Bit_6, Bit_7\\} \land n \in N\\}$$; then to calculate the start index of the new captured frame in a data buffer, it's reasonable to multiply the $$i$$ by the UART data register size in bits, so $$P_f = \\{p_f\ is\ the\ position\ of\ the\ new\ frame: p_f = i * buffer_{data\ register} \land i \in [0, \infty[\\}$$.
153
+
> * Eventually, to place the new frame in its position, construct a left shift bitwise operation (equivalent to $$*2^{p}$$) on the new captured data frame; and add it to the old buffer using the bitwise OR operation.
154
+
>
155
+
```java
156
+
...
157
+
@Override
158
+
publicvoid receive() {
159
+
super.decode(dataRegisterBufferLength -> {
160
+
for (int frame =0; terminalDevice.iread(dataRegisterBufferLength) >0&&
0 commit comments