Using a real time clock with a microcontroller


Posted on Feb 5, 2014

This is designed to be used as a programmable LED display for numerous applications. I also wanted to include some additional features so that the display can be used instantly. The display uses a sure 8 x 32 LED dot matrix. This is interfaced to a Xino (or Arduino ). The display works really nicely but I wanted a few more features for this project. So I added 2 x buttons for any user input, a temperature sensor,


Using a real time clock with a microcontroller
Click here to download the full size of the above Circuit.

a buzzer, a wireless link and a real time clock. This is a post about using real time clocks. Real time clocks are designed to very accurately measure time. They use an external oscillator (in this case a watch crystal running at 32. 768kHz). While micro-controllers are very good at performing many functions, unless very careful programming is used then it is difficult to accurately keep track of time. Lots of different commands use varying lengths of time to complete hence using the micro-controller instructions to keep track of time is quite difficult to implement. Certainly it is very difficult with the Arduino, as it is not designed to easily use the interrupts (which is how you can get very accurate timing). It is very easy to add a commercial real time clock chip onto a project and that will ensure very accurate timings are performed. I used the PCF8583 from Dallas Semiconductor. This is a relatively cheap (around £2) real time clock which uses the I2C serial data transfer method. It also has an additional 240 8-bit ram locations, which could be useful. As usual in these interconnected days, some one has already released the code required to easily talk to the PCF8583. It is available here. It was developed by Joe Robertson. To keep the time when switched off, a back-up battery must be used. This can be any battery from 1V to 6V. I used a 3V CR2032 coin cell. You must be careful to ensure that the battery does not...




Leave Comment

characters left:

Related Circuits

  • New Circuits

    .

     


    Popular Circuits

    VFO stabilization with 2N4416
    Speech Recorder (ISD2560)
    Speed alarm
    Wideband Preamp Circuit
    Generators
    generating stripboard layouts
    Headlight Flasher
    TV Remote Control Jammer
    MS51C61 holiday lights ASIC circuit
    Switch control circuit diagram mcu



    Top