Micro Technic PV-1800 User Manual

Page 15

Advertising
background image

Users Manual & Installation Guide

PV- 1800: Power supply module with GSM MODEM

Page 15 / 19

REG_ADCLO (base+0Ah): ADC command, status, and result low byte (read/write)

Writing to this register starts a new A/D conversion. You should only do this

when the ADC is idle.

Command bits: 0000

dccc

d: 0:single-ended, 1=differential

ccc: Channel.

d c c c Conversion

0 0 0 0 AIN0 relative to AGND

0 0 0 1 AIN1 relative to AGND

0 0 1 0 AIN2 relative to AGND

0 0 1 1 AIN3 relative to AGND

0 1 0 0 AIN4 relative to AGND

0 1 0 1 AIN5 relative to AGND

0 1 1 0 AIN6 relative to AGND

0 1 1 1 AIN7 relative to AGND

1 0 0 0 Differential AIN0(+) - AIN1(-)

1 0 0 1 Differential AIN1(-) - AIN0(+)

1 0 1 0 Differential AIN2(+) - AIN3(-)

1 0 1 1 Differential AIN3(-) - AIN2(+)

1 1 0 0 Differential AIN4(+) - AIN5(-)

1 1 0 1 Differential AIN5(-) - AIN4(+)

1 1 1 0 Differential AIN6(+) - AIN7(-)

1 1 1 1 Differential AIN7(-) - AIN6(+)

Reading REG_ADCLO returns status and result bits.

Result bits:

rrrr00pb

p: ADC present. If 1, the ADC is available. If 0, the ADC is not mounted, and

you should not write to REG_ADCLO.

b: Busy. 0 = ADC idle. The previous result can be read, and a new conversion can

be started. 1 = conversion in progress. All result bits are invalid when

b=1.

rrrr: Four least-significant bits of the conversion result. Only valid when b=0.

REG_ADCHI (base+0Bh): ADC result, high byte (read only)

Reading this register returns the eight most-significant bits of the conversion

result. Only valid when the ADC is idle.

Advertising