Analog inputs

From BitWizard WIKI
Revision as of 09:41, 25 December 2012 by Rew (talk | contribs) (Created page with "= analog inputs = Several boards can be configured to use analog inputs. The registers 0x70-0x78 specify the value for the multiplexer register in the ADC module of the used ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

analog inputs

Several boards can be configured to use analog inputs. The registers 0x70-0x78 specify the value for the multiplexer register in the ADC module of the used chip. The value is not santiy checked. Any value you specify will be used. It is not expected that things will break if you send a value that is not documented here, but why risk it?

reference

The top two bits specify the reference. Possible values are:

0x80: internal 1.1V 0x00: 5V (or 3.3V) powersupply line.

Other values are not applicable (0x40 = use aref pin, which is connected elsewhere on the bitwizard boards, 0xc0 is "reserved").

normal measurements

Normal measurements would return a value of 0 for 0V up to 1023 for the reference value.

value dio pin temp thermo
0x00 6 - -
0x01 4 - -
0x02 3 - -
0x03 1 - -
0x07 0 - -

The values 4, 5 and 6 would measure analog values on the pins required for I2C or SPI communication. Interesting to do once, but not particularly useful. These values are added to the "reference selection" value in the previous section.

Differential measurements

value dio pins temp thermo
0x08 6 - 4 - -
0x0a 6 - 1 - -
0x28 4 - 6 - -
0x0c 4 - 3 - -
0x0e 4 - 1 - -