I2C Protocol Implementation With RTC And EEPROM

     The main aim of the project is to implement the I2C protocol by interfacing RTC and EEPROM using controller (ATmega8535).


Introduction

    Inter integrate circuit, or "I2C" is a serial bus/protocol that's widely used to interface hosts with such as EEPROM memory, Additionally, I2C is widely used in embedded devices to communicate with real time clocks and with transmitters to link LCD monitor to a host and soon the systems management bus (SMS bus) is a subset of I2C.

    The DS1307 Serial Real Time Clock, Which incoporates a 2-wire serial interface (I2C Protocol),
can be controlled using a PIC microcontroller. The DS1307 Serial Real Time Clock is a low power, full BCD clock/calender plus 56 byte of non-volatile SRAM. Address and data are transferred serially via the 2-wire bidirectional bus. The DS1307 has a built-in power sense circuit which detects power failures and automatically switches to battery supply.

      An I2C bus master may communicate with the several slave devices using only two wires. The master initiates all communication on the I2C bus and supplies the clock for all Slave devices. The I2C User Module supports speed up to 100 Kbits/s. By using single master we can connect up 256 devices (which support I2C protocol) using same two wires.

      In this project the ATmega8535 is low-power CMOS 8-bit microcontroller based on the AVR enhanced RISC architecture. By executive instructions in a single clock cycle, the ATmega8535 achieves throughputs approaching MIPS per MHz allowing the system designer to optimize power consumption versus processing speed.


The ATmega8535 provides the following features:

  • 8K bytes of In-System Programmable Flash with Read-While-Write capabilities.
  • 512 bytes EEPROM
  • 512 bytes SRAM
  • 32 General Purpose I/O lines
  • 32 general purpose working registers
  • Three flexible Timer/Counters with compare modes
  • Internal and external interrupts
  • A serial programmable USART
  • A byte Oriented Two-wire Serial Interface
  • An 8-channel
  • 10-bit ADC with optional differential input stages with programmable gain in TQFP package
  • A programmable Watchdog Timer with Internal Oscillator
  • An SPI serial port
  • Six software selecting power saving modes
The Idle mode stops the CPU while allowing the SRAM, Timer/Counters, SPI port, and Interrupt System to continue functioning.

   The application of RTC is it is a portable system such as a data collection terminal, Smart card reader and data logger to keep track of the day time. The application cde will be developed in C programming language. AVR studio 4 simulator and AVR ISP programmer is used to convert the hex file of this C program.

    An EEPROM is kinds of non-volatile memory that means it is used for storing digital data permanently without any power supply. EEPROM stands for Electrically Erasable Programmable Read Only Memory. The advantage of these kinds of ROMs is this they can be erased electrically to make them ready for storing new data. Compare this with a CD R disks they can be recorded only once. A small amount of EEPROM is also available internally on the AVR chips. So if the volume of data you want to store is small ( say few user names and password) then you can use it. The internal EEPROM makes design small and simple.


APPLICATION

Controlling the real time clock and changing the time in DS1307 IC.

TOOLS USED

Software-

Embedded C.

Hardware-

ATmega8535 microcontroller
DS1307 Real time clock IC
20X4 LCD MODULE
EEPROM

OBJECTIVES

To prepare a general purpose ATmega8535 board.
To interface the DS1307 hardware Module.
Writing C code.



No comments:

Post a Comment