{"id":7843,"date":"2015-06-30T09:20:19","date_gmt":"2015-06-30T16:20:19","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=7843"},"modified":"2021-06-16T16:16:26","modified_gmt":"2021-06-16T23:16:26","slug":"i2c-in-labview","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/i2c-in-labview\/","title":{"rendered":"I2C in LabVIEW"},"content":{"rendered":"<p>I recently published an Instructable on how to use <a href=\"https:\/\/learn.blog.digilentinc.com\/Documents\/405\" target=\"_blank\" rel=\"noopener\">I2C<\/a>\u00a0in LabVIEW using <a href=\"https:\/\/www.labviewmakerhub.com\/doku.php?id=libraries:linx:start\" target=\"_blank\" rel=\"noopener\">LabVIEW MakerHub LINX<\/a>, <a href=\"https:\/\/digilent.com\/blog\/Products\/Detail.cfm?NavPath=2,892,1193&amp;Prod=CHIPKIT-WF32\" target=\"_blank\" rel=\"noopener\">chipKIT WF32<\/a>, and <a href=\"https:\/\/digilent.com\/blog\/Products\/Detail.cfm?Prod=PMOD-GYRO\" target=\"_blank\" rel=\"noopener\">PmodGYRO<\/a> as an example. \u00a0Digilent sells a both LabVIEW Home Bundle and chipKIT WF32 in the <a href=\"https:\/\/digilent.com\/shop\/labview-physical-computing-kit-with-chipkit-wf32\/\" target=\"_blank\" rel=\"noopener\">LabVIEW Physical Computing Kit<\/a>. \u00a0In this Instructable, I go over how to read the data sheet to find what you&#8217;re looking for\u00a0and how exactly to code what you find. \u00a0This guide also details how to set up <a href=\"https:\/\/learn.blog.digilentinc.com\/Documents\/176\" target=\"_blank\" rel=\"noopener\">pull-up resistors<\/a> for successful I2C communication.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/06\/i2cmain1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" size-medium wp-image-7845 aligncenter\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/06\/i2cmain1-600x459.jpg\" alt=\"i2cmain\" width=\"600\" height=\"459\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/06\/i2cmain1-600x459.jpg 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/06\/i2cmain1-225x172.jpg 225w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/06\/i2cmain1.jpg 753w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Once the bytes are received from the sensor, they must be arranged to get a meaningful value. \u00a0This includes joining bytes together to form 16 bit values, converting to a <a href=\"https:\/\/learn.blog.digilentinc.com\/Documents\/280\" target=\"_blank\" rel=\"noopener\">two&#8217;s complement signed integer<\/a>, and multiplying by the correct resolution depending on the scale setting by using an enum control for a case structure that gives the correct resolution multiplier.<\/p>\n<p>&nbsp;<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-7843 jlk' data-task='like' data-post_id='7843' data-nonce='ac068a413b' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-7843 lc'>0<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-7843 jlk' data-task='unlike' data-post_id='7843' data-nonce='ac068a413b' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-7843 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-7843 status align-left'>Be the 1st to vote.<\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>I recently published an Instructable on how to use I2C in LabVIEW using LabVIEW MakerHub LINX, chipKIT WF32, and PmodGYRO as an example.  Digilent sells a both LabVIEW Home Bundle and chipKIT WF32 in the LabVIEW Physical Computing Kit.  In this Instructable, I go over how to read the data sheet to find what you&#8217;re looking for and how exactly to code what you find.  This guide also details how to set up pull-up resistors for successful I2C communication.<\/p>\n","protected":false},"author":33,"featured_media":7845,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[38,4323,1563],"tags":[],"ppma_author":[4481],"class_list":["post-7843","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-expansion-modules","category-software","category-guide"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/06\/i2cmain1.jpg","jetpack_sharing_enabled":true,"authors":[{"term_id":4481,"user_id":33,"is_guest":0,"slug":"sudharsan-sukumar","display_name":"Sudharsan Sukumar","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/a14d4c855a4738a3b7d04f48ab9936a38ea5a056ea75b4761a407b53dac5597b?s=96&d=mm&r=g","1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":"","9":"","10":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/7843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=7843"}],"version-history":[{"count":0,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/7843\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/7845"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=7843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=7843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=7843"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=7843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}