Fixed a couple of small bugs, and updated to use an external MCP4822 12-bit DAC

Change-Id: I2258ed540edc090536fe38afd7c82894ed559c79