Jose Pino's projects & tidbits "Great stuff from someone with an inquisitive mind"
Led Clock
12Hr Led clock using 16F84 or 16F628. Also, schematic to build a Jumbo clock is included. (6/05/2004) 16F84 version have a problem, pending to be fixed. Updated! (9/6/2006)
Using only 2 capacitors, 3 resistors, 4 seven-segment Display, 1 xtal, 2 switches n.o. and 1 Microcontroller PIC, you can build this Digital Led Clock. you can use common anode or common cathode display, just select the display type. Here is the pinout information:
Taken from http://www.josepino.com
Pin 3 defines the display type. If you will use common cathode display, connect to negative. For common anode, connect to positive. Here is a example circuit:
Please note: the pin 4 requieres a 10k resistor ONLY for 16F84. On 16F628 is not connected. The minutes displays are upside down.
For the capacitors, I used 30pf. You have to read the xtal manufacturer specifications to know the capacitor value recommended. Short connections on xtal is a must to keep accuracy.
I built some clocks using this circuit. 2 Wall clocks and a Desktop clock. Every digit is 3 inches high, every segments are 3 led in series. The voltaje used is 5.5 volts (1.8volts x 3 = 5.4 Volts) Leds aren't really bright but works great. Here is the pictures of my wall clocks:
Here is a desktop clock:
Feb 16, 2005. - UPDATE: If you want to build a clock with a big display, you have to add a non-inverting CMOS buffer. Here is the schematic to build a "jumbo" clock:
Dec 4, 2005. - ERRATA: DO NOT USE 74HC541 FOR 12 VOLTS! is better to use 4050 CMOS. Some big 7-segment display works with 12 Volts. - Thanks Mark Efkowitz!
9/6/06 - Updated: Here is the schematic using CMOS 4050 instead of 74HC541. Sent by Flash Gordon.
This schematic is only a sample. You can connect the 4050 to 12V and drive jumbo displays. Do not connect regular (small) LED displays to 12 volts because the circuit may overheat. Please read the manufacturer specification of your displays. - Thanks Flash!
07/28/09 - 01:30:17 Prashan from Australia wrote: Can somebody please send me PIC 16F628 source code for the LED clock.
08/22/09 - 04:02:59 misa from mexico wrote: do you have with the 16f84 ?
08/22/09 - 04:06:40 José Pino wrote: Yes, the hex file is available for the 16F84(a). The schematic is the same.
08/22/09 - 04:22:52 misa from mexico wrote: excusme , im instructor of a course of pic and i use your design, i made a pcb, but i have the problem that the code is wrong, the pic doesn´t work with these code can you send me the fix code pd excuse my english thanks blindside89@hotmail.com
08/25/09 - 07:04:23 José Pino wrote: The device configuration should be: OSC Xtal, WDT Off, CP Off, PWRTMR On. Try this settings.
09/20/09 - 01:01:45 ticky from thailand wrote: Can I use the same schematic for common cathode?/Thanks
09/20/09 - 01:04:38 José Pino wrote: Yes. The Pin 3 defines what type of 7-segment display you are using.
09/30/09 - 20:07:13 Pedro from Spain wrote: Hola Jose Pino. En primer lugar enhorabuena por la web y todos los proyectos en ella. Me gustaria saber si el HEX que has puesto para el 16F628 sirve para el 16F628A, o si hay que modificar el codigo fuente. Tambien saber si seria muy complicado hacer un reloj con alarma, partiendo de la base del tuyo o similar. Gracias
09/30/09 - 20:54:12 José Pino wrote: El HEX funciona para el 16F628A pero la configuracion de los "fusibles" tiene que ser asignada manualmente. ( OSC Xtal, WDT Off, CP Off, PWRTMR On. ) Referente a reloj con alarma, habrá que hacer un software nuevo.
10/01/09 - 07:55:16 Pedro from Spain wrote: Entonces puedo meter el HEX que tienes en esta pagina para el 628 en el 628A, sin modificar el codigo fuente, claro, solo modificando los fusibles a la hora de quemar el pic. Lo que has puesto de "OSC Xtal" y eso, ¿Son los fusibles que hay que modificar? no son lo mismo que has puesto mas arriba?
10/06/09 - 06:51:54 José Pino wrote: Correcto es la respuesta a todas tus preguntas.
10/06/09 - 22:28:24 Pedro from Spain wrote: Pedro, una ultima pregunta. No me queda claro como estan unidos los displays. es: A1 con A2 con D3 con D4 ó es A1 con A2 con A3 con A4 Gracias. Es que los dos ultimos digitos estan invertidos, y tengo un display de 4 digitos que estan unidos A1 A2 A3 A4 y no se si sirvirá
10/07/09 - 06:26:34 José Pino wrote: Los display estan conectados así: Pin 6 - A1 - A2 - A3 - A4 Pin 7 - B1 - B2 - B3 - B4 Pin 8 - C1 - C2... etc. Display de 4 digitos no te servirá ya que aparecerán invertidos los minutos. PS. No me llamo Pedro.
10/07/09 - 07:28:51 Pedro from Spain wrote: Perdon, es verdad, te llamas Jose Pino. Un fallo provocado por el sueño que tenia. Vale, si el de 4 digitos no funcionará eso quiere decir que le das la vuelta a los digitos por software no?.
10/13/09 - 21:00:08 Jairo Piran from Brazil wrote: Thanks!!! This is the best home page for estudent of microchip. Thank you very much.
10/19/09 - 12:49:55 Ash from England wrote: excuse me but i posted something about that i was a school kid in electronics and JOSE PINO if u are reading this...... i cannot find the link in which i posted it and im not exactly sure what iposted so please could u find it
11/09/09 - 21:36:01 luisencizo from colombia wrote: muy buenos circuitos el problema es que la simularlos en proteus siempre se da el error EEPROM data has invalid address 2000 for this device. le agradeceria cualquier informacion para corregir este error
11/18/09 - 10:07:20 kris from uk wrote: i was wondering did u have to write a programs for the chips??
11/18/09 - 18:14:35 José Pino wrote: Yes. Software are needed to make the micro controller to work. Software is provided as HEX file.