Real Time Clocks, as the name suggests are clock modules. They are available as integrated circuits (ICs) and manages timing like a clock. Some RTC ICs also manages date like a calendar.


This option will bring up the selected programmer or will program the chip directly if. Here you find a pdf file showing STK200 schematics. See the datetime.bas example that shows how you can use a DS1307 clock chip for the date.

The main advantage is that they have a system of battery backup which keeps the clock/ca lender running even in case of power failure. A very small current is required for keeping the RTC alive.

This in most case is provided by a miniature 3v lithium coin cell. So even if the embedded system with RTC is powered off the RTC module is up and running by the backup cell. This same technique is used in PC timing also. If you have opened your computer case you will notice a small coin cell in the mother board. In this tutorial we will learn to use a very famous RTC IC named. The DS1307 is described in the datasheet as follows The DS1307 is a low-power clock/calendar with 56 bytes of battery-backed SRAM. The clock/calendar provides seconds, minutes, hours, day, date, month, and year information.

Ds1307 bascom programmer resume examples

The date at the end of the month is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The DS1307 operates as a slave device on the I2C bus. So the aim of the project will be to access the DS1307 registers, read time • Access the DS1307 registers i.e.

Read/write data to/from the DS1307 IC • Format the read data and display in LCD • Ability to get time from user and store it to DS1307. This provide means to setup the RTC module with correct time. DS1307 Internal Registers From software point of view the DS1307 is just a collection of some 8 bit registers. You can read these register to obtain the current time and date. Futaba pulscale dro manuals download You can also modify them to hold the correct time. After that the DS1307 keeps then updated with current date and time. The following registers are there.

Fig.: BCD Format in DS1307 Registers. The DS1307.c and DS1307.h provide easy access to the registers. I have provided just two functions that allows you to read and write the DS1307 registers.

/*************************************************** Function To Read Internal Registers of DS1307 --------------------------------------------- address: Address of the register data: value of register is copied to this. Returns: 0= Failure 1= Success ***************************************************/ uint8_t DS1307Read(uint8_t address,uint8_t *data) /*************************************************** Function To Write Internal Registers of DS1307 --------------------------------------------- address: Address of the register data: value to write. Returns: 0= Failure 1= Success ***************************************************/ uint8_t DS1307Write(uint8_t address,uint8_t data) These functions depends on the I2C library. The I2C (Inter IC Communication) is a popular communication protocol between ICs. The DS1307 and our AVR ATmega8 communicates using the I2C bus. I will give more details on I2C in a separate tutorial. A Simple RTC Module The require an, a 3v lithium battery and 2 pull up registers to function.

So I will make a small PCB that will hold all these. The image of module is shown below. The module can be connected to using. Fig.:AVR ATmega8 RTC Interface Circuit Diagram.

Avr-gcc software The full software for the example is written in C language and compiled with avr-gcc. The whole software is very modular.

Following software modules are used. • LCD Interface modules for handling the display device.