ADFormat (Deprecated - Do not use)

Syntax:

ADFormat ( Format_Left | Format_Right )

Command Availability:

Available only on Microchip PIC microcontrollers.

Explanation:

ADFormat sets how a 10-bit ADC reading is packed into the two 8-bit result registers on older Microchip PIC chips. Left-justified places the top 8 bits of the result in the high byte and the remaining 2 bits in the low byte; right-justified places the top 2 bits in the high byte and the remaining 8 bits in the low byte. It is supported only on Microchip PIC microcontrollers.

This command predates ReadAD, ReadAD10, and ReadAD12, which handle the register layout and return a single ready-to-use variable automatically. There is no need to call ADFormat in a program that uses those functions, and it is recommended that new programs avoid it.

See Also: