Summation/Shifter Register
12.13 Summation/Shifter Register
The MSC1210 includes a summation/shifter register that facilitates and in- creases the efficiency of certain common summation and shifting/division func- tions, especially those related to ADC conversions. The summation register is only active when the ADC is powered up. It is a
The summation registers may function in one of four distinct modes:
Manual
ADC
Manual
ADC Summation with
The operation of the summation registers is controlled and configured with the SSCON (E1H) SFR. In addition to controlling the four modes of operation, SSCON also is used to control how many samples will be taken from the ADC and by what value the final sum should be divided by, if any.
The individual bits of SSCON have the following functions:
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Reset Value |
|
|
|
|
|
|
|
|
|
|
SFR E1H | SSCON1 | SSCON0 | SCNT2 | SCNT1 | SCNT0 | SHF2 | SHF1 | SHF0 | 00H |
The summation register is powered down when the ADC is powered down. If all zeroes are written to this register, the
SSCON1-0 (bits 7-6)— Summation Shift Control.
Source | SSCON1 | SSCON0 | Mode | |
|
|
|
| |
ADC | 0 | 0 | Values written to the SUM registers are accumu- | |
lated when the SUMR0 value is written. | ||||
|
|
| ||
|
|
|
| |
CPU | 0 | 1 | Summation register enabled. Source is ADC, | |
summation count is working. | ||||
|
|
| ||
|
|
|
| |
|
|
| Shift enabled. Summation register is shifted by | |
ADC | 1 | 0 | SHF Count bits. It takes four system clocks to | |
|
|
| execute. | |
|
|
|
| |
|
|
| Accumulate and shift enabled. Values are accu- | |
CPU | 1 | 1 | mulated for SUM count times and then shifted by | |
|
|
| SHF count. | |
|
|
|
|