ADC on Atmega328. Part 1

Microcontrollers are meant to deal with digital information. They only understant ‘0’ and ‘1’ values. So what if we need to get some non digital data in to microcontroller. The only way is to digitize or simply speaking to convert analog in to digital. This is why almost all microcontrollers are featured with ADC module. Atmega328 microcontroller also have 8 (or 6 in PDIP package) ADC input channels. All these can be used to read any analog value that is within reference voltage range. Lets see how this is easy. Continue reading

Interrupt based ADC conversions on Atmega168A

Protostack has expanded his previous AVR ADC tutorial with more advanced version where they use newer Atmega168A microcontroller instead Atmega168. In this tutorial part ADC conversions are performed by using interrupt routines. This technique frees microcontroller from loop checks and gives resources to other tasks like updating LCD, processing information. Continue reading