Brooke's World The life and ramblings of Brooke.

May 6, 2017

Testing DS7505 with Bus Pirate

Filed under: Contextual Electronics — Brooke @ 4:53 pm

As part of the CE Header project from the CE Skills course , I needed to learn to work with DS7505.  I used a Bus Pirate (Dangerous Prototypes) and probes, from Seeed Studio, to iteratively poke at it until I understood how to talk to it via I2C.

Once I soldered the DS7505 to a small carrier board from Adafruit, I placed it on a breadboard and wired it up to the Bus Pirate.  Please note, the cable and connectors in the image below are from the Seeed probe cable.  Some of the other probe cables have the colors in a different order on the connectors.

I used putty to connect to the Bus Pirate via a mini usb cable.

Command What it does
Initalize the Bus Pirate
m 4 1 Mode, I2C, Speed 5khz
W Turn power on
P Turn on pull ups

 

Command What it does Output
Find the I2C address
(1) Find the slave address 0x90(0x48 W) 0x91(0x48 R)

 

Command What it does Output
Working with the Config register
[ 0x90 0x01 [ 0x91 r:1 ] Read the register 0x00 (default)
[ 0x90 0x01 0x60 ] Enable 12 bit resolution
[ 0x90 0x01 0x60 [ 0x91 r:1 ] Enable 12 bit resolution and read back current config  0x60

 

Command What it does Output
Working with the temperature register
[ 0x90 0x00 [ 0x91 r:2 ] Read the register ex:  0x19 0xE0
 

How to calculate given: 0x19 0xE0 and 12 bit resolution.

Bit 8 of MSB is the sign. 0=+ and 1=-
MSB is whole number
LSB is fraction

The most significant 4 bits of the LSB are used for 12bit precision.

MSB 0011001
25C +
Total = 25.75C
LSB 1100000
12/16=.75
Given: 0xE6 0x78

Note: negative due to the 8th bit of the MSB being 1

MSB 11100110
(NOT 11100110) +1
00011001 + 1
00011010
-26C +
Total = -25.0625C
LSB 1111000

15/16=.9375

0.9375

 

Click for full size

 

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress