<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Other NXP ProductsのトピックInterfacing MC33HB2001 with Arduino SPI</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/Interfacing-MC33HB2001-with-Arduino-SPI/m-p/684134#M4853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 3 things that I need to clarify:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have a MC33HB2001 chip which I wish to set at a 10.7 current limit when I start using it. I want to use an arduino uno's SPI as the master to interface with the chip. However, I am not too sure about the order of things I should send to the chip, and how I should go about sending the commands to the chip since arduino is 8 bit and the chip is 16 bit. Here is the code I have come up with so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#include &amp;lt;SPI.h&amp;gt; //SPI library&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#define SS 10 // define slave select pin here&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;const uint16_t limit = 58256; // 1110001110010000 is the 16 bit that fits my specification&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SPISettings chip(10000000, MSBFIRST, SPI_MODE0); // 10MHz, MSB first, output on falling, data capture on rising&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void setup() {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;pinMode(SS,OUTPUT); //setting slave select pin as a digital output&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SPI.begin(); &amp;nbsp;//initialise SPI bus&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;digitalWrite(SS,LOW); //contact MC33HB2001&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SPI.transfer16(limit); // send the 16 bits over&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;digitalWrite(SS,HIGH); //end contact with chip&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void loop() {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;other portion of code that is not related to chip&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to ask if I have to just send the 16 bits over once to the chip and that is the end of story, or must I keep running the commands in the arduino loop()?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. For the MC33HB2001 chip, to send commands to it, do I just send a single 16 bit transmission, or must I do things in this order:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. Send a 'Write' command 16 bit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. Send my specific 'current limit' 16 bit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3. End transmission&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Under the MC33HB2001 documentation, for the 'control and configuration', if i set bit 2 (active INPUT control mode) to 0, does this mean that bit 1 (virtual input 1) and bit 0 (virtual input 2) can be any value since I am not using virtual input to control my chip?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jul 2017 05:00:50 GMT</pubDate>
    <dc:creator>mingentay</dc:creator>
    <dc:date>2017-07-05T05:00:50Z</dc:date>
    <item>
      <title>Interfacing MC33HB2001 with Arduino SPI</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/Interfacing-MC33HB2001-with-Arduino-SPI/m-p/684134#M4853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 3 things that I need to clarify:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. I have a MC33HB2001 chip which I wish to set at a 10.7 current limit when I start using it. I want to use an arduino uno's SPI as the master to interface with the chip. However, I am not too sure about the order of things I should send to the chip, and how I should go about sending the commands to the chip since arduino is 8 bit and the chip is 16 bit. Here is the code I have come up with so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#include &amp;lt;SPI.h&amp;gt; //SPI library&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;#define SS 10 // define slave select pin here&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;const uint16_t limit = 58256; // 1110001110010000 is the 16 bit that fits my specification&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SPISettings chip(10000000, MSBFIRST, SPI_MODE0); // 10MHz, MSB first, output on falling, data capture on rising&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void setup() {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;pinMode(SS,OUTPUT); //setting slave select pin as a digital output&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SPI.begin(); &amp;nbsp;//initialise SPI bus&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;digitalWrite(SS,LOW); //contact MC33HB2001&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SPI.transfer16(limit); // send the 16 bits over&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;digitalWrite(SS,HIGH); //end contact with chip&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void loop() {&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;other portion of code that is not related to chip&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to ask if I have to just send the 16 bits over once to the chip and that is the end of story, or must I keep running the commands in the arduino loop()?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. For the MC33HB2001 chip, to send commands to it, do I just send a single 16 bit transmission, or must I do things in this order:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1. Send a 'Write' command 16 bit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2. Send my specific 'current limit' 16 bit&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3. End transmission&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Under the MC33HB2001 documentation, for the 'control and configuration', if i set bit 2 (active INPUT control mode) to 0, does this mean that bit 1 (virtual input 1) and bit 0 (virtual input 2) can be any value since I am not using virtual input to control my chip?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2017 05:00:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/Interfacing-MC33HB2001-with-Arduino-SPI/m-p/684134#M4853</guid>
      <dc:creator>mingentay</dc:creator>
      <dc:date>2017-07-05T05:00:50Z</dc:date>
    </item>
  </channel>
</rss>

