lf365 A digital thermometer or talk I2C to your atmel microcontroller


Posted on Feb 7, 2014    10610

The Atmega8 microcontroller from Atmel has plenty of digital and analog input/output lines. It is the ideal device to develop any kind of measurement equipment. A pre-requisite for this article is that you have the GCC AVR programming environment installed as described in my `Programming the AVR microcontroller with GCC, libc 1. 0. 4` article. If y


lf365 A digital thermometer or talk I2C to your atmel microcontroller
Click here to download the full size of the above Circuit.

ou want to avoid troubles with the installation you can of course use the AVR programming CD from When you use such an advanced device as a microcontroller to measure analog or digital signals then you want of course interfaces to evaluate the data or send commands to the microcontroller. In all the articles presented here in the past we always used rs232 communication with the UART that is included in the microcontroller. The problem is that this requires an additional MAX232 chip and 4 extra capacitors. Atmel suggests also that an external crystal osciallator is required for the UART communication to work reliably. In any case it is a lot of extra parts. and we can avoid them! The amount of data to transfer between PC and microcontroller is usually very small (just a few bytes). Speed it therefore no issue at all. This makes the I2C bus/protocol suitable for this task. I2C (prounouce "eye-square-see") is a two-wire bidirectional communication interface. It was invented by Philips and they have protected this name. This is why other manufacturers use a different name for the same protocol. Atmel calls I2C "two wire interface" (TWI). Many of you might already be using I2C on their PCs without knowing it. All modern motherboards have an I2C bus to read temperatures, fan speed, information about available memory. all kind of hardware information. This I2C bus is unfortunately not available on the outside of the PC (there is...




Leave Comment

characters left:

New Circuits

.

 



Top