Other Parts Discussed in Thread: TMS570LC4357,
Hi,
In reference to the TRM spruhm8i, table 11-4, just wondering why the formula below uses 4096 instead of 4095, because the resolution is generally calculated with 2^n - 1.
For example, consider a 2 bit ADC, VREFHI = 3V, VREFLO = 0V. Below is the volts calculations. Calculation with 2^n - 1 look more accurate.
| Raw Value | Volts as per TRM (2^n) | Volts with 2^n - 1 |
| 0 | 0/4 X 3 = 0 | 0/3 X 3 = 0 |
| 1 | 1/4 X 3 = 0.75 | 1/3 X 3 = 1 |
| 2 | 2/4 X 3 = 1.50 | 2/3 X 3 = 2 |
| 3 | 3/4 X 3 = 2.25 | 3/3 X 3 = 3 |
Thank you.
Gobind Singh