{"id":225,"date":"2017-05-06T16:53:51","date_gmt":"2017-05-06T21:53:51","guid":{"rendered":"http:\/\/www.millamilla.com\/?p=225"},"modified":"2017-05-27T17:00:50","modified_gmt":"2017-05-27T22:00:50","slug":"testing-ds7505-with-bus-pirate","status":"publish","type":"post","link":"https:\/\/www.millamilla.com:443\/?p=225","title":{"rendered":"Testing DS7505 with Bus Pirate"},"content":{"rendered":"<p>As part of the CE Header project from the\u00a0<a href=\"https:\/\/skills.contextualelectronics.com\">CE Skills<\/a>\u00a0course , I needed to learn to work with\u00a0<a href=\"https:\/\/www.maximintegrated.com\/en\/products\/analog\/sensors-and-sensor-interface\/DS7505.html\">DS7505<\/a>. \u00a0I used a <a href=\"http:\/\/dangerousprototypes.com\/docs\/Bus_Pirate\">Bus Pirate<\/a>\u00a0(Dangerous Prototypes) and probes, from <a href=\"https:\/\/www.seeedstudio.com\/Bus-Pirate-v3.6-universal-serial-interface-p-609.html\">Seeed Studio<\/a>, to iteratively poke at it until I understood how to talk to it via I2C.<\/p>\n<p>Once I soldered the DS7505\u00a0to a small carrier board from <a href=\"https:\/\/www.adafruit.com\/product\/1212\">Adafruit<\/a>, I placed it on a breadboard and wired it up to the Bus Pirate. \u00a0Please note, the cable and connectors in the image below are from the Seeed probe cable. \u00a0Some of the other probe cables have the colors in a different order on the connectors.<\/p>\n<p>I used <a href=\"http:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html\">putty<\/a> to connect to the Bus Pirate via a mini usb cable.<\/p>\n<table border=\"1\" cellspacing=\"2\" cellpadding=\"0\">\n<thead>\n<tr>\n<td style=\"width: 86px;\">Command<\/td>\n<td style=\"width: 163px;\">What it does<\/td>\n<\/tr>\n<\/thead>\n<caption>Initalize the Bus Pirate<\/caption>\n<tbody>\n<tr>\n<td style=\"width: 86px;\">m 4 1<\/td>\n<td style=\"width: 163px;\">Mode, I2C, Speed 5khz<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 86px;\">W<\/td>\n<td style=\"width: 163px;\">Turn power on<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 86px;\">P<\/td>\n<td style=\"width: 163px;\">Turn on pull ups<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table style=\"width: 510px;\" border=\"1\" cellspacing=\"2\" cellpadding=\"0\">\n<thead>\n<tr style=\"height: 25px;\">\n<td style=\"width: 86px; height: 25px;\">Command<\/td>\n<td style=\"width: 194px; height: 25px;\">What it does<\/td>\n<td style=\"width: 220px; height: 25px;\">Output<\/td>\n<\/tr>\n<\/thead>\n<caption>Find the\u00a0I2C address<\/caption>\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 86px; height: 24px;\">(1)<\/td>\n<td style=\"width: 194px; height: 24px;\">Find the slave address<\/td>\n<td style=\"width: 220px; height: 24px;\">0x90(0x48 W) 0x91(0x48 R)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table style=\"width: 617.352px;\" border=\"1\" cellspacing=\"2\" cellpadding=\"0\">\n<thead>\n<tr style=\"height: 25px;\">\n<td style=\"width: 320px; height: 25px;\">Command<\/td>\n<td style=\"width: 137px; height: 25px;\">What it does<\/td>\n<td style=\"width: 214.352px; height: 25px;\">Output<\/td>\n<\/tr>\n<\/thead>\n<caption>Working with the Config register<\/caption>\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 320px; height: 24px;\">[ 0x90 0x01 [ 0x91 r:1 ]<\/td>\n<td style=\"width: 137px; height: 24px;\">Read the register<\/td>\n<td style=\"width: 214.352px; height: 24px;\">0x00 (default)<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 320px; height: 24px;\">[ 0x90 0x01 0x60 ]<\/td>\n<td style=\"width: 137px; height: 24px;\">Enable 12 bit resolution<\/td>\n<td style=\"width: 214.352px; height: 24px;\"><\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 320px; height: 24px;\">[ 0x90 0x01 0x60 [ 0x91 r:1 ]<\/td>\n<td style=\"width: 137px; height: 24px;\">Enable 12 bit resolution and read back current config<\/td>\n<td style=\"width: 214.352px; height: 24px;\">\u00a00x60<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table style=\"width: 615px;\" border=\"1\" cellspacing=\"2\" cellpadding=\"0\">\n<thead>\n<tr style=\"height: 25px;\">\n<td style=\"width: 211px; height: 25px;\">Command<\/td>\n<td style=\"width: 246px; height: 25px;\">What it does<\/td>\n<td style=\"width: 214px; height: 25px;\">Output<\/td>\n<\/tr>\n<\/thead>\n<caption>Working with the temperature register<\/caption>\n<tbody>\n<tr style=\"height: 24px;\">\n<td style=\"width: 211px; height: 24px;\">[ 0x90 0x00 [ 0x91 r:2 ]<\/td>\n<td style=\"width: 246px; height: 24px;\">Read the register<\/td>\n<td style=\"width: 214px; height: 24px;\">ex:\u00a0 0x19 0xE0<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 211px; height: 24px;\">&nbsp;<\/p>\n<p>How to calculate given: 0x19 0xE0 and 12 bit resolution.<\/p>\n<p>Bit 8 of MSB is the sign. 0=+ and 1=-<br \/>\nMSB is whole number<br \/>\nLSB is fraction<\/p>\n<p>The most significant 4 bits of the LSB are used for 12bit precision.<\/td>\n<td style=\"width: 246px; height: 24px;\">MSB 0011001<br \/>\n25C +<br \/>\nTotal = 25.75C<\/td>\n<td style=\"width: 214px; height: 24px;\">LSB 1100000<br \/>\n12\/16=.75<\/td>\n<\/tr>\n<tr style=\"height: 24px;\">\n<td style=\"width: 211px; height: 24px;\">Given: 0xE6 0x78<\/p>\n<p>Note: negative due to the 8th bit of the MSB being 1<\/td>\n<td style=\"width: 246px; height: 24px;\">MSB 11100110<br \/>\n(NOT 11100110) +1<br \/>\n00011001 + 1<br \/>\n00011010<br \/>\n-26C +<br \/>\nTotal = -25.0625C<\/td>\n<td style=\"width: 214px; height: 24px;\">LSB\u00a01111000<\/p>\n<p>15\/16=.9375<\/p>\n<p>0.9375<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<div id=\"attachment_218\" style=\"width: 610px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/ostrich.hedrickfam.com:8081\/wp-content\/uploads\/2017\/05\/connect_buspirate_ds7505.jpg\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-218\" class=\"wp-image-218\" src=\"http:\/\/ostrich.hedrickfam.com:8081\/wp-content\/uploads\/2017\/05\/connect_buspirate_ds7505-300x238.jpg\" alt=\"\" width=\"600\" height=\"476\" srcset=\"https:\/\/www.millamilla.com:443\/wp-content\/uploads\/2017\/05\/connect_buspirate_ds7505-300x238.jpg 300w, https:\/\/www.millamilla.com:443\/wp-content\/uploads\/2017\/05\/connect_buspirate_ds7505-768x609.jpg 768w, https:\/\/www.millamilla.com:443\/wp-content\/uploads\/2017\/05\/connect_buspirate_ds7505-1024x812.jpg 1024w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-218\" class=\"wp-caption-text\">Click for full size<\/p><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As part of the CE Header project from the\u00a0CE Skills\u00a0course , I needed to learn to work with\u00a0DS7505. \u00a0I used a Bus Pirate\u00a0(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\u00a0to a small carrier board from Adafruit, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-225","post","type-post","status-publish","format-standard","hentry","category-contextual-electronics"],"_links":{"self":[{"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=\/wp\/v2\/posts\/225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=225"}],"version-history":[{"count":4,"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":258,"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions\/258"}],"wp:attachment":[{"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.millamilla.com:443\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}