Biblioteca / Software


Productos más vistos

DS1302 Timekeeping Chip


descuento por cantidad

Reloj para Basic Stamp . Entega segundos , minutos , hora y fecha . Se debe agregar el pequeño cristal de 32.768 Khz. que se vende por separado.

Más detalles

Producto: En Stock



Reloj para Basic Stamp . Entega segundos , minutos , hora y fecha . Se debe agregar el pequeño cristal de 32.768 Khz. que se vende por separado.

Existen varias marcas en el mercado y hemos traido la mas confiable.


Only three wires are required to communicate with the clock/RAM: CE (chip enable), I/O (data line) and SCLK (serial clock). Data can be transfered to and from the clock/RAM 1 byte at a time, or in a burst of up to 31 bytes. The DS1302 is designed to operate on very low power, and retain the data and clock information on less than 1 µW.


  • Counts seconds, minutes, hours, date of the month, month, day of the week, and year
  • Leap-Year Compensation Valid Up to 2100
  • Supports 24 hour mode or 12 hour mode with AM/PM indicator
  • 31 byte of static RAM 
  • Package Type: 8-pin DIP

Key Specifications:

  • Power Requirements: 2 to 5 VDC; less than ~300 nA
  • Communication: TTL-compatible 3-wire synchronous serial 
  • Operating Temperature: -32° to +185° F (-0° to + 70° C)
  • Dimensions: 0.4 x .025 in (10 x 6.4 mm)


Comentarios extras del diseñador del codigo:

The attached programs are the culmination of weeks of testing, debugging, simplifying, and re-testing fragments of my code for the DS1302.·The code is heavily documented.· More so than you're probably used to, but for those who were intimidated by the DS1302, or didn't fully understand how many of the functions worked, I felt this was necessary.· Use of both 12 and 24 Hour modes is implemented, as well as using the on-board RAM.· All this is done in an easy manner, with explanations as to how the commands are formed.· 12 & 24 Hour modes are handled within subroutines, making it easy to switch between them.

·· The Demo programs use the DEBUG screen for most input/output, which makes the code appear rather large, but remember, this is demo code, and you wouldn't necessarily have the comments, menus and functions implemented as they are here.· The code is intended to be easily integrated into your own applications and use your particular input/output devices.

·· A schematic is attached showing the connections used in the demo code.· Feel free to use whatever I/O pins you want, just remember to change them in the I/O Definitions.· A 3V Backup Battery is also shown.· I have used 2AA batteries in my demo, but you could easily use a 3V Lithium such as the CR2032.· This keeps the time going and the RAM backed up whenever power is lost.

·· The demo is also running on a BS2, but you could use any BASIC Stamp Microcontroller you want.· The only thing you may have to change is the Baud rate in the LCD version, which is currently setup to use the new Parallax 2 X 16 Serial LCD Display @ 19,200bps.

·· It is my sincerest hope that our customers will benefit from this demo code.· Please post any comments, suggestions and/or feedback here or via e-mail.· Enjoy! 

UPDATE: I recently optimized a couple of areas I missed when I compiled this code which made a few routines redundant.· I also attached a template file (DS1302_Template.bs2) since many people didn't understand that the demo was supposed to be very verbose and uses up almost all the program space to demonstrate various functions.· In reality only a very small amount of memory is used for various functions and even that can be decreased is the user doesn't use all these functions.