If a 0 is loaded into bit 4 the conversion takes 156.5 state times. This sets up an 8-bit conversion on channel 0 starting now. Bits 0-2 select the channel for conversion. Bit 4 is used to select between 8 or 10 bit conversions. The last 3 bits 5-7 are reserved and always should be written as 0.
Complete interrupt is enabled.
Bits 0-2 hold the channel number that was used for the conversion. Bit 3 indicates the conversion status. Bits 6 and 7 hold the two least significant bits of a 10 bit conversion. This method gets the job done, but chews up sometimes costly CPU cycles. This method is demonstrated in program listings 1 and 2.