can ATmega168 deal with 12-bit input?

I used an ADC MCP3204 and connected the resulting 12 bit digital output to the Arduino Diecimila. Since the Diecimila is using an ATmega168 MCU which is an 8-bit mcu, does that mean my 12 bit input will be truncated to an 8-bit data? OR does the 8-bit only means the logic tree of the mcu is 8-bit?

Thanks.

You would not lose any precision.

Your 12 bit A/D uses SPI communications, meaning the A/D digital value is shifted into the processor one bit at a time through a digital pin. The SPI software routine would would then be responsible for placing the value into a 16 bit integer variable.

When programming in a higher level language, like C, the data width of the underlining hardware processor is mostly transparent to the program.

Lefty

8 bit means the data path through the CPU is 8 bits wide. Operations on data larger than 8 bits require multiple clock cycles to complete.

The MCP320x family work fine with the ATmega - you'll store a 12 bit value in a 16 bit int, which just means the high 4 bits will always be zero.

-j