Jose Pino's projects & tidbits
"Great stuff from someone with an inquisitive mind"

'Almost No Parts' 12/24hrs LED Clock

A 12hr/24hr LED Clock with display control, uses a microcontroller PIC 16F84A or 16F628A and a few parts. (August 25, 2009)


Source: http://www.josepino.com/?anp-1224hr-led-clock1   Tags: microcontroller projects circuits

ANP 16F84A 16F628A microcontroller PIC LED clock with display control This LED clock may not be the easiest to build but surely it is the one with fewer parts that you can find, for that reason I call it "The ANP LED Clock". (ANP stands for Almost No Parts.)

Using the micro controller PIC 16F84A or the 16F628 (same pinout), this clock have more and improved features than my previous LED Clock.
Taken from http://www.josepino.com
Here are the features on this ANP LED Clock:

  • Can use common cathode or common anode 7-segment LED displays.
  • Displays time as 12 hours or 24 hours format.
  • Allows to enable or disable the display for battery-operated circuits.
  • Can control the display brightness to reduce power consumption
  • 7-segment LED displays are charlieplexed to reduce I/O ports usage.
  • PM LED indicator (optional)
  • Only 10 parts needed: 1 PIC 16F84A, 2 22pF Capacitors, 2 n.o. switches, 1 4Mhz Xtal and 4 CA or CC 7segment LED displays.
  • Operates from 2.5 to 5.5 Volts, it can even work with a 3V coin battery

    Because all this features, the applications for this ANP LED Clock could be:

  • Inexpensive LED Clock to replace the expensive broken one from your luxury car.
  • "vintage" LED wristwatch - Using some LED display from old calculators and 3 Volts coin battery, it's possible to build a small clock.
  • Jumbo Clock - Non-inverting buffers can be used to drive more voltage and lit giant 7-segment led displays.
  • Compact clock for your appliances or projects
  • Even more:

  • Desktop Clock as gift for a friend
  • Nice clock to keep your 4-years old niece distracted for a while
  • A piece of trash after your 4-years old niece were playing with the clock.
  • Let's get technical, here is the pin out information for this project:

    JP8410-4 12/24Hrs ANP LED Clock

    Pin 1 to VDD for 12Hrs, VSS for 24Hrs
    Pin 2 to VDD C Anode display, VSS for C Cathode
    Pin 3 to VDD Enable display, VSS disable display
    Pin 4 to VDD Normal operation, VSS Reset
    Pin 5 VSS Ground or -
    Pins 6..13 To multiplexed display
    Pin 14 VDD or +
    Pins 15 & 16 Xtal Oscillator (4Mhz only)
    Pin 17 to Display Decimal Point
    Pin 18 PM LED indicator (optional)

    Configuration examples for JP8410-4 ANP LED Clock

    Here are some examples how configuration pins are wired:

    Figure A: For 12 Hours LED clock using Common Anode 7-segment LED displays.
    Figure B: For 24 Hours LED Clock using Common Cathode 7-segment LED displays.
    Figure C: For 24 Hours LED clock using Common Anode 7-segment LED displays.
    Figure D: For Battery operated clocks, a 10k resistor and a switch can be used to view the time, specially for wrist watches.

    Here is the schematic for the ANP 12/24 Hrs LED Clock:

    ANP 12/24 Hrs LED Clock.

    Please note the PM LED indicator and the Brightness control switch are optional.

    Bill of materials:

    1 PIC 16F84A with JP8410-a software
    1 Xtal 4 Mhz
    2 22pF ceramic capacitors
    2 n.o. micro switches.
    4 7-segment LED displays (CA or CC)

    Optional:

    1 LED for PM indicator
    1 4.7k resistor
    1 n.o. microswitch for brightness control.

    Notes:

    1.- Before applying power to the circuit, set the configuration pins to the one desired. DO NOT APPLY POWER without connecting pins 1, 2 & 3.
    2.- Device configuration: CP Off, WDT Off, PWRTMR ON, OSC Xtal.

    This project may not be suitable for Giant LED Displays because the charlieplexing process

    How it Works:

    The displays are "Charlieplexed" and controlled with modulated pulses, also know as PWM (Pulse width modulation). There are no resistors on most of my projects because I limit the current using the software instead of using resistors. Also, I do use the internal pull-ups from the microcontroller PIC itself. The 1-second routine is similar to the one used by Roman Black but not the same. To keep accuracy, connections to the XTAL and 22pf capacitors must be as short is possible. Read the specifications from the Xtal manufacturer.

    Here is a video showing how it works:

    NOTE: The display shows some glitches because the frequency of the video doesn't match with the frequency of the display. It works very well the project itself.

    As the switches are multiplexed with the display, the display goes black as long any button is pressed. The Brightness switch decreases the brightness of the display, there are six levels of brightness. I do recommend to use RED displays because RED LEDs have a lower forward voltage than any other color, so the brightness of the display will be higher.

    Download the FREE 16F84A HEX FILE (demo version). Right click and "Save link as...".

    or, you can download the FREE 16F628A HEX FILE (demo version). Right click and "Save link as...".

    Do you want to buy the source code (ASM) and non-demo HEX file for both 16F628A and 16F84A?
    The non-demo version doesn't display the "josepino dot com" message.

    Non-demo Version: $3.99 USD



    < Air Display.   Home   Answering Stupid Questions.>

    Share your comments and experience:
    Keep it short, Comments with bad words, spam and non-related will be deleted.

    09/08/09 - 18:48:43 Fran from Spain wrote: Hola Jose. Me gustaria saber por que estan unidos el anodo del display 1 con el "c" del segundo, y "f" del tercero y cuarto.
    Tambien el anodo del display 2 está unido con el "c" del 1 y "e" del tercero y cuarto
    El anodo del display 3, esta unido con el "b" del 1 y 2 y el "d" del cuarto.
    El anodo del display 4 esta unido con el "a" del 1 y 2 y con el "d" del tercero.
    Eso es normal? No se quemará el PIC o el display? Gracias, me urge.
    Un saludo
    09/08/09 - 18:56:46 José Pino wrote: Las conexiones de este tipo se denominan "charlieplexed" y se usa para ahorrar pines del microcontrolador. Puede dañar el PIC o el display si se excede el voltaje de reversa que soporta el display, sin embargo esto no sucede ya que solo le está aplicando aproximadamente 4.5 volts que provienen del PIC y no se excede la corriente limite de los puertos. Para mas informacion: http://www.josepino.com/?charlieplex-7segment-display  (en inglés)
    09/09/09 - 07:50:56 Steve from London wrote: Your clock designs are excellent, thank you.  I have two I use in the house.  I would like to make another clock that uses common anode seven segment displays that are 4" high.  These require 7.4 volts to work.  Can you help me with how I can use say ULN2003s with your circuit?  Many thanks.
    09/09/09 - 10:16:12 Fra from Spain wrote: Muchisimas gracias, Jose Pino. Miraré lo del charliplexing.
    Steve from London: In the old Jose Pino´s clock desing, you can see how to install a jumbo display. I dont remember the URL but if you use google, you can find it.
    09/09/09 - 10:21:12 Fran from Spain wrote: Jose Pino, acabo de ver lo del charliplexing, ya lo entiendo mas o menos, claro que lo mas complicado para conseguir que funcione es el software...
    En cuanto al reloj... 2 dudas mas:
    1) Has probado el software que tanto para el 16F84A como para el 16F628?
    2) La version DEMO es 100% operativa solo que muestra el mensaje "josepino dot com" cada ciertos segundos no?
    Muchisimas gracias amigo.
    09/09/09 - 17:34:14 José Pino wrote: He probado ambas versiones para el 16F84A y el 16F628A.  El mensaje se presenta al iniciar al reloj y despues de eso, 2 veces al dia.
    09/09/09 - 19:20:51 Fran from Spain wrote: Jose, te has planteado añadirle la funcion de alarma a tu reloj, aunque se deban añadir unos pocos componentes mas? seria posible eso?
    Este reloj está muy interesante, solo le falta alarma.
    Gracias
    09/09/09 - 19:22:13 José Pino wrote: De ser posible, lo es.  Ya tengo desarrollado otra version con alarma pero aun no está listo para ser publicado.
    09/09/09 - 22:10:23 Fran from Spain wrote: Muchisimas gracias por tu empeño.
    He encontrato soluciones en tu pagina que llevaba buscando hace meses...
    Sigue así, y espero ese nuevo reloj con alarma
    Un saludo desde España.
    Chao
    09/10/09 - 04:23:56 ronie from phillippines wrote: do you have a mikro C program on this project? is the circuit diagram available?
    09/10/09 - 22:41:00 Alvaro from México wrote: Sr Jose felicidades por su sitio he encontrado cosas muy interesantes, quisiera saber como depositarle el costo del software para esta reloj ya que quiero armarlo para obsequiarselo a mi papa , pero como tengo 13 años no tengo tarjetas de credito no se si le pudiera depositar a alguna cuenta debanco,por su atencion  Gracias
    09/11/09 - 07:49:18 Fran from Spain wrote: Alvaro, si te fijas, JosePino te da la opcion de:
    1) Comprar la version no-demo
    2) Obtener la version demo gratis
    Si usas la opcion 2, en esta pagina verás el esquema y el HEX listo para meter en el PIC.
    La opcion 1 la pagas con Visa o Pay pal y no muestra el mensaje "josepinodotcom"
    09/16/09 - 10:54:50 Nando from Portugal wrote: Hi, Jose Pino.
    I wish to know when will be ready your alarm clock project. ¿can you give a short briefing of how you are doing that project, or what is the main idea of the project, or in what consists it?
    ¿is similar to the clock in this page? ¿varies too much?
    Thank you
    Sorry for my English!
    09/16/09 - 20:51:30 José Pino wrote: The alarm clock is quite similar but there are more parts to be used.  The schematic is not ready, The software is working and under test. I guess it will take about two months to be posted online.
    10/04/09 - 12:46:00 krish from sri lanka wrote: dear joshapino,
    waiting for ur alarm clock..
    can u make that to adjustable time alarm..?tthat will help to turn on/off equipments on specific  duration on a define time of the day..
    thanks
    10/25/09 - 19:25:56 Chuck from New York wrote: Can I purchase a PIC 16F84A chip with program loaded from you? I have tried to program a chip with no luck. I think I have wrong programmer for chip. You can get back to me at sbcm07@hotmail.com
    Thanks  Chuck
    10/27/09 - 17:49:17 PEDRO DIAZ from MEXICO wrote: DISCULPE JOSE, QUIERO HACER SU RELOJ PERO NECESITO EL ARCHIVO ASM PARA COMPILARLO. YA INTENTE COMPRAR EL ARTICULO PERO PYPAL NO VALIDA LA TARJETA NO SE SI NECESITO ESTAR REGISTRADO. PERO TALVEZ TENGA UNA CUENTA DONDE SE LE PUEDA DEPOSITAR. LE DOY MI CORREO diaz_gonzalez@hotmail.com PARA QUE SI PUEDE ME ENVIE SU CUENTA Y DESPUES ME MANDE EL ARCHIVO ASM QUE ES EL QUE NECESITO MAS. PORFAVOR
    10/27/09 - 17:50:55 PEDRO DIAZ from MEXICO wrote: DISCULPE JOSE, QUIERO HACER SU RELOJ PERO NECESITO EL ARCHIVO ASM PARA COMPILARLO. YA INTENTE COMPRAR EL ARTICULO PERO PYPAL NO VALIDA LA TARJETA NO SE SI NECESITO ESTAR REGISTRADO. PERO TALVEZ TENGA UNA CUENTA DONDE SE LE PUEDA DEPOSITAR. LE DOY MI CORREO diaz_gonzalez@hotmail.com PARA QUE SI PUEDE ME ENVIE SU CUENTA Y DESPUES DE QUE USTD. CONFIRME QUE LE DEPOSITE ME MANDE EL ARCHIVO ASM QUE ES EL  QUE NECESITO MAS. PORFAVOR

    Name:   Location:
    Captcha:   <-- This is the Captcha
    Your Comments:

    Bookmark or Bookmark and Share Suscribe to RSS Feeds

    10 most viewed pages:

    - How To Make a Speaker
    - Hi-fidelity Homemade Loudspeaker.
    - Tachometer/RPM II.
    - Homemade WiFi Lid Antenna.
    - Super Simple Sun Tracker.
    - Led Clock
    - USB LED Light.
    - How To Repair Sony PSP
    - Knowing Everything.
    - Matrix Led Display.

    Articles related:

    - 'Almost No Parts' 12/24hrs LED Clock
    - Electricity from Piezoelectric materials
    - Fluorescent Light.
    - LCD Clock/Calendar
    - LED chaser using PIC 16F84A
    - Led Chaser II
    - Led Clock
    - One Second Timebase.
    - PIC 16F505
    - My PIC Programmer
    - PIC Programmer sent by Fco. Arroyo.
    - Traffic Light.
    - Security Keypad.
    - Security Keypad II
    - Soundmeter
    - Tachometer/RPM.
    - Tachometer/RPM II.
    - Tachometer for Bikes (circuit).
    - Timebase generator.
    - Water Level Control/Monitor.

    All categories:

    - about
    - advertisement
    - audio
    - automobile
    - bad_ones
    - best
    - circuits
    - computer
    - discover
    - diy
    - electronics
    - fail
    - food
    - from_readers
    - funny
    - furniture
    - hacks
    - homemade
    - how_it_works
    - howto
    - humor
    - interesting
    - lego
    - light
    - microcontroller
    - mysql
    - opinion
    - php
    - projects
    - readings
    - realmeal
    - religion
    - robots
    - science
    - scripts
    - trips
    - videos
    - websites
    - woodworking


    Mr. Counter says: 5202 views.

    Search Article

    Additional Links:

    - Mary's Creations.
    - Publicidad Gráfica.
    - Todito Yucatán
    - Lucina Castillo's Art
    - Conoce Amigos en Dalnet
    - Narciso González' Alebrijes

    Need to contact me?
    e-mail address
    Please get a good reason before sending me an e-mail.

    IE, Firefox, SeaMonkey & Opera tested OK, Some features may not work with Google Chrome. © 2006 - 2009 José Pino - JPC-PHP V5.0
    If any information, data, picture or design infringes a copyright material, please send me an e-mail asking to remove it along with the supporting data.