17.06.2014 Views

Hardware Manual - RTD Embedded Technologies, Inc.

Hardware Manual - RTD Embedded Technologies, Inc.

Hardware Manual - RTD Embedded Technologies, Inc.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Programming Channel, Gain, Input Range, and Type<br />

The conversion channel, gain, input range, and input type are programmed at BA + 0x04h. To program a<br />

conversion channel for direct A/D conversion (not using the channel-gain table), you must first point<br />

BA + 0x04h to write to the channel/gain latch. This is done by setting bits 0 and 1 to "00" in the Control Register<br />

at BA + 0x02h. To program the channel, gain, input range, and input type, assign the appropriate values to bits<br />

0 through 10 and write this value to BA + 0x04h. The diagram below shows this register.<br />

D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0<br />

0 0 0 0 0<br />

A/D SE/DIFF<br />

0 = single-ended<br />

1 = differential<br />

A/D Input Range/<br />

Polarity Select<br />

00 = ±5 V<br />

01 = ±10 V<br />

10 = 0 to +10 V<br />

11 = reserved<br />

Gain Select<br />

000 = x 1<br />

001 = x 2<br />

010 = x 4<br />

011 = x 8<br />

100 = reserved<br />

101 = reserved<br />

110 = reserved<br />

111 = reserved<br />

Analog Input<br />

Channel Select<br />

00000 = channel 1<br />

00001 = channel 2<br />

00010 = channel 3<br />

00011 = channel 4<br />

00100 = channel 5<br />

00101 = channel 6<br />

00110 = channel 7<br />

00111 = channel 8<br />

01000 = channel 9<br />

01001 = channel 10<br />

01010 = channel 11<br />

01011 = channel 12<br />

01100 = channel 13<br />

01101 = channel 14<br />

01110 = channel 15<br />

01111 = channel 16<br />

•<br />

•<br />

•<br />

11111 = channel 32<br />

The program sequence for programming the channel and gain not using the channel-gain scan memory is:<br />

1. Set bits 1 and 0 at BA + 0x02h to 00 (this points BA + 0x04h to the channel/gain latch).<br />

2. Write the channel and gain data to be loaded to BA + 0x04h.<br />

BDM-610010034 Rev C Chapter 5: A/D Conversions 63

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!