![]() View Lori Bascom-Ramirez’s profile on LinkedIn, the world's largest professional community. Lori has 1 job listed on their profile. See the complete profile on LinkedIn and discover Lori’s connections and jobs at similar companies. ![]() Ds1307 Bascom Program Examples Blog Entry Transforming your AVR Microcontroller to the I2C or TWI Slave I/O Expander Project September 27, 2009 by rwb, under Microcontroller. The I2C bus (read as I. TM1637 is a chip for driving 7-segment displays. '----------------------------------------------- 1.Edit “Sub Ds1307_config()”:For ex) ' Soft_I2C config pins--------------------------- Sub Ds1307_config() 'Config ds1307 Waitms 50 Dim A As Byte Dim B As Byte Config Scl = Portc.5 'set scl_i2c pin Config Sda = Portc.4 'set sda_i2c pin 'set i2c speed 100khz Config I2cdelay = 10 End Sub ' ------------------------------------------------ 2. Call Ds1307_config() 3. If is first Run ds1307 then call Ds1307_play() 4.Enjoy! Building our own digital clock is one of the dreamed project by most of the hobbyist or anyone that want to learn or involve seriously in the embedded system world; the ability to integrate time, day and date to the embedded system is one of the important knowledge that should be known by any embedded system designer.. Todays technology makes life easier as all these capabilities has already built nicely inside the Maxim (Dallas) DS1307 Real Time Clock (RTC) chip. For more information please visit. 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. 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. 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. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2019
Categories |