Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
DS1307 Support and demo program v2 with ZBasic structures

 
Post new topic   Reply to topic    Forum Index -> Files
Author Message
stevech



Joined: 23 Feb 2006
Posts: 657

Posted: 01 April 2006, 5:37 AM    Post subject: DS1307 Support and demo program v2 with ZBasic structures Reply with quote

ZBasic now has (beta test) support for structures.

The attached code uses simple structures for date/time in conjunction with the DS1307 clock chip (I2C bus).

Three bas files
1. Test and demo - set time via PC batch file
2. DS1307 I/O
3. Leap year and other date/time utilties Smile



DS1307Testv2.zip
 Description:

Download
 Filename:  DS1307Testv2.zip
 Filesize:  8.81 KB
 Downloaded:  3138 Time(s)

Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 01 April 2006, 5:58 AM    Post subject: Reply with quote

You are getting good at this stuff Smile

I would suggest moving the structure from the test program to the interface module because it is part of the interface.
Back to top
stevech



Joined: 23 Feb 2006
Posts: 657

Posted: 01 April 2006, 6:13 AM    Post subject: Reply with quote

or put the structure in a file by itself and #include it whenever needed - like you do in C
Back to top
mikep



Joined: 24 Sep 2005
Posts: 765
Location: Austin, TX

Posted: 01 April 2006, 7:14 AM    Post subject: Reply with quote

Well that is possibly true because it is such a common and useful structure. But in other cases I like to use the encapsulation provided by the modules - think C++ rather than C Wink
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> Files Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group