next up previous contents
Next: Digital to Analog Converter Up: Analog to Digital Converter Previous: Digital Control:

Result Registers:

Four 8-bit registers (ADR[4:1]) store conversion results. The conversion complete flag (CCF) indicates when valid data is present in the result registers. The result registers are written during a portion of the system clock cycle when reads do not occur, so there is no conflict.

A/D converter operations are performed in sequences of four conversions each. A conversion sequence can repeat continuously or stop after one iteration. The conversion complete flag (CCF) is set after the fourth conversion in a sequence to show the availability of data in the result registers.

We used multiple channel conversion, continuous scan and the lower four channels since we need 3 sensor values converted in one shot. Since the Vrl was 0V and Vrh was 5V, a 0V input got converted to 0x00 and a 5V input got converted to 0xFF. To change the range of the analog input, we have to scale the input and consequently interpret the digital data accordingly. But since the sensors that we have on the robot arm have a range from 0V to 5V, we can directly connect their output to the A/D input.



Matanya Elchanani
Wed Dec 18 17:00:21 EST 1996