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
SCP1000 barometric pressure & temperature sensor (SPI)

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



Joined: 27 Jul 2009
Posts: 37
Location: Uppsala, Sweden

Posted: 21 March 2010, 23:07 PM    Post subject: SCP1000 barometric pressure & temperature sensor (SPI) Reply with quote

Dear forum members,

Here follows a functioning test program for the popular SCP1000 barometric pressure and temperature sensor. Most available breakout boards (like for example SparkFun's or Parallax board) implement only the SPI version (which is harder to code than the I2C variant), therefore the need for this test program.

The program is an adaptation of Don Kinzer's base code (in the discussion thread below) with the following items:
- OpenSPI flags register setting corrected (Clock-phase false, max 500 KHz bus)
- Implementation of SCP1000 initialization procedure, high-res, continuous measurement mode chosen
- Correction of Read_Direct_Access function for cnt=1 case (pressure msbyte reading: high - low byte positioning)
The corrections are documented in the code.

The program performed OK on a simple setup with a ZX-328L and an SCP1000 SPI breakout board (SparkFun). It prints out the barometric pressure (in Pa) and the temperature (in C) after each new measurement has become available (indicated by DRDY pin High).

See the discussion at http://www.zbasic.net/forum/about584.html

Best regards,
Jurjen



SCP1000.zip
 Description:

Download
 Filename:  SCP1000.zip
 Filesize:  1.46 KB
 Downloaded:  1418 Time(s)

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