Ds1307 Bascom Program



Sebelumnya sudah pernah saya posting tentang RTC DS1307 juga pada Tutorial Jam Digital dengan Bascom AVR, sedikit teori dan datasheet RTC DS1307 dapat dilihat pada postingan tersebut. Pada tutorial kali ini saya akan memberikan contoh program jam digital dengan RTC DS1307 menggunakan bahasa pemrograman CodeVision AVR. Pada kesempatan kali ini saya akan menjelaskan mengenai bagaimana cara membuat sebuah alat dengan menggunakan sensor suhu dan kelembaban DHT22 kemudian dilengkapi dengan RTC DS1307 untuk menampilkan waktunya. Program yang digunakan adalah Bascom AVR, mikrokontroller yang dipakai adalah ATMega16 dengan interface pada lcd 16x2. Jadi alat ini hanya mendeteksi suhu dan kelembaban serta menampilkan.

Ds1307
HomeProductsTeensyBlogForum
You are here:TeensyTeensyduinoLibrariesDS1307RTC

Ds1307 Bascom Programm

PJRC Store
Teensy 4.1, $26.85
Teensy 4.0, $19.95
Teensy 3.6, $29.25
Teensy 3.5, $24.25
Teensy 3.2, $19.80
Teensy LC, $11.65
Teensy 2.0, $16.00
Teensy++ 2.0, $24.00
Teensy
Main Page
Hardware
Getting Started
Tutorial
How-To Tips
Code Library
Projects
Teensyduino
Main
Download+Install
Basic Usage
Digital I/O
PWM & Tone
Timing
USB Serial
USB Keyboard
USB Mouse
USB Joystick
USB MIDI
USB Flight Sim
Serial
Libraries
Main List
GLCD
LiquidCrystal
OctoWS2811
FastSPI_LED
Matrix/Sprite
LedDisplay
LedControl
DogLcd
ST7565
AltSoftSerial
NewSoftSerial
SoftwareSerial
MIDI
PS2Keyboard
DmxSimple
Firmata
Wire
SPI
OneWire
XBee
VirtualWire
X10
IRremote
TinyGPS
USBHostShield
Ethernet
Bounce
Keypad
Audio
Encoder
Ping
CapacitiveSensor
FreqCount
FreqMeasure
Servo
PulsePosition
Stepper
AccelStepper
FrequencyTimer2
Tlc5940
SoftPWM
ShiftPWM
Time
TimeAlarms
DS1307RTC
Metro
TimerOne
MsTimer2
EEPROM
Reference

DS1307RTC allows you to access real time clock (RTC) chips compatible withthe DS1307. It is intended to be used with theTime library.

Download:Included with the Teensyduino Installer
Latest Developments on Github

Hardware Requirements

DS1307RTC works with the DS1307, DS1337 and DS3231 real time clock chips.

The DS1307 chip only works with 5 volt power. The DS1337 and DS3231can use 3.3 or 5 volts.

Teensy 3.0 has a built-in RTC, so the DS1337 offers little benefit.However, the DS3231 includes a temperature compensated crystal, so itis recommended for applications requiring high accuracy.

Imax b6 charger pc software. The ChronoDotboard provides the DS3231 chip in an easy-to-use package. For usewith Teensy 3.0, you must add pullup resistors for the SDA and SCL signals.

Basic Usage

RTC.get();

Reads the current date & time as a 32 bit 'time_t' number. Zero is returnedif the DS1307 is not running or does not respond.

RTC.set(t);

Sets the date & time, using a 32 bit 'time_t' number. Returns true forsuccess, or false if any error occurs.

Hollow knight geo cheat

RTC.read(tm);

Read the current date & time as TimeElements variable. See the Time libraryfor TimeElements details. Returns true on success, or false if thetime could not be read.

RTC.write(tm);

Sets the date & time, using a TimeElements variable. Returns true for

RTC.chipPresent();

Returns true if a DS1307 compatible chip was present after using the4 functions. If an error occurs, this can be used to distinguish betweena DS1307 that is not running vs no chip connected at all.

Example Program

DS1307RTC includes 2 examples, to read or set the time.

You can open this example from File > Examples > DS1307RTC > ReadTest.