Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 30, 2024, 08:01:23 20:01


Login with username, password and session length


Pages: [1]
Print
Author Topic: RTC ds1306  (Read 5501 times)
0 Members and 1 Guest are viewing this topic.
hristofor
Guest
« on: November 07, 2007, 12:50:15 12:50 »

enybody work with ds1306 - picbasic ?
I need some example.
Logged
leemarrow
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 316
-Receive: 52


« Reply #1 on: November 07, 2007, 01:17:10 13:17 »

hi,
try this for ds1307
http://www.melabs.com/resources/samples/submitted/MN1307.txt
Logged
savnik20
Active Member
***
Offline Offline

Posts: 144

Thank You
-Given: 37
-Receive: 401


« Reply #2 on: November 07, 2007, 02:05:35 14:05 »

The best fro Melanie
Logged
donno
Guest
« Reply #3 on: November 08, 2007, 02:46:27 14:46 »

hi, more code snippets picbasic i2c and DS1307 at...

http://www.mikroe.com/forum/viewtopic.php?p=15622&sid=6eb218da120422b66a251c02bd981e44
http://blog.faludi.com/category/advanced-microcontrollers/

Time and Temperature at...

http://www.rentron.com/PicBasic/SERLED.htm

or C

http://www.techdesign.be/projects/routines/ds1307_void_a.htm
http://www.best-microcontroller-projects.com/real-time-clock-ic.html

Hope this helps!
Logged
donno
Guest
« Reply #4 on: November 08, 2007, 02:51:59 14:51 »

Sorry forgot this one... a good guide...

http://users.picbasic.org/index.php?page=howtodetail&id=53

ciao
Logged
fernandodiaz
Junior Member
**
Offline Offline

Posts: 73

Thank You
-Given: 1
-Receive: 18


« Reply #5 on: November 10, 2007, 10:00:52 22:00 »

Include "PROTON_4.INC"     
   Dim W0   as   Word                          ' Address
   Dim B1   as   byte
        dim B2  as  byte                         ' Data 1
        dim B3  as  byte
       
        dim B4  AS  BYTE
        DIM B5  AS  BYTE
        DIM B6  AS  BYTE
        DIM B7  AS  BYTE
               dim  temp as byte
 '       
 '  for read     
       
   loop:
   
   print at 1,1,"              "
   print at 2,1,"              "     
CONVIERTEIN: ' DEC A HEX     
TEM = ((TEM >> 4) * 10)+ TEM & $0F) 'DEC A HEX PARA GUARDAR AL CHIP       
Return   
                          ' Data 2
BUSIN 208,0,[b1] ' seg poner temp por b1
BUSIN 208,1,[b2] ' min
BUSIN 208,2,[b3] ' hrs

BUSIN 208,4,[b5] ' dia
BUSIN 208,5,[b6] ' mes
BUSIN 208,6,[b7] ' año


' BUSIN $D1,0,[SEC] ' seconds, if yo read this address the RTC stop the count.

                         
           
            Print at 1,1,hex b3 ,":",hex b2,":",hex b1
            Print at 2,1,hex b5 ,":",hex b6 ,":",hex B7
            Delayms 500
   '___________________________________________________________________________________________-     
'for write
       if portb.0 = 1  then
                   
        temp = 10
       
        temp = ((temp / 10) << 4) + (temp // 10) :  busout 208,4,[temp]  ' conv  decial a  hex
       
        temp = 10
       
        temp = ((temp / 10) << 4) + (temp // 10) :  busout 208,5,[temp]   ' conv  decial a  hex                     
       
               temp = 10
       
        temp = ((temp / 10) << 4) + (temp // 10) :  busout 208,6,[temp]   ' conv  decial a  hex
       
       endif


        Goto loop


' suerte
Logged
raraavis
Newbie
*
Offline Offline

Posts: 13

Thank You
-Given: 7
-Receive: 12

Buenos Aires - Argentina


« Reply #6 on: November 11, 2007, 04:22:35 04:22 »

Proton and ds 1307
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC