Interfacing 12 bit SPI ADC (MCP3204) with AVR Micro
Hello All, Sometimes the Internal ADC is not enough. Like when you need more resolution or high speed. The internal ADC of AVR generally has the following specifications. 15K samples per second 10 bit resolution. If you need more than that you need an external ADC. You may also need external ADCs if you have already used the internal ones. This tutorial will guide you how to install an external ADC with AVR MCU and write a test program to get data from it. A very common external ADC is from Microchip the MCP3204. It has the following configuration. 100K samples per second. (More than 6 times faster than AVRs inbuilt) 12 bit resolution (4 times more detailed) 4 input channels (MCP3208 has 8 channels). SPI Bus Compatible. Basic SPI Tutorial These ADCs are SPI Bus based which is a serial bus. So the number of pins in IC is very low. Total of 4 lines are required to interface it with AVR MCU. MISO (Master In Slave Out) MOSI (Master Out Slave In) SCK (Serial Clock) CS (Chip Select) As you know in synchronous serial communication their is a clock line (SCK in case of SPI) which synchronizes the transfer. Please read the article :- Synchronous Serial Communication Tutorial – The Basics of I2C and SPI. The clock is […]