altRobots
/robotigs/icons/actuator.pngActuatoren
/robotigs/icons/printboards.pngAlgemeen
/robotigs/icons/chassis.pngChassis
/robotigs/icons/florigs.pngFlorigs
/robotigs/icons/interfacing.gifInterfacing
/robotigs/icons/microphone_icon.pngMuziek
/robotigs/icons/musicKey_icon.pngMuzikanten
/robotigs/icons/shield.pngSchildjes
/sys/icons/sensors.pngSensors
/robotigs/icons/languages.pngTalen
/robotigs/icons/battery.pngVoedingen
/sys/icons/microController.pngµControllers
altContact
Klok DS1302 verouderd/robotigs/icons/login_key.png    alt  

Deze pagina is verouderd. Ga naar de vernieuwde pagina.

This page is outdated since the DS1302 is replaced by the DS1307 that has it`s own pagina.

Description
This brick is an complete clock, providing a date and time with a resolution of 1 second with leap-year compensation valid up to 2100. The DS1302 is designed to operate on very low power and retain data and clock information on less than 1µW. It uses Less Than 300nA at 2.0V. The DS1302 is the successor to the DS1202. A 3Vdc battery cell (CR2032) keeps it running while powered off. Interfacing the DS1302 with a microprocessor is simplified by using synchronous serial communication. Communication is done through I²C and the address is fixed at #D0.

Connections
Only three wires are required to communicate with the clock/RAM: CE, I/O (data line), and SCLK (serial clock). On the Arduino these lines can be connected to any I/O pin directly, without any resistors needed.
ConnectionsBrickLibrary
CERSTkCePin
I/ODATkIoPin
SCLKCLKkSclkPin

Libraries
There are several libraries available to function with the DS1302:
  • by NeiroN
    This library is the only one included in the IDE that still uses the 1302 (2018). You must install his library locally by using the IDE Include library function. It also needs the #include Wire.h library. For some reason it just does not work for a DS1302 at my UNO rev3. Deze library werkt echter wel goed voor de nieuwere DS1307.

  • by Matt Sparks
    This library can be downloaded from Github.

Algemene informatie over dit onderdeelAlgemene informatie test
KYcode RO-041
Prijs indicatie  €  3,20
Sketch voorbeeld  Arduino
Menu groep  Sensors
Laatste verandering  2019-04-20

Software voor dit onderdeel
DS1302firstUse  Arduino Mega 2560
Fut24ls51201.asm  Atmel ATmega32
STKmega8test7.asm  Atmel ATmega8
STKmega8test8.asm  Atmel ATmega8

Warning: include(/var/www/html/robotigs/includes/wishlistperpart.php): Failed to open stream: No such file or directory in /var/www/html/robotigs/includes/parts_header.php on line 128

Warning: include(): Failed opening '/var/www/html/robotigs/includes/wishlistperpart.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/robotigs/includes/parts_header.php on line 128
Just wait till your 57....
Afb 1: DS1302 clock brick