<?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>8-bit MicrocontrollersのトピックPCA9955B driver programming Arduino</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/PCA9955B-driver-programming-Arduino/m-p/787022#M22593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I established communication between Arduino and the NXP PCA9955B with I2C. However, I don't manage to toggle the LED0 that is constantly on at low power. Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;Wire.h&amp;gt;&lt;/P&gt;&lt;P&gt;int ICSlaveAddress =0x69; // NXP PCA9955B ais for VDD GND VDD for R/W=0, or D3 for R/W=1. Configuration for the AD), AD1, AD2 = 11010010&lt;BR /&gt;//All addresses needed for the commands to control the leds page 14-16 Datasheet table 7&lt;BR /&gt;int MODE1 = 0x00;&lt;BR /&gt;int MODE2 = 0x01;&lt;BR /&gt;int LEDOUT0 = 0x2;&lt;BR /&gt;int GRPPWM = 0x06;&lt;BR /&gt;int GRPFREQ = 0x07;&lt;BR /&gt;int PWM0 = 0x08;&lt;BR /&gt;int ALLCALLADR = 0x43; // all call I2C bus address&lt;BR /&gt;int PWMALL = 0x44; // brightness control for all LED&lt;BR /&gt;int IREF0 = 0x18; // output current value registers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// The values of the registers are defined at the page of each register&lt;/P&gt;&lt;P&gt;int MODE1val = 0x89; // 10001001 // default mode &lt;BR /&gt;int MODE1valcolour = 0xA9; // colour change&lt;/P&gt;&lt;P&gt;int MODE2val = 0x01; // 00000001&lt;BR /&gt;int LEDOUT0OFF = 0x00; // 00000000&lt;BR /&gt;int LEDOUT0ON = 0x01; // 00000001&lt;BR /&gt;int PWM_val = 0x80;&lt;BR /&gt;int IREF_val = 0x14;&lt;BR /&gt;int ALLCALL_val = 0x70;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Writes the three bytes, slave address, control register address and data to the SDA line&lt;/P&gt;&lt;P&gt;void write_command(int Regaddress, int data){&lt;BR /&gt; Wire.beginTransmission(ICSlaveAddress);&lt;BR /&gt; Wire.write(Regaddress); //controlReg&lt;BR /&gt; Wire.write((unsigned char)data);&lt;BR /&gt; Wire.endTransmission();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void setup() {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;Wire.begin();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(MODE1,MODE1valcolour);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(1000);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(ALLCALLADR,ALLCALL_val);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(500);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void loop() {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(LEDOUT0,LEDOUT0ON);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(500);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(LEDOUT0,LEDOUT0OFF);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(500);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;// write_command(PWM0,0xFF);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;// delay(500);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(IREF0,0xD2);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(500);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the diagram at page 46 of the datasheet for the connections. What would you advise? If this is correct, I would expect some bad connection on the chip itself. Thank you for your replies !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jun 2018 16:03:18 GMT</pubDate>
    <dc:creator>pascuale2</dc:creator>
    <dc:date>2018-06-15T16:03:18Z</dc:date>
    <item>
      <title>PCA9955B driver programming Arduino</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/PCA9955B-driver-programming-Arduino/m-p/787022#M22593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I established communication between Arduino and the NXP PCA9955B with I2C. However, I don't manage to toggle the LED0 that is constantly on at low power. Here is the code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include &amp;lt;Wire.h&amp;gt;&lt;/P&gt;&lt;P&gt;int ICSlaveAddress =0x69; // NXP PCA9955B ais for VDD GND VDD for R/W=0, or D3 for R/W=1. Configuration for the AD), AD1, AD2 = 11010010&lt;BR /&gt;//All addresses needed for the commands to control the leds page 14-16 Datasheet table 7&lt;BR /&gt;int MODE1 = 0x00;&lt;BR /&gt;int MODE2 = 0x01;&lt;BR /&gt;int LEDOUT0 = 0x2;&lt;BR /&gt;int GRPPWM = 0x06;&lt;BR /&gt;int GRPFREQ = 0x07;&lt;BR /&gt;int PWM0 = 0x08;&lt;BR /&gt;int ALLCALLADR = 0x43; // all call I2C bus address&lt;BR /&gt;int PWMALL = 0x44; // brightness control for all LED&lt;BR /&gt;int IREF0 = 0x18; // output current value registers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// The values of the registers are defined at the page of each register&lt;/P&gt;&lt;P&gt;int MODE1val = 0x89; // 10001001 // default mode &lt;BR /&gt;int MODE1valcolour = 0xA9; // colour change&lt;/P&gt;&lt;P&gt;int MODE2val = 0x01; // 00000001&lt;BR /&gt;int LEDOUT0OFF = 0x00; // 00000000&lt;BR /&gt;int LEDOUT0ON = 0x01; // 00000001&lt;BR /&gt;int PWM_val = 0x80;&lt;BR /&gt;int IREF_val = 0x14;&lt;BR /&gt;int ALLCALL_val = 0x70;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Writes the three bytes, slave address, control register address and data to the SDA line&lt;/P&gt;&lt;P&gt;void write_command(int Regaddress, int data){&lt;BR /&gt; Wire.beginTransmission(ICSlaveAddress);&lt;BR /&gt; Wire.write(Regaddress); //controlReg&lt;BR /&gt; Wire.write((unsigned char)data);&lt;BR /&gt; Wire.endTransmission();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void setup() {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;Wire.begin();&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(MODE1,MODE1valcolour);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(1000);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(ALLCALLADR,ALLCALL_val);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(500);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void loop() {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(LEDOUT0,LEDOUT0ON);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(500);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(LEDOUT0,LEDOUT0OFF);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(500);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;// write_command(PWM0,0xFF);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;// delay(500);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;write_command(IREF0,0xD2);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;delay(500);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed the diagram at page 46 of the datasheet for the connections. What would you advise? If this is correct, I would expect some bad connection on the chip itself. Thank you for your replies !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2018 16:03:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/PCA9955B-driver-programming-Arduino/m-p/787022#M22593</guid>
      <dc:creator>pascuale2</dc:creator>
      <dc:date>2018-06-15T16:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9955B driver programming Arduino</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/PCA9955B-driver-programming-Arduino/m-p/787023#M22594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi again, to answer this question, for anyone that has the same problem, I had to enable the IREF registers to have a control gain at the corresponding leds, with the help of the :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write_command(IREFx,0xFF);&lt;/P&gt;&lt;P&gt;or with&lt;/P&gt;&lt;P&gt;&amp;nbsp;write_command(IREFALL,0xFF);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2018 17:01:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/PCA9955B-driver-programming-Arduino/m-p/787023#M22594</guid>
      <dc:creator>pascuale2</dc:creator>
      <dc:date>2018-06-20T17:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9955B driver programming Arduino</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/PCA9955B-driver-programming-Arduino/m-p/1389584#M23453</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your example: it is hard to find an example on how to program the registers of the chip.&lt;/P&gt;&lt;P&gt;Is the code now complete with the IREF solution you've found?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 14:59:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/PCA9955B-driver-programming-Arduino/m-p/1389584#M23453</guid>
      <dc:creator>Copeland</dc:creator>
      <dc:date>2021-12-20T14:59:28Z</dc:date>
    </item>
  </channel>
</rss>

