Content deleted Content added
Em3rgent0rdr (talk | contribs) →Algorithm: Plain english writing for the algorithm, shortening dramatically. Only put the ith iteration's approximation equation on its own line for readability, the other stuff can be written in the paragraph. Remove duplicate wording. |
Em3rgent0rdr (talk | contribs) →Algorithm: calling the signum function as "a" signum function cause isn't exactly defined the same as that wikipedia article on it defines it, and writing its equation with latex formatting on its own indented line for readability. |
||
Line 15:
The successive-approximation register is initialized with 1 in the [[most significant bit]] (MSB) and zeroes in the lower bits. The register's code is fed into the DAC, which provides an analog equivalent of its digital code (initially {{math|1={{sfrac|1|2}}''V''<sub>ref</sub>}}) to the comparator for comparison with the sampled input voltage. If this analog voltage exceeds {{math|''V''<sub>in</sub>}}, then the comparator causes the SAR to reset this bit; otherwise, the bit is left as 1. Then the next bit is set to 1 and the same test is done, continuing this [[Binary search algorithm|binary search]] until every bit in the SAR has been tested. The resulting code is the digital approximated output of the sampled input voltage.
The algorithm's objective for the {{math|''n''<sup>th</sup>}} iteration is to approximately digitize the input voltage to an accuracy of {{frac|1|2<sup>''n''</sup>}} relative to the reference voltage. To show this mathematically, the normalized input voltage is represented as {{math|''x''}} in {{math|[−1, 1]}} by letting {{math|1=''V''<sub>in</sub> = ''xV''<sub>ref</sub>}}. The algorithm starts with an initial approximation of {{math|1=''x''<sub>0</sub> = 0}} and during each iteration {{math|''i''}} produces the following approximation:<blockquote>{{math|''i''<sup>th</sup>}} approximation: {{math|1=''x''<sub>''i''</sub> = ''x''<sub>''i''−1</sub> − {{sfrac|''s''(''x''<sub>''i''−1</sub> − ''x'')|2<sup>''i''</sup>}}}}</blockquote>where
1 1 & \text{ ===Examples===
|