<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to read Dout from Hx711</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65479/how-to-read-dout-from-hx711</link><description>Hello 
 I&amp;#39;m now going to read PD_SCK and Dout from Hx711 
 but i can only get the value from PD_SCK, no value from Dout 
 here is my code, using NRF52810 and HX711, hope someone can help</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Sep 2020 07:51:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65479/how-to-read-dout-from-hx711" /><item><title>RE: How to read Dout from Hx711</title><link>https://devzone.nordicsemi.com/thread/267752?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 07:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49b504bc-9f4b-487e-871b-846e847c038a</guid><dc:creator>Karl Ylvisaker</dc:creator><description>[quote user="mirsaider"]I need to change DOUT to input pin, and when I finish changing[/quote]
&lt;p&gt;I assumed that the code you posted in your initial ticket was incomplete. You will indeed need to configure the GPIO&amp;#39;s you use.&lt;br /&gt;Please share your complete code.&lt;/p&gt;
[quote user="mirsaider"]LA can read the signal, but in my program HX711_DOUT_Read seems didn&amp;#39;t work, can&amp;#39;t found why[/quote]
&lt;p&gt;This is a great start. Now, we must make sure that you are sending the correct sequence on your PD_SCK, for the Hx711 to start sending its data.&lt;br /&gt;With your current code, what are you seeing on the logic analyzer?&lt;br /&gt;Have you seen the Hx711 datasheet, and made sure to follow their instructions on how to read out data from the Hx711? - I.e could you tell me what the Hx711 is expecting to receive, and how this differs from what you are currently sending?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read Dout from Hx711</title><link>https://devzone.nordicsemi.com/thread/267733?ContentTypeID=1</link><pubDate>Thu, 03 Sep 2020 05:58:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1f44aa8-6271-4ab8-91ca-ea2fcbab4cf4</guid><dc:creator>mirsaider</dc:creator><description>&lt;p&gt;I connect hx711 PD_SCK to 52810 11, DOUT to 52810 12,&amp;nbsp; the code upthere I&amp;#39;ve found some problem, I need to change DOUT to input pin, and when I finish changing, LA can read the signal, but in my program HX711_DOUT_Read seems didn&amp;#39;t work, can&amp;#39;t found why&lt;pre class="ui-code" data-mode="text"&gt;#define HX711_SCK         nrf_gpio_cfg_output(SCK)// set SCK output
#define HX711_DOUT        nrf_gpio_cfg_input(DOUT, NRF_GPIO_PIN_NOPULL)// set DOUT input

#define HX711_SCK_ON      nrf_gpio_pin_set(SCK) // set SCK high
#define HX711_SCK_OFF     nrf_gpio_pin_clear(SCK) // set SCK low
#define HX711_DOUT_Read   bsp_board_button_state_get(DOUT) // read DOUT high or low


static void leds_init(void)
{
    bsp_board_init(BSP_INIT_LEDS);
}








int main(void)
{
    // Initialize.
    leds_init();
    bsp_board_led_on(BSP_BOARD_LED_0);


    for (;;)
    {
        
        //read HX711
    
      long count = 0;
      int i;

      while(HX711_DOUT_Read);
       
      for(i = 0; i &amp;lt; 24; i++)
      {
          
          HX711_SCK_ON;
          count = count &amp;lt;&amp;lt; 1;
          nrf_delay_us(2);
          HX711_SCK_OFF;
          nrf_delay_us(2);
         

        
         
          if(HX711_DOUT_Read) 
          {
            count++;  
          }    
      }
       
       
       
       HX711_SCK_ON;
       nrf_delay_us(2);
       if(count &amp;amp; 0x800000)
       {
          count |= (long) ~0xffffff;
       }
       HX711_SCK_OFF;
       nrf_delay_us(10);

  } 
    

}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read Dout from Hx711</title><link>https://devzone.nordicsemi.com/thread/267571?ContentTypeID=1</link><pubDate>Wed, 02 Sep 2020 09:12:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48208240-22d5-44d4-b4a4-9aedaa739031</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;[quote user=""][/quote]&lt;/p&gt;
&lt;p&gt;I&amp;#39;m now going to read PD_SCK and Dout from Hx711&lt;/p&gt;
&lt;p&gt;but i can only get the value from PD_SCK, no value from Dout&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Have you checked with the Hx711 datasheet that you are sending the necessary signals for it to begin transmitting its data? If I remember correctly the Hx711 requires a certain sequence prior to starting.&lt;br /&gt;&lt;br /&gt;Could you also elaborate on how you have connected your Hx711 to your nRF52810? A connection diagram would be preferable.&lt;br /&gt;&lt;br /&gt;Looking forward to resolving this issue together!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>