Git Product home page Git Product logo

digital-clock's Introduction

Digital Clock

Digital clock project for microcontroller course written in Atmel Studio. You can simulate it using the Proteus project file, or you can program it on an ATmega on board.

Requirements

  • ATmega88 or any other ATmega microcontroller with at least 8Kb program memory
  • DS1307 Real Time Clock (with optional 3V lithium coin cell battery)
  • 32.768KHz clock crystal
  • SSD1306 0.96" 128x64 OLED graphic display (I2C protocol)
  • Passive buzzer module
  • 6x push buttons for navigation and reset
  • 4x 2N2007 or N-channel MOSFET capable of at least 120mA of drain current
  • 4-digit 7-segment
  • Some resistors and capacitors
  • BMP180 pressure and temperature sensor *optional (TODO)
  • Photocell or photodiode for ambient light sensor *optional (TODO)
  • Micro USB port *optional
  • On-off switch *optional

Some codes are different for simulation and real hardware to increase Proteus simulation speed. For this the SIMULATION preprocessor flag is defined. Disable the SIMULATION flag before compiling for real hardware. Also the MCU clock needs to be 8MHz for the code to function properly.

Circuit

Circuit schematic is shown below:

Schematic

Some pictures of working hardware:

Side view

Top view

Simulation

This project can be simulated using the Proteus simulation file. An image of the simulation is shown below.

*note: This file is different from the schematic file; It just works in simulation.

Simulation in Proteus

To-do List

  • Make it work for frequencies other than 8MHz (attach a 20MHz crystal)
  • Automatically change display and 7-segment brightness depending on ambient light level using a photodiode.
  • Show pressure and temperature on the display
  • Double-width font
  • Additional settings menu

digital-clock's People

Contributors

bhnum avatar

Stargazers

 avatar hamed saadati avatar

Watchers

 avatar Fozlea Rabbi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.